Skip to content

Commit

Permalink
Arm joint commands wrapper function (#139)
Browse files Browse the repository at this point in the history
Adds a simple function to the wrapper to allow us to simply send arm joint angles to the robot.

Tested with the Maple `action_stack_spot` sending joint angles.
  • Loading branch information
llee-bdai authored Sep 10, 2024
1 parent 0a58923 commit de13721
Showing 1 changed file with 22 additions and 0 deletions.
22 changes: 22 additions & 0 deletions spot_wrapper/wrapper.py
Original file line number Diff line number Diff line change
Expand Up @@ -1324,6 +1324,28 @@ def velocity_cmd(
self.last_velocity_command_time = end_time
return response[0], response[1]

def arm_joint_cmd(
self, *, sh0: float, sh1: float, el0: float, el1: float, wr0: float, wr1: float
) -> typing.Tuple[bool, str]:
"""
Send a single point arm joint command to the robot.
Args:
sh0: shoulder joint angle
sh1: shoulder joint angle
el0: elbow joint angle
el1: elbow joint angle
wr0: wrist joint angle
wr1: wrist joint angle
Returns:
Tuple of bool success and a string message
"""
robot_command = RobotCommandBuilder.arm_joint_command(sh0, sh1, el0, el1, wr0, wr1)
response = self._robot_command(robot_command)
return response[0], response[1]

def trajectory_cmd(
self,
goal_x: float,
Expand Down

0 comments on commit de13721

Please sign in to comment.