# Unable to execute Stretch Python SDK while stretch\_driver is active

**URL:** <https://forum.hello-robot.com/t/unable-to-execute-stretch-python-sdk-while-stretch-driver-is-active/1062>\
**Category:** Ask\
**Created:** [July 30, 2024, 3:44am UTC](https://forum.hello-robot.com/t/unable-to-execute-stretch-python-sdk-while-stretch-driver-is-active/1062 "2024-07-30T03:44:59Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![thieulong](https://avatars.discourse-cdn.com/v4/letter/t/47e85d/32.png) [@thieulong](https://forum.hello-robot.com/u/thieulong)\
**Post date:** [July 30, 2024, 3:44am UTC](https://forum.hello-robot.com/t/unable-to-execute-stretch-python-sdk-while-stretch-driver-is-active/1062/1 "2024-07-30T03:44:59Z")

</div>

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

 ![Screenshot from 2024-07-30 13-43-17](https://canada1.discourse-cdn.com/flex030/uploads/hello_robot2/original/1X/f70ebce042e0a54c16c2db0820c9b0d054e2456b.png)

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

---

<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:** [August 1, 2024, 3:19pm UTC](https://forum.hello-robot.com/t/unable-to-execute-stretch-python-sdk-while-stretch-driver-is-active/1062/2 "2024-08-01T15:19:43Z")

</div>

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](https://wiki.ros.org/actionlib_tutorials/Tutorials/SimpleActionClient) to connect to the server and send motion goals. We have tutorial on the topic available here: [Follow Joint Trajectory Commands - Stretch Documentation](https://docs.hello-robot.com/0.2/stretch-tutorials/ros1/follow_joint_trajectory/)
