ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange |
1 | initial version |
What is the receive logic on your robot?
If you set PID target when you receive cmd_vel, then your robot will be stuck on last received value, disregarding how old it is. If cmd_vel topic just stops, your robot will carry on using last cmd_vel
Most probably you need to check for timeout, e.g. if no message was received in last 1 second, then set PID target to zero. This way if cmd_vel cut's off, then robot will carry on for 1 second, then timeout will kick in and set PID target to zero, which in turn will stop the robot.
If my understanding of your problem is wrong, please edit your question to include relevant source code section from your robot.