How to stop Turblebot under any emergency
Dear all, I am using a robot turblebot3-burger to do test. I write some test code to publish the control message (line-speed/angular-speed) to /cmd_vel. Follow the TB3 instruction before move the burger I need launch remotely (through ssh) on TB3 the below command:
roslaunch turtlebot3_bringup turtlebot3_robot.launch
if I run rosnode list remotely Ican see some node are start up, so at the moment I should be ready to publish the control message to /cmd_vel. My question are:
Q1: as soon as I stop publish the control messge -- either due to some communication problem, code bug, or I simply stop the node on PC by Ctrl+C, the robot will not be stop -- the only way I can do right now is to switch -off the power robot. This is anoying and I wonder if there should be any safety node that should run in turblebot3-burger --either it can stop the Robot when recieving sme control message from other node , or a time-out should happen when there is no control message published to it?
Q2: Occationally I noticed after I reboot the turblebot3-burger , and run up the service as above command, it will immediately start moving, don't know the exactly reason--I guess if it is because some remaining "command" still exist in some "buffer" that was not cleared?
Anyway, is there any safe way that after reboot the turblebot3-burger and reset it to a absolutely "known" state?
Thanks a lot