Skip to content

Commit 37d496b

Browse files
committed
Fix batch_ik_demo for Nextage robot
- Adjust target poses to match Nextage end effector workspace - Add base rotation (180deg around y-axis) to match end_coords orientation - Split long lines to comply with line length limit
1 parent 43f523d commit 37d496b

File tree

1 file changed

+14
-6
lines changed

1 file changed

+14
-6
lines changed

examples/batch_ik_demo.py

Lines changed: 14 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -108,12 +108,20 @@ def main():
108108
]
109109
elif args.robot == 'nextage':
110110
target_poses = [
111-
Coordinates(pos=(0.3, -0.25, -0.1)).rotate(np.pi, 'y').rotate(np.deg2rad(-25), 'z'),
112-
Coordinates(pos=(0.3, -0.25, -0.15)).rotate(np.pi, 'y').rotate(np.deg2rad(-30), 'z'),
113-
Coordinates(pos=(0.4, -0.2, -0.1)).rotate(np.pi, 'y').rotate(np.deg2rad(15), 'y').rotate(np.deg2rad(-15), 'z'),
114-
Coordinates(pos=(0.28, -0.18, -0.08)).rotate(np.pi, 'y').rotate(np.deg2rad(90), 'x'),
115-
Coordinates(pos=(0.35, -0.2, -0.12)).rotate(np.pi, 'y').rotate(np.deg2rad(45), 'x'),
116-
Coordinates(pos=(0.35, -0.22, -0.08)).rotate(np.pi, 'y').rotate(np.deg2rad(-30), 'y').rotate(np.deg2rad(15), 'z'),
111+
Coordinates(pos=(0.3, -0.25, -0.1)).rotate(
112+
np.pi, 'y').rotate(np.deg2rad(-25), 'z'),
113+
Coordinates(pos=(0.3, -0.25, -0.15)).rotate(
114+
np.pi, 'y').rotate(np.deg2rad(-30), 'z'),
115+
Coordinates(pos=(0.4, -0.2, -0.1)).rotate(
116+
np.pi, 'y').rotate(np.deg2rad(15), 'y').rotate(
117+
np.deg2rad(-15), 'z'),
118+
Coordinates(pos=(0.28, -0.18, -0.08)).rotate(
119+
np.pi, 'y').rotate(np.deg2rad(90), 'x'),
120+
Coordinates(pos=(0.35, -0.2, -0.12)).rotate(
121+
np.pi, 'y').rotate(np.deg2rad(45), 'x'),
122+
Coordinates(pos=(0.35, -0.22, -0.08)).rotate(
123+
np.pi, 'y').rotate(np.deg2rad(-30), 'y').rotate(
124+
np.deg2rad(15), 'z'),
117125
]
118126
else:
119127
# Default target poses for Fetch/PR2/Panda

0 commit comments

Comments
 (0)