We’re testing our swerve prototype with field-centric swerve, and found that controls are a bit too “jumpy”, especially “left” and “right”, as well as holonomic rotation, especially if it’s paired with the directional control, where more fine adjustments are usually needed.
We tried Logitech joysticks and XBOX controllers, and also implemented CUBE driving like shown in Nu23, with more fine control on the lower end of the joystick move.
We’re simply trying to make it easier for drivers to navigate swerve and have better control over it.
Do you have any suggestions on the controllers as well as better algorithms to supply directional/rotational input? For instance, perhaps, you found better luck in limiting the holonomic rotation to 50% of the max rotation speed?
Our swerve prototype is capable of 2-3 RPS stationary holonomic rotation at max speed, and directional maximum speed around 10-12fps.
100 has had good luck with a sort of “throttle” that specifies the full-range speed. I think there are 2 or three speeds to select from, e.g. 25, 50, 75, and 100 percent of max.
you also might want to look at the low level control loops to see what their error is-- if you’re supplying infeasible input to the low level then it can seem “jumpy,” meaning full of lag and overshoot.
You may also want to consider SlewRateLimiter. We also decoupled translation speed from direction with a gas pedal (the trigger) for translation speed. We just slowed open loop rotation down to 1/3. There is also a slow mode. This implementation could be cleaner
It just makes the change a bit slower. It won’t prevent you from “jamming the throttle” but it may feel slightly delayed. But I would imagine it’s very barely.
My car has the same thing on the throttle and it’s not noticable with normal driving
@Dave1998 With a 3 in the SlewRateLimiter it means you can reach 3 in 1 second. 1 being 100% so in effect it makes it take 1/3 of a second to reach 100% output. a small limit. We did limit rotation though and the driver has no way to full throttle rotate.
drivers don’t generally like the effect of the slew rate limiter due to the lag it creates, and especially the overshoot. note some joysticks have a round response shape, i.e. the “lower right” corner doesn’t produce x=1, y=1, but rather x=0.7, y=0.7. so if you cube the input you’ll get a sort of “cross” shaped response with low output in the corners.
This is exactly why you use a SlewRateLimiter it doesn’t impede driver control much but will take some getting used too, the delay is not enough to cause issues with control normally. They are also very important to prevent robots with bad center of gravities from falling over, however if the center of gravity is variable you may want to implement velocity limiting based off of an estimated center of gravity and momentum.
imo the driver should be good enough to not need a limiter. They should know not to let go of the stick when the robot is at full speed and they should have the ability to change directions at a moment’s notice to avoid collisions.
You could also have a throttle map, such that most of the stick’s travel results in slow output.
For example 80% x input on the stick only gives you 50% output.