Having Issues with New User in Stretch 3

Hello Hello Robot Team,

We were encountering some issues with setting up a new user in Stretch 3. After running ./stretch_new_user_install.sh We build the ament_ws src files with colcon build, but when we try to launch the stretch_driver.launch.py, we encounter an issue with permissions:

[INFO] [launch]: All log files can be found below /home/ziwei/.ros/log/2024-05-02-13-01-30-296936-stretch-se3-3009-20432
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [stretch_driver-3]: process started with pid [20438]
[INFO] [joint_state_publisher-1]: process started with pid [20434]
[INFO] [robot_state_publisher-2]: process started with pid [20436]
[stretch_driver-3] [INFO] [1714680091.426372174] [stretch_driver]: For use with S T R E T C H (TM) RESEARCH EDITION from Hello Robot Inc.
[stretch_driver-3] [INFO] [1714680091.426604877] [stretch_driver]: stretch_driver started
[stretch_driver-3] Traceback (most recent call last):
[stretch_driver-3]   File "/home/ziwei/ament_ws/install/stretch_core/lib/stretch_core/stretch_driver", line 33, in <module>
[stretch_driver-3]     sys.exit(load_entry_point('stretch-core==0.2.0', 'console_scripts', 'stretch_driver')())
[stretch_driver-3]   File "/home/ziwei/ament_ws/install/stretch_core/lib/python3.10/site-packages/stretch_core/stretch_driver.py", line 892, in main
[stretch_driver-3]     node = StretchDriver()
[stretch_driver-3]   File "/home/ziwei/ament_ws/install/stretch_core/lib/python3.10/site-packages/stretch_core/stretch_driver.py", line 79, in __init__
[stretch_driver-3]     self.ros_setup()
[stretch_driver-3]   File "/home/ziwei/ament_ws/install/stretch_core/lib/python3.10/site-packages/stretch_core/stretch_driver.py", line 716, in ros_setup
[stretch_driver-3]     self.robot = rb.Robot()
[stretch_driver-3]   File "/home/ziwei/.local/lib/python3.10/site-packages/stretch_body/robot.py", line 186, in __init__
[stretch_driver-3]     self._file_lock.acquire(timeout=1)
[stretch_driver-3]   File "/usr/lib/python3/dist-packages/filelock/_api.py", line 170, in acquire
[stretch_driver-3]     self._acquire()
[stretch_driver-3]   File "/usr/lib/python3/dist-packages/filelock/_unix.py", line 35, in _acquire
[stretch_driver-3]     fd = os.open(self._lock_file, open_mode)
[stretch_driver-3] PermissionError: [Errno 13] Permission denied: '/tmp/stretch_body_robot_pid.txt.lock'```

Hi @jehan, this seems related to this Github issue, where new users need to be set up as administrators in order to have the permissions required to run Stretch software. Could you link me to the documentation you were following to set up the new user account? Do you recall whether you set up the new account as a normal user or as an administrator?

Hi @bshah, I believe that we have set up the new user as an administrator, although we could try again to double check. Overall, we were following this documentation:

Hi @jehan, I was able to reproduce the issue you were seeing and solved it in this PR / it is released to PyPi as v0.7.13. I also updated the docs to make the instructions clearer. I recommend deleting the user you created and following the guide to create a new one:

Also, for existing users you’d like to keep (e.g. the default hello-robot account), update to v0.7.13 using:

pip3 install -U hello-robot-stretch-body