Skip to content

Commit 883286d

Browse files
committed
fix: change to trajectory planning mode
1 parent 35bf84b commit 883286d

File tree

1 file changed

+3
-1
lines changed
  • extensions/rcs_xarm7/src/rcs_xarm7

1 file changed

+3
-1
lines changed

extensions/rcs_xarm7/src/rcs_xarm7/hw.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,9 +75,11 @@ def reset(self) -> None:
7575
pass
7676

7777
def set_cartesian_position(self, pose: common.Pose) -> None:
78+
self._xarm.set_mode(7)
79+
self._xarm.set_state(0)
7880
x, y, z, roll, pitch, yaw = pose.xyzrpy()
7981
x_mm, y_mm, z_mm = 1000 * x, 1000 * y, 1000 * z
80-
self._xarm.set_position(x_mm, y_mm, z_mm, roll, pitch, yaw, is_radian=True, wait=True)
82+
self._xarm.set_position(x_mm, y_mm, z_mm, roll, pitch, yaw, is_radian=True, wait=False)
8183

8284
def set_joint_position(self, q: np.ndarray[tuple[typing.Literal[7]], np.dtype[np.float64]]) -> None: # type: ignore
8385
self._xarm.set_servo_angle(angle=q, is_radian=True, wait=True)

0 commit comments

Comments
 (0)