Controller stops working

My game controller stops working as soon as I run "stretch_robot_home.py " on the terminal. Why does this happens?

A place to start is running stretch_xbox_controller_teleop.py in the terminal after homing the robot.

If your robot is new, it may be set up to automatically launch stretch_xbox_controller_teleop on boot. Running stretch_robot_home.py might kill the teleop script when it obtains the robot object file lock.

Some more troubleshooting steps at the bottom of this page: Hello Robot! - Stretch Docs

@lamsey is correct (Thank you Matt!). Only one program can have access to the robot at a time, so there is a file lock that prevents programs from calling Stretch Body’s Robot.startup() if one is already running. With our latest OS, you’ll get an error message like Another process is already using Stretch. Try running "stretch_free_robot_process.py".

Calling stretch_robot_home.py doesn’t automatically kill the teleop script; you have to manually kill it using the stretch_free_robot_process.py tool. After homing, you can launch gamepad teleop again. Also, with our latest OS, the tool has been renamed from stretch_xbox_controller_teleop.py to stretch_gamepad_controller.py and uses a mix of position/velocity control to be more responsive than the older script was.

1 Like