How to stop your robot when ROS is shutting down

A post was split to a new topic: Robot not stopping at shutdown as specified on rospy.on_shutdown