Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Arm joint commands wrapper function #139

Merged
merged 8 commits into from
Sep 10, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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