-
Notifications
You must be signed in to change notification settings - Fork 4
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Joystick driver does not kill motors kill switch released. #4
Comments
Yeah, that's about what I experienced when driving it around at ExploreUT. That if-statement that checks the |
By the way, we might want to look into using a ROS driver for the joystick instead of our own: https://github.com/turtlebot/turtlebot_apps/blob/hydro/turtlebot_teleop/launch/logitech.launch |
Immediate recommended fixes:
|
That package will be quite a bit more bulky, but also complete and easier to interface to. |
As for other fixes, a watchdog on the embedded is fairly crucial. This drive itself can also have something like: on the event of key5 release- publish a 0 velocity message. Also, rather than having some arbitrary math function to deal with acceleration, have a simple acceleration scheme like: Joystick input controls the velocity setpoint; use a fixed max_acceleration; each control loop, move the output velocity towards the velocity setpoint at max_acceleration or setpoint-output, whichever is less. By the way, I'm not making these changes myself, since I'd have no way of testing. |
That's cool, thanks for the pointers! I can add a watchdog, and will look into the acceleration. |
so for a while, this issue was fixed by adding a watchdog to the lm4f. now it is back. the lm4f requires something to be sent to it before it sends anything back to the computer, so the lm4f node is always sending to the lm4f the last cmd_vel message received in order to get encoder info out of it. i'd recommend doing what frank said about constantly sending 0 velocity on key5 release. |
Joystick controller uses button 5 for a dead man's switch. When released though it retains the latest motor values (if you were going full speed forward and let go of the controller, it will continue going forward). Line 38/39 in the node resets to zero if not right state, but that line is only reached through the preceding if-statement that checks right_state. At least that's what I seemed to notice through my limited usage of it and cursory glance of the node, let me know if there is no actual problem and I can't science.
The text was updated successfully, but these errors were encountered: