mirror of
https://github.com/YikeStone/ros_arduino_bridge.git
synced 2025-08-05 20:14:07 +05:30
Added check for base_controller before stopping robot when node exits
This commit is contained in:
parent
702624e336
commit
932282526d
@ -266,12 +266,13 @@ class ArduinoROS():
|
|||||||
return AnalogReadResponse(value)
|
return AnalogReadResponse(value)
|
||||||
|
|
||||||
def shutdown(self):
|
def shutdown(self):
|
||||||
rospy.loginfo("Shutting down Arduino Node...")
|
rospy.loginfo("Shutting down Arduino node...")
|
||||||
|
|
||||||
# Stop the robot
|
# Stop the robot
|
||||||
rospy.loginfo("Stopping the robot...")
|
if self.use_base_controller:
|
||||||
self.cmd_vel_pub.publish(Twist())
|
rospy.loginfo("Stopping the robot...")
|
||||||
rospy.sleep(2)
|
self.cmd_vel_pub.publish(Twist())
|
||||||
|
rospy.sleep(2)
|
||||||
|
|
||||||
# Detach any servos
|
# Detach any servos
|
||||||
if self.have_joints:
|
if self.have_joints:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user