Gradual rotation when with translation command only

Hello,
I’m currently working on a project using the Stretch 3 robot.
However, I’m encountering an issue when controlling Stretch 3.
Referring to the stretch_ai GitHub repository, I was able to operate the robot with the dex teleop kit.
That said, even though the Dex Teleop Kit is not supposed to perform any rotation, the robot gradually rotates when I repeatedly move it back and forth.
This issue also occurs when operating the Stretch robot without using stretch_ai and the Dex Teleop Kit, such as translate_by or set_velocity command in stretch_body.robot API.
Do you think this might be a hardware issue with the robot itself? Or is it something that can be addressed through programmatic or software configuration?

Any help would be greatly appreciated!

Hi @yuzumon_2013, welcome to the Stretch forum! I’m not sure which API is used by Dex Teleop, but I suspect it may be velocity control (via set_velocity), which could explain the gradual drifting you’re seeing. However, I’m suprised that you’re seeing gradual rotational drift when using translate_by which a position control method (that should only move forwards and backwards). Would you help me reproduce the problem by providing a small script that creates the issue and taking a video of what you see when you run it? Additionally, could you tell me the serial number of this robot?

@bshah
Thank you for your replying!

The serial number is stretch-se3-3056.

Here is a small example which we can see the problem, and a video* when this code is executed:

from stretch_body.robot import Robot

def foward_backward_loop():
    robot = Robot()
    robot.startup()
    print("Stretch is ready to go!")
    
    for _ in range(10):
        # Move forward
        print("Moving forward")
        robot.base.translate_by(0.2)
        robot.push_command()
        robot.wait_command()

        
        # Move backward
        print("Moving backward")
        robot.base.translate_by(-0.2)
        robot.push_command()
        robot.wait_command()

    robot.stop()

if __name__ == "__main__":
    foward_backward_loop()

*I could not attach video because the system of this forum prevent new users from attaching files. Then, I share the google drive link of the video.

I have realized that the issue stemmed from how the robot interacted with the carpet. As a test, we removed the carpet and ran the script on a smooth, hard floor, and under those conditions, the robot did not rotate. I apologize for taking your time and appreciate your cooperation.