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

Turn off robot servos from launch file

asked 2022-01-18 10:15:29 -0600

auxoche gravatar image

Good day, I would like to know if there is a command I can add to my code so that it turns off the servomotors before exiting. Right now the robot stays 'stiff' even after ROS program termination. Thank you in advance!

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
1

answered 2022-01-18 11:19:45 -0600

cst0 gravatar image

No, there isn't a specific ROS command for this. However, you could make use of the on_shutdown feature of the ROS api (if using Python, see here) to call whatever the 'motor shutdown' sequence is when your motor controller node shuts down. However, I would point out that most positional servomotors tend to stay locked at a position irrespective of what code you have running: when powered on, they're attempting to achieve their goal location/velocity.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2022-01-18 10:15:29 -0600

Seen: 162 times

Last updated: Jan 18 '22