menu
announcement

Spectrum is now read-only. Learn more about the decision in our official announcement.

MuSHR

MuSHR is an open-source robotics platform for learning and researching AI with autonomous vehicles.

Channels
Team

using push button

February 16, 2021 at 6:34am
Hello, we would like to use the push button of the mushr car to stop the vehicle in case of a collision. I wonder if there is an algorithm that needs to be changed with the push button result.

February 19, 2021 at 12:07am
Hi (yyyyglee) - The push_button_state topic can be used to determine whether or not the push button is being pressed down. You could write a ROS node that subscribes to this topic, and then publishes ackermann_cmd msgs to the mux/ackermann_cmd_mux/input/safety to either stop the car or take other actions when appropriate (such as when the button has been pressed down). Note that mux/ackermann_cmd_mux/input/safety is the highest priority input stream, so commands published to mux/ackermann_cmd_mux/input/teleop and mux/ackermann_cmd_mux/input/navigation will be ignored when mux/ackermann_cmd_mux/input/safety is being published to.
Note that if you use the push button to stop the vehicle during collisions, your robot will not know that it should stop until it has already started colliding (because that is what is required to push down the button). Alternatively, you could use the lidar to detect when the robot is getting close to an object and thereby command the robot to stop before making contact.
Edited