# Pimu:trigger\_motor\_sync Warning

**URL:** <https://forum.hello-robot.com/t/pimu-trigger-motor-sync-warning/459>\
**Category:** Ask\
**Created:** [August 13, 2022, 3:41pm UTC](https://forum.hello-robot.com/t/pimu-trigger-motor-sync-warning/459 "2022-08-13T15:41:06Z")\
**Posts on this page:** 19\
**Page:** 1

<div class="post-metadata">

**Author:** ![akhilp](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/akhilp/32/442_2.png) [@akhilp](https://forum.hello-robot.com/u/akhilp)\
**Post date:** [August 13, 2022, 3:41pm UTC](https://forum.hello-robot.com/t/pimu-trigger-motor-sync-warning/459/1 "2022-08-13T15:41:06Z")

</div>

I am consistently getting the following warning and was wondering what it means and if it needs to be fixed:  
“Warning: Rate of calls to Pimu:trigger\_motor\_sync above maximum frequency of 20.00 Hz. Motor commands dropped: 1”.

The number of motor commands dropped increases over time. I’m confused why I’m getting this warning as I am only pushing commands to the robot at 10 Hz.

---

<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 15, 2022, 2:41pm UTC](https://forum.hello-robot.com/t/pimu-trigger-motor-sync-warning/459/2 "2022-08-15T14:41:49Z")

</div>

Hi @akhilp, good question! First, here’s an explanation of the warning. The power + imu (pimu) board in the robot issues motor sync pulses to each joint’s motor controller, which keeps the individual joints moving synchronously with each other. Therefore, a sync pulse is sent out for each `robot.push_command()` call from Stretch Body. The Pimu throttles the rate at which sync pulses can be issued to 20hz, so the extra pulses aren’t sent and a warning is issued every time a user script calls `robot.push_command()` faster than this rate.

In your case, it sounds like something is going wrong since you’re pushing commands at 10hz and still seeing the warning. I can look into the issue for you if you can add Python code that serves as a minimal working example of the issue. Let me know if you have any questions.

---

<div class="post-metadata">

**Author:** ![nwright](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/nwright/32/172_2.png) [@nwright](https://forum.hello-robot.com/u/nwright)\
**Post date:** [August 15, 2022, 5:44pm UTC](https://forum.hello-robot.com/t/pimu-trigger-motor-sync-warning/459/3 "2022-08-15T17:44:10Z")

</div>

I am also seeing this issue using the stretch driver in navigation mode.

---

<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 15, 2022, 10:03pm UTC](https://forum.hello-robot.com/t/pimu-trigger-motor-sync-warning/459/4 "2022-08-15T22:03:02Z")

</div>

Thanks @nwright, I’ll look into stretch driver’s nav mode and see if I can replicate the issue.

---

<div class="post-metadata">

**Author:** ![jgangemi](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@jgangemi](https://forum.hello-robot.com/u/jgangemi)\
**Post date:** [February 3, 2023, 5:33pm UTC](https://forum.hello-robot.com/t/pimu-trigger-motor-sync-warning/459/5 "2023-02-03T17:33:48Z")

</div>

Hello, I am having a similar issue Warning: Rate of calls to Pimu:trigger\_motor\_sync above maximum frequency of 80.00 Hz. Motor commands dropped: 866” when I run anything (including a calibration)

What should I do to fix this?

---

<div class="post-metadata">

**Author:** ![aedsinger](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/aedsinger/32/6_2.png) [@aedsinger](https://forum.hello-robot.com/u/aedsinger)\
**Post date:** [February 3, 2023, 6:45pm UTC](https://forum.hello-robot.com/t/pimu-trigger-motor-sync-warning/459/6 "2023-02-03T18:45:18Z")

</div>

I believe this is a bug on our end (presuming you aren’t actually sending motor commands faster than 80Hz). We’ll figure out a fix ASAP and let you know. Can you tell us a bit more:

- Do you have a Stretch RE1 or Stretch 2?
- Are you commanding the motors through the Stretch Body API or Stretch ROS?
- What firmware are you running (eg, what do you see when running `REx_firmware_updater.py --current`?

More soon!

---

<div class="post-metadata">

**Author:** ![jgangemi](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@jgangemi](https://forum.hello-robot.com/u/jgangemi)\
**Post date:** [February 6, 2023, 3:03pm UTC](https://forum.hello-robot.com/t/pimu-trigger-motor-sync-warning/459/7 "2023-02-06T15:03:42Z")

</div>

I have a Stretch 2 model and I am commanding through Stretch ROS. This is the firmware I am running:

 ![image](https://canada1.discourse-cdn.com/flex030/uploads/hello_robot2/original/1X/7778be85459e3ef0340ff1a0003b0c54e87ad018.png)  
Thank you for your help!!

---

<div class="post-metadata">

**Author:** ![aedsinger](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/aedsinger/32/6_2.png) [@aedsinger](https://forum.hello-robot.com/u/aedsinger)\
**Post date:** [February 6, 2023, 10:04pm UTC](https://forum.hello-robot.com/t/pimu-trigger-motor-sync-warning/459/8 "2023-02-06T22:04:22Z")

</div>

Hello. We have released Stretch Body v0.4.15 which should fix this issue. Please install it with:

`pip3 install -U --no-cache-dir hello-robot-stretch-body`

Details on the fix can be found with the [following PR](https://github.com/hello-robot/stretch_body/pull/166).

Let us know how it goes. Thanks!

---

<div class="post-metadata">

**Author:** ![jgangemi](https://avatars.discourse-cdn.com/v4/letter/j/8491ac/32.png) [@jgangemi](https://forum.hello-robot.com/u/jgangemi)\
**Post date:** [February 7, 2023, 4:27pm UTC](https://forum.hello-robot.com/t/pimu-trigger-motor-sync-warning/459/9 "2023-02-07T16:27:58Z")

</div>

This fixed the issue! Thank you so much!!

---

<div class="post-metadata">

**Author:** ![exhaustin](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/exhaustin/32/323_2.png) [@exhaustin](https://forum.hello-robot.com/u/exhaustin)\
**Post date:** [April 4, 2023, 12:34am UTC](https://forum.hello-robot.com/t/pimu-trigger-motor-sync-warning/459/10 "2023-04-04T00:34:24Z")

</div>

Hello!  
I am also experiencing this issue even after upgrading hello-robot-stretch-body to 0.4.30.  
I am using a Stretch RE1 and I’m commanding it by having stretch\_driver (from stretch\_ros) in navigation mode while publishing to /cmd\_vel  
Even without publishing anything I am constantly getting the error mentioned in this thread. Publishing to /cmd\_vel at 15Hz yields the exact same situation.

Here’s an example of the warnings I’ve been getting

```auto
Warning: Rate of calls to Pimu:trigger_motor_sync rate of 45.096164 above maximum frequency of 20.00 Hz. Motor commands dropped: 78
Warning: Rate of calls to Pimu:trigger_motor_sync rate of 49.509591 above maximum frequency of 20.00 Hz. Motor commands dropped: 134
Warning: Rate of calls to Pimu:trigger_motor_sync rate of 48.065641 above maximum frequency of 20.00 Hz. Motor commands dropped: 201
Warning: Rate of calls to Pimu:trigger_motor_sync rate of 111.089734 above maximum frequency of 20.00 Hz. Motor commands dropped: 270
Warning: Rate of calls to Pimu:trigger_motor_sync rate of 36.877865 above maximum frequency of 20.00 Hz. Motor commands dropped: 338
Warning: Rate of calls to Pimu:trigger_motor_sync rate of 32.484773 above maximum frequency of 20.00 Hz. Motor commands dropped: 413
Warning: Rate of calls to Pimu:trigger_motor_sync rate of 50.301668 above maximum frequency of 20.00 Hz. Motor commands dropped: 478
Warning: Rate of calls to Pimu:trigger_motor_sync rate of 40.280270 above maximum frequency of 20.00 Hz. Motor commands dropped: 549
Warning: Rate of calls to Pimu:trigger_motor_sync rate of 25.266587 above maximum frequency of 20.00 Hz. Motor commands dropped: 623
Warning: Rate of calls to Pimu:trigger_motor_sync rate of 94.430151 above maximum frequency of 20.00 Hz. Motor commands dropped: 688
Warning: Rate of calls to Pimu:trigger_motor_sync rate of 30.720525 above maximum frequency of 20.00 Hz. Motor commands dropped: 744
Warning: Rate of calls to Pimu:trigger_motor_sync rate of 52.240083 above maximum frequency of 20.00 Hz. Motor commands dropped: 814
Warning: Rate of calls to Pimu:trigger_motor_sync rate of 143.630710 above maximum frequency of 20.00 Hz. Motor commands dropped: 886
Warning: Rate of calls to Pimu:trigger_motor_sync rate of 77.267358 above maximum frequency of 20.00 Hz. Motor commands dropped: 958
Warning: Rate of calls to Pimu:trigger_motor_sync rate of 20.760901 above maximum frequency of 20.00 Hz. Motor commands dropped: 1018
Warning: Rate of calls to Pimu:trigger_motor_sync rate of 102.894880 above maximum frequency of 20.00 Hz. Motor commands dropped: 1068
Warning: Rate of calls to Pimu:trigger_motor_sync rate of 22.935987 above maximum frequency of 20.00 Hz. Motor commands dropped: 1122

```

Any help is appreciated, thanks!

---

<div class="post-metadata">

**Author:** ![aedsinger](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/aedsinger/32/6_2.png) [@aedsinger](https://forum.hello-robot.com/u/aedsinger)\
**Post date:** [April 4, 2023, 3:17pm UTC](https://forum.hello-robot.com/t/pimu-trigger-motor-sync-warning/459/11 "2023-04-04T15:17:56Z")

</div>

Hi Austin, we’ll dig in on this today and get back to you shortly.

Until then, can you run `stretch_diagnostic_check.py --simple` and then `stretch_diagnostic_check.py --zip` and then email support the zip file?

More details on Stretch Diagnostics are [here](https://forum.hello-robot.com/t/using-the-stretch-diagnostics-tool-to-debug-an-issue/633).

Thanks!

---

<div class="post-metadata">

**Author:** ![aedsinger](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/aedsinger/32/6_2.png) [@aedsinger](https://forum.hello-robot.com/u/aedsinger)\
**Post date:** [April 4, 2023, 9:20pm UTC](https://forum.hello-robot.com/t/pimu-trigger-motor-sync-warning/459/12 "2023-04-04T21:20:12Z")

</div>

We have a draft PR that should fix your issue:

> <https://github.com/hello-robot/stretch_ros/pull/96>
>
> This moves the push\_command call of Robot to single place - the main loop of str…etch\_driver. Commands can come from callbacks (eg runstop), base velocity control, or the Joint Trajectory Action server. They now depend on the main loop (executing at 15hz) to actually push the command. 
> 
> The reason for this is to avoid push\_commands that occur close together in time, which causes an issue with Pimu motor\_sync. The downside is that a joint command may wait a bit longer for the command to actually get pushed to the robot (eg, 1/15hz max).

We still have more testing to do before pushing it to stretch\_ros master. Until then, feel free to try it out:

```auto
cd ~/catkin_ws/src/stretch_ros
git checkout bugfix/push_command_sync

```

Let us know how it goes. We’ll post back here when the fix is on master.

---

<div class="post-metadata">

**Author:** ![exhaustin](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/exhaustin/32/323_2.png) [@exhaustin](https://forum.hello-robot.com/u/exhaustin)\
**Post date:** [April 5, 2023, 5:22pm UTC](https://forum.hello-robot.com/t/pimu-trigger-motor-sync-warning/459/13 "2023-04-05T17:22:25Z")

</div>

Thanks for the prompt fix. However, I am still getting the same warnings after checking out `bugfix/push_command_sync` and rebuilding stretch\_ros. For reference I am on stretch-body 0.4.30

Also, is there a way to have the main loop run faster than 15hz? According to the params in stretch\_body the maximum pimu update rate for is 20hz for Stretch RE1 and 80hz for Stretch 2. It would be ideal if it was possible to perform velocity control at higher frequencies, since that is what we are mainly using for navigation.

---

<div class="post-metadata">

**Author:** ![aedsinger](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/aedsinger/32/6_2.png) [@aedsinger](https://forum.hello-robot.com/u/aedsinger)\
**Post date:** [April 5, 2023, 6:35pm UTC](https://forum.hello-robot.com/t/pimu-trigger-motor-sync-warning/459/14 "2023-04-05T18:35:04Z")

</div>

That’s surprising. Do the errors persist if the robot is not in navigation mode?

---

<div class="post-metadata">

**Author:** ![exhaustin](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/exhaustin/32/323_2.png) [@exhaustin](https://forum.hello-robot.com/u/exhaustin)\
**Post date:** [April 6, 2023, 6:13pm UTC](https://forum.hello-robot.com/t/pimu-trigger-motor-sync-warning/459/15 "2023-04-06T18:13:57Z")

</div>

No, in position mode I don’t see the warnings at all.

---

<div class="post-metadata">

**Author:** ![aedsinger](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/aedsinger/32/6_2.png) [@aedsinger](https://forum.hello-robot.com/u/aedsinger)\
**Post date:** [April 6, 2023, 7:38pm UTC](https://forum.hello-robot.com/t/pimu-trigger-motor-sync-warning/459/16 "2023-04-06T19:38:43Z")

</div>

Thanks. We’ve been able to replicate the issue on one of our RE1 robots (but not RE2) – so we’re working on a fix.

With respect to the control rates: In theory the hardware can support higher control rates. Currently the system design limits the rates to about 15hz. We’re looking at ways to optimize the system design to allow navigation velocity control that approaches the theoretical limits. We’ll report back any progress on the Forum.

---

<div class="post-metadata">

**Author:** ![exhaustin](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/exhaustin/32/323_2.png) [@exhaustin](https://forum.hello-robot.com/u/exhaustin)\
**Post date:** [April 6, 2023, 7:57pm UTC](https://forum.hello-robot.com/t/pimu-trigger-motor-sync-warning/459/17 "2023-04-06T19:57:44Z")

</div>

I just checked out and tested the draft PR on my Stretch 2, can confirm that the warnings no longer shows up there. The warnings are only persistent on my Stretch RE1.

Thanks for looking into this, and also for the update on higher control rates!

---

<div class="post-metadata">

**Author:** ![aedsinger](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/aedsinger/32/6_2.png) [@aedsinger](https://forum.hello-robot.com/u/aedsinger)\
**Post date:** [April 6, 2023, 9:47pm UTC](https://forum.hello-robot.com/t/pimu-trigger-motor-sync-warning/459/18 "2023-04-06T21:47:30Z")

</div>

Also ideally what control rates would you like to command the base velocity at?

---

<div class="post-metadata">

**Author:** ![exhaustin](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/exhaustin/32/323_2.png) [@exhaustin](https://forum.hello-robot.com/u/exhaustin)\
**Post date:** [April 6, 2023, 11:00pm UTC](https://forum.hello-robot.com/t/pimu-trigger-motor-sync-warning/459/19 "2023-04-06T23:00:18Z")

</div>

Higher is always better :D, but given how the maximum velocity of the robot is 30cm/sec and that it would be ideal to have sub-centimeter accuracy for navigation, it would be nice to be able to control it at at least 30hz.

Of course, I know that there are limits on the acceleration, and in fact we also have our own implementation of a trapezoidal velocity profile for velocity control, but 30hz would be a good rough estimate of an upper bound where gains would be minimal once we go above that.

Thanks!
