mirror of
https://github.com/YikeStone/ros_arduino_bridge.git
synced 2025-08-03 19:24:09 +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)
|
||||
|
||||
def shutdown(self):
|
||||
rospy.loginfo("Shutting down Arduino Node...")
|
||||
rospy.loginfo("Shutting down Arduino node...")
|
||||
|
||||
# Stop the robot
|
||||
rospy.loginfo("Stopping the robot...")
|
||||
self.cmd_vel_pub.publish(Twist())
|
||||
rospy.sleep(2)
|
||||
if self.use_base_controller:
|
||||
rospy.loginfo("Stopping the robot...")
|
||||
self.cmd_vel_pub.publish(Twist())
|
||||
rospy.sleep(2)
|
||||
|
||||
# Detach any servos
|
||||
if self.have_joints:
|
||||
|
Loading…
x
Reference in New Issue
Block a user