Closed bit-pirate closed 8 years ago
Before diving into implementation details, I like to review the desired behaviour:
I would like to avoid adding more buttons, since we are already running low one them (and the high-speed mode (#99) will use another one). However after thinking about the above cases I don't know how to implement it cleanly without (case 1. vs. 2.i. above).
Regarding the implementation I'm considering add a second publisher to joyop, which sends out a message when
Thoughts?
Regarding that publisher, for Gophers we could either use the emergency stop (an empty message sub) or another cmd vel publisher, which sends its message to a "unsmoothed" topic.
I will put up an implementation for the latter, since it should be more general.
The problem with the clean implementation is that if there is navigation running and you want to do a full stop, it will only full stop for a little bit before the navigation might kick in?
If you want to force a full stop during navigation you would need to keep the deadman pressed to take over control and then the brake until its stops. Navigation will not be able to take over again until the deadman is released.
If you just press the deadman (as we do currently) the robot will slowly come to a halt (as defined by the deceleration factor).
All this assuming the user is not touching the joystick.
I don't like that.
Is there a problem with the brake always being pushable without the deadman?
Added your suggestion. Brake can now always be triggered - independent of the motors being enabled or the deadman button being pressed.
Implemented by f23f009f878cd93c2b6b7d9c86726c9b04731a70.
Currently releasing the analog stick (bounces back to zero position) and releasing the deadman button leads to the same zero-velocity output and hence is treated the same on the velocity smoother side. However, in the first case we like the robot to slow down gently, whereas in the latter we like the robot to brake and stop as fast as possible.
Let's discuss how this could be implemented best. Some existing thoughts to seed the discussion: