I’ve been using the joint trajectory interface to send commands to the Dex Wrist version of stretch. Here’s an example command:
---
header:
seq: 84
stamp:
secs: 1663809518
nsecs: 932527065
frame_id: ''
goal_id:
stamp:
secs: 1663809518
nsecs: 932483673
id: "/basic_controls-84-1663809518.932"
goal:
trajectory:
header:
seq: 0
stamp:
secs: 1663809518
nsecs: 932443380
frame_id: ''
joint_names:
- joint_lift
- joint_arm_l0
- joint_arm_l1
- joint_arm_l2
- joint_arm_l3
- joint_gripper_finger_left
- joint_wrist_roll
- joint_wrist_pitch
- joint_wrist_yaw
- joint_head_pan
- joint_head_tilt
points:
-
positions: [0.5137053394519911, 0.0, 0.0, 0.0, 0.0, -0.038557933294775415, -0.7439806821245359, -0.7761942786701345, -0.7676295526044397, -0.8244375296703885, -0.0010067811717669514]
velocities: []
accelerations: []
effort: []
time_from_start:
secs: 0
nsecs: 0
path_tolerance: []
goal_tolerance: []
goal_time_tolerance:
secs: 1
nsecs: 0
When I send this the first time, it goes to the “correct” position - arm extended, slightly angled, at a useful pre-grasp pose. When I send it a second time, the wrist rotates 180 degrees – I think it might be trying to rotate all the way around to get to the position. I see these errors on the wrist joint positions after trying to go to this position from that position:
wrist yaw: 3.5918979856853905
wrist pitch: 0.0012965181258930425
wrist roll: 3.858272009700533
Now I could just check and not re-send the command at a given position, but this also applies for nearby positions, which I need for my application (this is a pre-grasp pose for an object).
Is there anything I can do here? It seems like it must be some bug with the dex wrist controllers.