Skip to content

Commit 1b2312c

Browse files
committed
add a wrapper function for sending arm joint commands
1 parent b7cdd7c commit 1b2312c

File tree

1 file changed

+5
-3
lines changed

1 file changed

+5
-3
lines changed

spot_wrapper/wrapper.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1326,14 +1326,16 @@ def velocity_cmd(
13261326
self.last_velocity_command_time = end_time
13271327
return response[0], response[1]
13281328

1329-
def arm_joint_cmd(self, sh0: float, sh1: float, el0: float, el1: float, wr0: float, wr1: float) -> typing.Tuple[bool, str]:
1329+
def arm_joint_cmd(
1330+
self, sh0: float, sh1: float, el0: float, el1: float, wr0: float, wr1: float
1331+
) -> typing.Tuple[bool, str]:
13301332
traj_point = RobotCommandBuilder.create_arm_joint_trajectory_point(sh0, sh1, el0, el1, wr0, wr1)
13311333
arm_joint_traj = arm_command_pb2.ArmJointTrajectory(points=[traj_point])
13321334

13331335
joint_move_command = arm_command_pb2.ArmJointMoveCommand.Request(trajectory=arm_joint_traj)
13341336
arm_command = arm_command_pb2.ArmCommand.Request(arm_joint_move_command=joint_move_command)
1335-
sync_arm = synchronized_command_pb2.SynchronizedCommand.Request(arm_command=arm_command)
1336-
arm_sync_robot_cmd = robot_command_pb2.RobotCommand(synchronized_command=sync_arm)
1337+
sync_arm_command = synchronized_command_pb2.SynchronizedCommand.Request(arm_command=arm_command)
1338+
arm_sync_robot_cmd = robot_command_pb2.RobotCommand(synchronized_command=sync_arm_command)
13371339
robot_command = RobotCommandBuilder.build_synchro_command(arm_sync_robot_cmd)
13381340
response = self._robot_command(robot_command)
13391341
return response[0], response[1]

0 commit comments

Comments
 (0)