# Stretch3 lift/arm does not move in Trajectory mode

**URL:** <https://forum.hello-robot.com/t/stretch3-lift-arm-does-not-move-in-trajectory-mode/1061>\
**Category:** Ask\
**Created:** [July 29, 2024, 7:08pm UTC](https://forum.hello-robot.com/t/stretch3-lift-arm-does-not-move-in-trajectory-mode/1061 "2024-07-29T19:08:36Z")\
**Posts on this page:** 12\
**Page:** 1

<div class="post-metadata">

**Author:** ![leograyc](https://avatars.discourse-cdn.com/v4/letter/l/f07891/32.png) [@leograyc](https://forum.hello-robot.com/u/leograyc)\
**Post date:** [July 29, 2024, 7:08pm UTC](https://forum.hello-robot.com/t/stretch3-lift-arm-does-not-move-in-trajectory-mode/1061/1 "2024-07-29T19:08:36Z")

</div>

When launching the stretch\_driver in trajectory mode: `ros2 launch stretch_core stretch_driver.launch.py mode:=trajectory`, then using ros action client to send trajectory to `/stretch_controller/follow_joint_trajectory`. The lift will “bump” up a little, but then the arm and lift both did not move at all for the entire trajectory duration while driver announced traj succeeded. During the trajectory, I can hear extra humming noise from the robot (I assume its motor being activated) but no motion is visible. On the other hand, If I launch the driver with position mode, the arm and lift both moved. I have also tried to also send the same command to `joint_wrist_yaw` and I can see the wrist yaw motor moved.

After some debugging, I have track down the issue to around the `stretch_body.prismatic_joint.PrismaticJoint.update_trajectory` function. Basically it should be incrementing the `next_segment_id`, however, the `self.motor.status['waypoint_traj']['state']` is stuck on `waiting_on_sync` for both arm and lift the whole time. Thus not going into the logic and advancing the trajectory.

I initially run into this problem when working on a moveit port. However I have also confirmed without moveit, the same problem persists. I did the additional tests with this script [draw\_circle.py · GitHub](https://gist.github.com/hello-binit/4e7059721a05c6714e30ec7b7551ef4a) (need to remove the rclpy.init() in hello\_misc helper). With reboot and updated `stretch_body` pip package to latest.

This is a big blocker for my project as I need to do trajectory control for Stretch. Any help or input would be great. I can also do more testing and debugging if anyone have idea on what would cause the motors to be stuck in the `waiting_on_sync` mode.

Thanks  
Leo.

---

<div class="post-metadata">

**Author:** ![bshah](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/bshah/32/55_2.png) [@bshah](https://forum.hello-robot.com/u/bshah)\
**Post date:** [August 1, 2024, 3:36pm UTC](https://forum.hello-robot.com/t/stretch3-lift-arm-does-not-move-in-trajectory-mode/1061/2 "2024-08-01T15:36:13Z")

</div>

Hey Leo, thanks for reporting this. I’m working on seeing if I can replicate this. I hope to have an update posted soon.

---

<div class="post-metadata">

**Author:** ![leograyc](https://avatars.discourse-cdn.com/v4/letter/l/f07891/32.png) [@leograyc](https://forum.hello-robot.com/u/leograyc)\
**Post date:** [August 2, 2024, 7:24pm UTC](https://forum.hello-robot.com/t/stretch3-lift-arm-does-not-move-in-trajectory-mode/1061/3 "2024-08-02T19:24:06Z")

</div>

I did a bit more comparison, seems like the error behavior is related to stepper driver, but might be caused by ROS driver.

In this [gist](https://gist.github.com/Gray-Stone/8e9a2b715b949e7f742dc542f4bfed0a) I have made 3 scripts.

[draw\_circle\_SE3.py](https://gist.github.com/Gray-Stone/8e9a2b715b949e7f742dc542f4bfed0a#file-draw_circle_se3-py) is a clone of the draw\_circle example, [simple\_ros\_traj.py](https://gist.github.com/Gray-Stone/8e9a2b715b949e7f742dc542f4bfed0a#file-simple_ros_traj-py) simply sends a ROS trajectoy action that move lift and arm up-down for a tiny bit. Both of which uses the stretch ros driver `ros2 launch stretch_core stretch_driver.launch.py mode:=trajectory broadcast_odom_tf:=True`.

The third script [Traj-minimal.py](https://gist.github.com/Gray-Stone/8e9a2b715b949e7f742dc542f4bfed0a#file-traj-minimal-py) is a minimal script that move the lift without using ROS. It directly use the python API with a Robot object, but doing similar call like `robot.lift.trajectory.add`, `robot.follow_trajectory()`, and `robot.lift.update_trajectory()`.

When running the first two script, I have kept running into the same issue, where motor is not moving and `self.motor.status['waypoint_traj']['state']` is stuck on `waiting_on_sync`.

On the other hand, when running the last script `Traj-minimal.py`, it can always move the lift even right after previous Ros driver move have failed.

This seems to imply the issue would be at how the ROS robot driver sends the command over to the robot.

---

<div class="post-metadata">

**Author:** ![bshah](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/bshah/32/55_2.png) [@bshah](https://forum.hello-robot.com/u/bshah)\
**Post date:** [August 5, 2024, 9:05pm UTC](https://forum.hello-robot.com/t/stretch3-lift-arm-does-not-move-in-trajectory-mode/1061/4 "2024-08-05T21:05:59Z")

</div>

Hi @leograyc, when you run `Traj-minimal.py`, do you see the trajectory execute smoothly? Would you try running `stretch_trajectory_jog.py --lift` , execute the trajectory, and film a quick video of the robot’s motion? It brings up Matplotlib, so you’ll need a display plugged into the robot.

---

<div class="post-metadata">

**Author:** ![leograyc](https://avatars.discourse-cdn.com/v4/letter/l/f07891/32.png) [@leograyc](https://forum.hello-robot.com/u/leograyc)\
**Post date:** [August 6, 2024, 4:24am UTC](https://forum.hello-robot.com/t/stretch3-lift-arm-does-not-move-in-trajectory-mode/1061/5 "2024-08-06T04:24:09Z")

</div>

The `Traj-minimal.py` some time runs decently smooth, however sometime will trigger a dump event and drop. I assume this will happen because I didn’t have a smooth trapezoid trajectory, just a constant velocity traj from beginning. I’ve included a video below, where the arm think it’s bumpped when coming down.

When running the `stretch_trajectory_jog.py --lift` the robot was notable to complete the trajectory and failed half way.

Before both run, the robot has been left on for a couple days, and I just call the homing sequence right before running these scripts.

I have powered off the robot, let it sit for 1 minute, and re-tested these.

This time `Traj-minimal.py` runs fine, but `stretch_trajectory_jog.py --lift` still failed to go through.

---

<div class="post-metadata">

**Author:** ![bshah](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/bshah/32/55_2.png) [@bshah](https://forum.hello-robot.com/u/bshah)\
**Post date:** [August 8, 2024, 3:38am UTC](https://forum.hello-robot.com/t/stretch3-lift-arm-does-not-move-in-trajectory-mode/1061/6 "2024-08-08T03:38:23Z")

</div>

Hi @leograyc, we were able to identify the bug that was preventing the motors from tracking these trajectories correctly. The fix is released as a firmware update. Would you [update your firmware](https://docs.hello-robot.com/0.3/software/updating_software/#firmware) and see if the trajectories in `Traj-minimal.py` and `stretch_trajectory_jog.py` execute fully.

---

<div class="post-metadata">

**Author:** ![leograyc](https://avatars.discourse-cdn.com/v4/letter/l/f07891/32.png) [@leograyc](https://forum.hello-robot.com/u/leograyc)\
**Post date:** [August 9, 2024, 3:59am UTC](https://forum.hello-robot.com/t/stretch3-lift-arm-does-not-move-in-trajectory-mode/1061/7 "2024-08-09T03:59:12Z")

</div>

Thanks !

I have done a quick check, Both script are working fine now. I’ll need to do a clean build no stretch\_ros2 to check on that later.

---

<div class="post-metadata">

**Author:** ![leograyc](https://avatars.discourse-cdn.com/v4/letter/l/f07891/32.png) [@leograyc](https://forum.hello-robot.com/u/leograyc)\
**Post date:** [August 16, 2024, 12:52am UTC](https://forum.hello-robot.com/t/stretch3-lift-arm-does-not-move-in-trajectory-mode/1061/8 "2024-08-16T00:52:45Z")

</div>

So After updating the ros package, I found the issue still exists when trying to command the robot with ros action in trajectory mode. The issue will be cleared after a homing sequence. However it still pop up quite often.

And when I launch the driver, I sometime gets this error

```auto
▶ ros2 launch stretch_core stretch_driver.launch.py mode:=trajectory broadcast_odom_tf:=True
[INFO] [launch]: All log files can be found below /home/leogray/.ros/log/2024-08-15-17-47-49-556740-stretch-se3-3047-53755
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [stretch_driver-3]: process started with pid [53761]
[INFO] [joint_state_publisher-1]: process started with pid [53757]
[INFO] [robot_state_publisher-2]: process started with pid [53759]
[stretch_driver-3] [INFO] [1723769271.094701470] [stretch_driver]: For use with S T R E T C H (TM) RESEARCH EDITION from Hello Robot Inc.
[stretch_driver-3] [INFO] [1723769271.094962489] [stretch_driver]: stretch_driver started
[stretch_driver-3] Key mapped to End-Of-Arm Tool: eoa_wrist_dw3_tool_sg3
[stretch_driver-3] Caught Exception in Thread: SystemMonitorThread
[stretch_driver-3] Traceback (most recent call last):
[stretch_driver-3] File "/usr/lib/python3.10/threading.py", line 1016, in _bootstrap_inner
[stretch_driver-3] self.run()
[stretch_driver-3] File "/home/leogray/.local/lib/python3.10/site-packages/stretch_body/robot.py", line 166, in run
[stretch_driver-3] self.step()
[stretch_driver-3] File "/home/leogray/.local/lib/python3.10/site-packages/stretch_body/robot.py", line 158, in step
[stretch_driver-3] self.robot._update_trajectory_non_dynamixel()
[stretch_driver-3] File "/home/leogray/.local/lib/python3.10/site-packages/stretch_body/robot.py", line 678, in _update_trajectory_non_dynamixel
[stretch_driver-3] self.arm.update_trajectory()
[stretch_driver-3] File "/home/leogray/.local/lib/python3.10/site-packages/stretch_body/prismatic_joint.py", line 531, in update_trajectory
[stretch_driver-3] if self.traj_guarded_event!=self.motor.status['guarded_event']:
[stretch_driver-3] AttributeError: 'Arm' object has no attribute 'traj_guarded_event'

```

However, the driver didn’t crash after this, but I do get the issue of arm not moving when this show up.

---

<div class="post-metadata">

**Author:** ![leograyc](https://avatars.discourse-cdn.com/v4/letter/l/f07891/32.png) [@leograyc](https://forum.hello-robot.com/u/leograyc)\
**Post date:** [August 16, 2024, 7:23pm UTC](https://forum.hello-robot.com/t/stretch3-lift-arm-does-not-move-in-trajectory-mode/1061/9 "2024-08-16T19:23:17Z")

</div>

I also get this other issue where the base failed to move in trajectory mode

```auto
[stretch_driver-3] [WARNING] [base]: Base waypoint trajectory already active
[stretch_driver-3] -------------------------------------------
[stretch_driver-3] Errored goal
[stretch_driver-3] [INFO] [1723834396.671116196] [stretch_driver]: stretch_driver joint_traj action: hardware failed to start trajectory

```

---

<div class="post-metadata">

**Author:** ![Syu\_Kato](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/syu_kato/32/915_2.png) [@Syu\_Kato](https://forum.hello-robot.com/u/Syu_Kato)\
**Post date:** [December 30, 2024, 8:00pm UTC](https://forum.hello-robot.com/t/stretch3-lift-arm-does-not-move-in-trajectory-mode/1061/10 "2024-12-30T20:00:45Z")

</div>

Hello,  
Has this issue been resolved?  
I am also experiencing problems such as the base not moving and stuttering in the lift. I updated the firmware, but it had no effect.

---

<div class="post-metadata">

**Author:** ![leograyc](https://avatars.discourse-cdn.com/v4/letter/l/f07891/32.png) [@leograyc](https://forum.hello-robot.com/u/leograyc)\
**Post date:** [January 2, 2025, 5:13am UTC](https://forum.hello-robot.com/t/stretch3-lift-arm-does-not-move-in-trajectory-mode/1061/11 "2025-01-02T05:13:15Z")

</div>

For me, yes the problem is gone.

However it was a while back I forgot what is the exact steps. If my memory serves me correctly, firmware update for the motors are basically all it needs.

Maybe try re-home or full reboot with power cycle, the motors might not be “reset” until then.

---

<div class="post-metadata">

**Author:** ![bshah](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/bshah/32/55_2.png) [@bshah](https://forum.hello-robot.com/u/bshah)\
**Post date:** [June 4, 2025, 9:02pm UTC](https://forum.hello-robot.com/t/stretch3-lift-arm-does-not-move-in-trajectory-mode/1061/12 "2025-06-04T21:02:32Z")

</div>

Hey all, we’ve recently released a calibration tool that greatly improves the ux of trajectory mode. It works by calibrating dynamic limits for the splined trajectories, enabling the robot to accurately track feasible trajectories and reject those it’s unable to track. In addition, we’ve released a series of bug-fixes for the SDK, so the trajectory mode API, both in Python and ROS2, should be easier to use.

I think this should solve most/all the problems in this thread. Details here: [Calibrate Dynamic Limits for Reliable Trajectory Tracking](https://forum.hello-robot.com/t/calibrate-dynamic-limits-for-reliable-trajectory-tracking/1342)
