Browse Source

Remove pimu.push_command() out of event loop

bugfix/pimu_push_command
Chintan Desai 10 months ago
committed by GitHub
parent
commit
9150116ec7
No known key found for this signature in database GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 4 additions and 2 deletions
  1. +4
    -2
      stretch_core/nodes/stretch_driver

+ 4
- 2
stretch_core/nodes/stretch_driver View File

@ -373,6 +373,7 @@ class StretchDriverNode:
self.change_mode(self.prerunstop_mode, lambda: None)
if not just_change_mode:
self.robot.pimu.runstop_event_reset()
self.robot.pimu.push_command()
######## SERVICE CALLBACKS #######
@ -576,12 +577,13 @@ class StretchDriverNode:
SetBool,
self.runstop_service_callback)
self.robot.pimu.set_fan_on()
self.robot.pimu.push_command()
try:
# start loop to command the mobile base velocity, publish
# odometry, and publish joint states
while not rospy.is_shutdown():
self.robot.pimu.set_fan_on()
self.robot.pimu.push_command()
self.command_mobile_base_velocity_and_publish_state()
command_base_velocity_and_publish_joint_state_rate.sleep()
except (rospy.ROSInterruptException, ThreadServiceExit):

Loading…
Cancel
Save