Trackball Swerve

What do you guys think of using a trackball to control a swerve drive? Is it doable?

It’s an interesting idea but relies on a few things:

Does the trackball show up as a game controller to the computer? If not, you need to find a way to make it do so for the Driver Station:

Secondly, you’d need to handle strange things, like the trackball stopping and the motors not, and as such, a curve is probably a good idea. Other than that though… it’s definitely an ambitious idea.

I’d almost suggest using one of these in conjunction for spin, one for motion relative to robot, the other for direction.

Best of luck!

I would use something like this, with the trackball to control forward, backward, left, and right and the dial around it to control rotation.

Sent from my iPhone using Tapatalk

That would definitely be an option, but be aware of a) it might not be easily mappable depending on the software and b) the driver may wrap their hands over one another. It could cause issues in the heat of competition.

I don’t see a trackball, in any way, being better than using a high quality, 2 joystick controller to control a swerve. Sorry guys, a 2 joystick controller would be/is way easier for a human to interface to than just about anything. Good luck moving the robot an inch at a time then go full speed down the field while spinning. What would that even look like. Whatever that motion over the trackball looks like, it would be slower than what would be required with joysticks.

The simplest way to think of this is ask yourself “what muscles do you want to use to control precise movements”? I would say the same muscles that you use to write or type with, pointer finger, thumb and hand. Very little arm muscles. Tank joysticks use arm and forearm muscles; not optimum. Trackballs use arm, fore arm , sometimes hand and fingers; also not good. It would be an interesting exercise, but I wouldn’t encourage our driver to use it. Imagine writing your name on paper if you had to hold a pencil like a baseball bat and just use your arms. That would suck.

Another example is controlling a swerve is similar to controlling the “dude” in a video game such as Halo, Nobody is chopping at the bit to use a trackball to play Halo.

Yet another example is what do you use to fly a drone? certainly not a trackball.

Sorry if I sound a bit gruff about this, but I am passionate about a good HMI. Our team will always use a Flight Controller or a high quality, 2 joystick gaming controller to drive our swerve.

I agree that using a trackball would most likely be detrimental, but I’d argue that a control set-up that emulates driving a car can be just as accurate and intuitive as a two-joystick controller.

We used a DJ turntable for robot orientation/spins, and a single joystick for driving on our swerve this year.

One of the students set up a clever MIDI to “joystick” script to use the turntable as an interface. It worked very well, and turned out to be a very intuitive and great way to drive.

5/7 would recommend.

It’s your learning project. What do you lose by trying something new?

I say go for it.

How do you control velocity with a trackball? Does the operator have to spin the trackball faster?

I can either think of mapping trackball velocity to robot velocity or trackball position to robot velocity. Unless I’m missing something, neither one seems like a particularly good idea.

If you’re mapping position to velocity, unless you have some specialized trackball it will not snap back to center at rest so the robot will keep going in whatever direction you leave it. Not only is this not safe, but it makes it substantially hard to stop the robot precisely.

If you use trackball velocity then the driver needs to be constantly turning the trackball to move the robot. Have fun rolling that trackball at full speed for 2:15. If anything it will be a good arm workout.

Any control system can be made to work, as long as it fits in the space, it has sufficient resolution, and the driver, the programmer, and the robot can all handle it.

That said, the long pole in the tent here is that trackballs are traditionally used to control game sprites of low inertia, which can be accelerated, decelerated, turned, or even reversed as quickly as the human hand. FRC robots typically have significant inertia. That is, if your driver is used to a trackball for games, [s]he likely expects the object being controlled to be able to undergo great acceleration, so using it to control a robot is likely to result in an unsatisfactory driving experience. Caveat: purely mental exercise and YMMV.

Ergonomically, I think you would have a hard time getting any sort of precision control using a Trackball. You don’t have the same high-speed feedback on a robot that you do with a computer screen. IMO a huge part of robot control is being able to predict, with a high degree of accuracy, what the robot will do based on your input before you actually do anything, a trackball (or even a regular computer mouse) makes it difficult because it relies on comparing the command given, which is hard to gauge accurately (“did I rotate the ball 35degrees or 40degrees?”) to the robots action, which has a slight delay. As a former driver, I know it certainly would not be my first choice.

It also creates problems for programmers since you’re converting trackball velocity to motor speed, and unlike a Joystick or controller, which has a fixed range, a trackball is only limited by the refresh rate of the sensor, meaning that your programmers either have to add an artificial ceiling, which can make speed scaling problematic, or do testing to figure out what the practical top speed the operator will spin the ball at (which may be subject to change over time).

In a nutshell, is it doable? Sure. Would I recommend it? No.
That said, if you already have a trackball, a swerve robot, and some programmers with a lot of free time, by all means test it out in the off-season.

This sounds very interesting. I remember playing a football video game in college using a trackball and running down the field by spinning the trackball as hard as I could, hand over hand.

I could see tying wheel rotations to trackball rotations via some ratio, and the direction of rotation of the trackball translated to the angle of travel of the swerve drive. Sounds like a wonderful control experiment.

Would I expect this to be the most successful Operator Interface on the field? Well… sounds like a wonderful control experiment.

Guys I think we’re spending way to much time trying to decide if we should do it and not enough time saying “Screw it!” and doing it anyway.

Go for it and tell us how it does…

There is much to be said for this. It’s not like building a high-risk drive train (one for which the concept might or might not work*); if the trackball doesn’t work, you can easily roll back to a more traditional joystick control. March and April are a lot closer in the rear view right now than through the windshield.

    • And I’m building one of those, though more at an FTC scale than FRC.

The title of this thread made me think of a drive system from the past*, using trackballs. I think the control for that was a joystick.

I was thinking of something like using the trackball to control direction, then using a joystick to control throttle, much like Cheezy Drive.

Or… have a trackball that controls direction and speed for fine maneuver and a joystick for direction and speed for gross travel; driver uses either one when appropriate. Still need something else for rotation.

So you’d be using trackball position, rather than velocity, to control direction? Meaning the operator has to keep track of absolute zero on the track ball (which has infinite potential rotation)?
Or would you use the trackball velocity heading, and ignore the magnitude of the velocity?

How do you control rotation?