# Incorrect Movement Distance with robot.base.translate\_by()

**URL:** <https://forum.hello-robot.com/t/incorrect-movement-distance-with-robot-base-translate-by/1286>\
**Category:** Ask\
**Created:** [March 20, 2025, 8:18pm UTC](https://forum.hello-robot.com/t/incorrect-movement-distance-with-robot-base-translate-by/1286 "2025-03-20T20:18:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![keshavshankar](https://avatars.discourse-cdn.com/v4/letter/k/a3d4f5/32.png) [@keshavshankar](https://forum.hello-robot.com/u/keshavshankar)\
**Post date:** [March 20, 2025, 8:18pm UTC](https://forum.hello-robot.com/t/incorrect-movement-distance-with-robot-base-translate-by/1286/1 "2025-03-20T20:18:25Z")

</div>

**I ran into an issue where the `robot.base.translate_by()` method fails to move at values larger than ~ ±1.8 meters.**

I am using this basic python script to move the robot:

> from stretch\_body.robot import Robot  
> robot = Robot()  
> robot.startup()  
> robot.base.translate\_by(DISTANCE\_VALUE\_IN\_METERS)  
> robot.push\_command()  
> robot.wait\_command()  
> robot.stop()

To test this issue, I set up a tape measure from `0m` to `3m`. The robot starts on the `0m` mark:

 ![IMG_1077](https://canada1.discourse-cdn.com/flex030/uploads/hello_robot2/original/1X/02b2cde05a4858cebdd489569d1664caf29aa218.jpeg)  
 ![Base at 0m position](https://canada1.discourse-cdn.com/flex030/uploads/hello_robot2/original/1X/7772847ff27ec23f29862ba9e5ccaa20c08b44b3.jpeg)

I then used the script to move the robot to `1m`. No problem! To confirm the value, I polled `self.robot.base.status` and received the position `(x: -8.88mm, y: 999.81mm, theta: 359.92°)`, which verifies the correct position.

 ![robot.base.translate_by(1)](https://canada1.discourse-cdn.com/flex030/uploads/hello_robot2/original/1X/74ccd6c9ee74e962a84a709044ace9f59def516b.jpeg)

I repeated this, moving the robot to `2m`. But it stops around ~`1.8m`. Once again, using the base status, the position reads `(x: -0.4mm, y: 1746.55mm, theta: 359.78°)`, which is correct.

 ![robot.base.translate_by(2)](https://canada1.discourse-cdn.com/flex030/uploads/hello_robot2/original/1X/e8417d3967ae03906b8bc86b3c970461a3df8947.jpeg)

I repeated these tests, except moved the base backward to `-1m` and `-2m` using the same script, however, the issue persists.

**Why is the robot not moving past this value? Is the `wait_command()` timing out?** On the initial look of the python class for `robot.base`, there seems to be nothing restricting translation amount.

---

<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:** [March 20, 2025, 8:35pm UTC](https://forum.hello-robot.com/t/incorrect-movement-distance-with-robot-base-translate-by/1286/2 "2025-03-20T20:35:52Z")

</div>

Hi @keshavshankar, how long does the robot take to move 1.8m? `wait_command()` has a timeout of 15s by default. An easy way to see if it is timing out is modifying the script to:

```python
from stretch_body.robot import Robot
robot = Robot()
robot.startup()
robot.base.translate_by(DISTANCE_VALUE_IN_METERS)
robot.push_command()
print("Completed!" if robot.wait_command() else "Timed out :(")
robot.stop()

```

You can increase the timeout using `wait_command(timeout=30)`

[![image](https://canada1.discourse-cdn.com/flex030/uploads/hello_robot2/original/1X/47ac7eceab8239b9b8b487c398023acd63d24b97.png)](https://github.com/hello-robot/stretch_body/blob/master/body/stretch_body/robot.py#L448)

---

<div class="post-metadata">

**Author:** ![keshavshankar](https://avatars.discourse-cdn.com/v4/letter/k/a3d4f5/32.png) [@keshavshankar](https://forum.hello-robot.com/u/keshavshankar)\
**Post date:** [March 21, 2025, 8:36pm UTC](https://forum.hello-robot.com/t/incorrect-movement-distance-with-robot-base-translate-by/1286/3 "2025-03-21T20:36:17Z")

</div>

Speeding up the robot or changing the timeout time worked. Thank you!
