# Question about the base.translate\_by() and rotate\_by() function?

**URL:** https://forum.hello-robot.com/t/question-about-the-base-translate-by-and-rotate-by-function/997
**Category:** Ask
**Created:** [June 1, 2024, 6:55pm UTC](https://forum.hello-robot.com/t/question-about-the-base-translate-by-and-rotate-by-function/997 "2024-06-01T18:55:33Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Hanxiao\_Jiang](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/hanxiao_jiang/32/739_2.png) [@Hanxiao\_Jiang](https://forum.hello-robot.com/u/Hanxiao_Jiang)
#### Post date: [June 1, 2024, 6:55pm UTC](https://forum.hello-robot.com/t/question-about-the-base-translate-by-and-rotate-by-function/997/1 "2024-06-01T18:55:33Z")

</div>

Hi,

I’m new to the stretch robot, and currently my codebase is built on the stretch\_body python API. I find a strange thing and cannot find relevant materials. When I call base.translate\_by(), and then call push\_command() and wait\_command(). The wait\_command cannot actually wait till the movement done. I check the code of wait\_command function, it truly call the wait function for the base. Currently I’m a bit confused. Is this a bug or some feature I ignore?

---

<div class="post-metadata">

### Author: ![Mohamed\_Fazil](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/mohamed_fazil/32/261_2.png) [@Mohamed\_Fazil](https://forum.hello-robot.com/u/Mohamed_Fazil)
#### Post date: [June 3, 2024, 5:51pm UTC](https://forum.hello-robot.com/t/question-about-the-base-translate-by-and-rotate-by-function/997/2 "2024-06-03T17:51:23Z")

</div>

Hi @Hanxiao_Jiang, Thank you for reporting this issue. Would you also share the Stretch Body version and firmware version your robot is installed with so we can try to reproduce it? In the meantime, I can update you on our findings/bug fixes for this issue you are facing.

---

<div class="post-metadata">

### Author: ![Hanxiao\_Jiang](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/hanxiao_jiang/32/739_2.png) [@Hanxiao\_Jiang](https://forum.hello-robot.com/u/Hanxiao_Jiang)
#### Post date: [June 3, 2024, 6:18pm UTC](https://forum.hello-robot.com/t/question-about-the-base-translate-by-and-rotate-by-function/997/3 "2024-06-03T18:18:59Z")

</div>

Hi, thanks for the reply. Potentially I find the problem. When I visualize something using the open3D, I find that the stretch body will report some warnging that some part is timeout. Then in the following code, that part cannot perform correctly. Maybe this is related to the multiprocessing problem in python? Do I understand correctly or I have some misunderstanding?

---

<div class="post-metadata">

### Author: ![Mohamed\_Fazil](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/mohamed_fazil/32/261_2.png) [@Mohamed\_Fazil](https://forum.hello-robot.com/u/Mohamed_Fazil)
#### Post date: [June 3, 2024, 6:48pm UTC](https://forum.hello-robot.com/t/question-about-the-base-translate-by-and-rotate-by-function/997/4 "2024-06-03T18:48:20Z")

</div>

Can you post some error outputs here for us to examine? We use multiprocessing with Stretch Body, but we haven’t seen it cause any functional issues previously.

---

<div class="post-metadata">

### Author: ![Mohamed\_Fazil](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/mohamed_fazil/32/261_2.png) [@Mohamed\_Fazil](https://forum.hello-robot.com/u/Mohamed_Fazil)
#### Post date: [July 15, 2024, 7:04pm UTC](https://forum.hello-robot.com/t/question-about-the-base-translate-by-and-rotate-by-function/997/5 "2024-07-15T19:04:34Z")

</div>

Hi @Hanxiao_Jiang, we recently fixed the issue with the wait\_command(). You can upgrade to the latest Stretch Body to resolve this issue.

> <https://github.com/hello-robot/stretch_body/pull/341>
>
> This PR fixes the issue with the \`Robot.wait\_command()\`, which polls until all t…he joints have stopped after executing motion on multiple robot joints using \`Robot.push\_command()\`. 
> \- As stated in this issue https://github.com/hello-robot/stretch\_body/issues/321 previously, the wait command fails to poll until all the robot joints have completed the motion and returns too quickly or inaccurately. The reason for this issue was because of using \`is\_moving\` / \`is\_moving\_filter\` boolean status flag to poll. \`is\_moving\` is generated by applying velocity thresholds, which was observed to be very noisy irrespective of the applying smoothing filter which further added in-accuracy.
> \- The above issue is fixed using the \`is\_moving\_mg\` boolean flag instead, which is set by the stepper firmware's motion generator handle when the motor tracks a command. This works reliably and aligns well with the expected use case of \`Robot.wait\_command()\`.
> \- This PR also introduces the new argument \`use\_motion\_generator\` to the \`Robot.wait\_command()\` set to True by default. If users want to use velocity thresholds instead of motion generators to poll, they can set this argument to false. (This might be helpful in niche cases where a user wants to poll until back-driving the robot is completed)
> \- Run the test script \[test\_wait\_command.py\](https://github.com/hello-robot/stretch\_body/blob/bugfix/wait\_command/body/test/test\_wait\_command.py) which will validate the working of the Robot.wait\_command().
