ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

How to add automated kill switch to robot?

asked 2018-08-13 18:18:15 -0500

asabet gravatar image

My UGV sometimes behaves erratically when navigating autonomously with move_base. It will sometimes get caught in loops when performing turns to reach a nav goal, or it will completely lose it's pose and lose its pose wrt to the ground and think it's flipped in the air (as seen in rviz). When it is behaving erratically, it can even rush a wall and try to climb it until it tips over! I'd like to add a kill condition that will monitor its odometry, speed, and acceleration and send an interrupt to move_base to shut down when this happens. What's the best way of going about this?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2018-08-14 04:03:50 -0500

pavel92 gravatar image

You can cancel a navigation goal by publishing on the /move_base/cancel topic:

rostopic pub /move_base/cancel actionlib_msgs/GoalID -- {}

This will cancel all the navigation goals that are given and you dont need to kill and restart move_base. You can write a node that monitors the speed/odometry or acceleration and cancel the goal within it based on your custom logic.

edit flag offensive delete link more

Question Tools

2 followers

Stats

Asked: 2018-08-13 18:18:15 -0500

Seen: 341 times

Last updated: Aug 14 '18