Unable to execute Stretch Python SDK while stretch_driver is active

Hello,

I’m having difficulties in operating both stretch functionalities through Python libraries and stretch_driver.launch at the same time. Please see image below for clarification

This is the warning I have when I run this along with ‘roslaunch stretch_core stretch_driver.launch’ in another terminal, the goal is I want to control the arm of the robot while the robot is navigating.

Can you please help me with this?

Thank you

Hi @thieulong, only one connection to the hardware can be active at a time. So when you run roslaunch stretch_core stretch_driver.launch, it has acquired the connection and put in a file lock to prevent other connections for starting. This is why you see the error: Timeout: The file lock could not be acquired.

Instead, you can write ROS nodes that control the arm through the ROS driver. The driver hosts a FollowJointTrajectory action server, which is the de facto way of controlling arms in the ROS world. You would write an action client to connect to the server and send motion goals. We have tutorial on the topic available here: Follow Joint Trajectory Commands - Stretch Documentation