Browse Source

Generate Base joint state info within command group

feature/pluggable_end_effector
hello-binit 3 years ago
parent
commit
da548122ea
1 changed files with 12 additions and 0 deletions
  1. +12
    -0
      stretch_core/nodes/command_groups.py

+ 12
- 0
stretch_core/nodes/command_groups.py View File

@ -719,6 +719,18 @@ class MobileBaseCommandGroup(SimpleCommandGroup):
return None
def joint_state(self, robot_status, **kwargs):
robot_mode = kwargs['robot_mode']
manipulation_origin = kwargs['manipulation_origin']
base_status = robot_status['base']
if robot_mode == "manipulation":
pos = base_status['x'] - manipulation_origin['x']
vel = base_status['x_vel']
effort = base_status['effort'][0]
return (pos, vel, effort)
return (0, 0, 0)
def goal_reached(self):
if self.active:
if self.active_translate_mobile_base or self.active_rotate_mobile_base:

Loading…
Cancel
Save