# Creating new workspace error with stretch\_description

**URL:** <https://forum.hello-robot.com/t/creating-new-workspace-error-with-stretch-description/938>\
**Category:** Ask\
**Created:** [March 20, 2024, 4:43am UTC](https://forum.hello-robot.com/t/creating-new-workspace-error-with-stretch-description/938 "2024-03-20T04:43:58Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![byrnete](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/byrnete/32/648_2.png) [@byrnete](https://forum.hello-robot.com/u/byrnete)\
**Post date:** [March 20, 2024, 4:43am UTC](https://forum.hello-robot.com/t/creating-new-workspace-error-with-stretch-description/938/1 "2024-03-20T04:43:58Z")

</div>

Hi! I’ve been trying now for a few hours with no luck to create a new ament workspace on my Stretch RE1 (With Ubunto 22.04 and ROS2 and all that). I’m running this command

> ./factory/22.04/stretch\_create\_ament\_workspace.sh -w ~/space\_ws

When I run this, everything is fine up until it compiles the workspace, which then spits out this error:

> ###########################################  
> CREATING HUMBLE AMENT WORKSPACE at /home/hello-robot/space\_ws  
> ###########################################  
> Ensuring correct version of ROS is sourced…  
> Deleting /home/hello-robot/space\_wsif it already exists…  
> Creating the workspace directory…  
> Cloning the workspace’s packages…  
> Fetch ROS packages’ dependencies (this might take a while)…  
> Install web interface dependencies…  
> Generating web interface certs…  
> Compile the workspace (this might take a while)…  
> Source setup.bash file…  
> Updating port privledges…  
> Update ~/.bashrc dotfile to source workspace…  
> Updating meshes and xacros to ROS from stretch\_urdf package.  
> Setup uncalibrated robot URDF…  
> update\_uncalibrated\_urdf.py ERROR: Traceback (most recent call last):  
> File “/opt/ros/humble/local/lib/python3.10/dist-packages/xacro/ **init**.py”, line 1012, in parse  
> inp = f = open(filename)  
> FileNotFoundError: [Errno 2] No such file or directory: ‘/home/hello-robot/space\_ws/src/stretch\_ros2/stretch\_description/urdf/stretch\_description.xacro’
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):  
> File “/opt/ros/humble/local/lib/python3.10/dist-packages/xacro/ **init**.py”, line 1119, in \_process  
> doc = process\_file(input\_file\_name, \*\*opts)  
> File “/opt/ros/humble/local/lib/python3.10/dist-packages/xacro/ **init**.py”, line 1096, in process\_file  
> doc = parse(None, input\_file\_name)  
> File “/opt/ros/humble/local/lib/python3.10/dist-packages/xacro/ **init**.py”, line 1016, in parse  
> raise XacroException(e.strerror + ": " + e.filename, exc=e)  
> xacro.XacroException: No such file or directory: /home/hello-robot/space\_ws/src/stretch\_ros2/stretch\_description/urdf/stretch\_description.xacro [Errno 2] No such file or directory: ‘/home/hello-robot/space\_ws/src/stretch\_ros2/stretch\_description/urdf/stretch\_description.xacro’
> 
> During handling of the above exception, another exception occurred:
> 
> Traceback (most recent call last):  
> File “/opt/ros/humble/lib/xacro/xacro”, line 33, in   
> sys.exit(load\_entry\_point(‘xacro==2.0.8’, ‘console\_scripts’, ‘xacro’)())  
> File “/opt/ros/humble/local/lib/python3.10/dist-packages/xacro/ **init**.py”, line 1171, in main  
> \_process(input\_file\_name, vars(opts))  
> File “/opt/ros/humble/local/lib/python3.10/dist-packages/xacro/ **init**.py”, line 1124, in \_process  
> except xml.parsers.expat.ExpatError as e:  
> AttributeError: module ‘xml’ has no attribute ‘parsers’

I’m not sure if it matters, but feel its worth noting, I’m not using an Tool on the End of Arm. As such, I’ve changed the stretch\_user\_params.yaml to reflect that. I have NOT changed the urdf yet, so would that be an issue? Thanks in advance!

---

<div class="post-metadata">

**Author:** ![byrnete](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/byrnete/32/648_2.png) [@byrnete](https://forum.hello-robot.com/u/byrnete)\
**Post date:** [March 22, 2024, 11:06pm UTC](https://forum.hello-robot.com/t/creating-new-workspace-error-with-stretch-description/938/2 "2024-03-22T23:06:46Z")

</div>

Found the issue and created a new issue on the github. I’m sure it’ll be fixed in the coming days, but for anyone else having this issue, basically the script that was copying over the URDF files from the stretch\_urdf package in python had the directory to copy to hard coded to be **ament\_ws**. Which is why it works fine when creating ament\_ws during the system setup the first time and when you upgrade OS’s, but not when you create new workspaces.  
I’m not sure if this actually is an issue or anything, since I might just be missing something, but if you are having the same problem I had and they haven’t fixed the bug yet, just change line 62 of stretch\_urdf\_ros\_update.py.

/home/hello-robot/.local/bin/stretch\_urdf\_ros\_update.py:

> def verify\_ros():  
> global ros\_version, ros\_repo\_path  
> ros\_version = get\_ros\_version()
> 
> ```
> if ros_version is None:
> print("Unable to find a valid ROS Installation")
> sys.exit()
> 
> if ros_version==2:
> ros_repo_path = '/home/hello-robot/mercer_ws/src/stretch_ros2' #<---------- This line
> if not os.path.exists(ros_repo_path):
> print("Unable to find stretch_ros2 packages folder in '~/ament_ws/src/'.")
> sys.exit(1)
> else:
> ros_repo_path = '/home/hello-robot/catkin_ws/src/stretch_ros'
> if not os.path.exists(ros_repo_path):
> print("Unable to find stretch_ros packages folder in '~/catkin_ws/src/'.")
> sys.exit(1)
> 
> ```

---

<div class="post-metadata">

**Author:** ![Mohamed\_Fazil](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/mohamed_fazil/32/261_2.png) [@Mohamed\_Fazil](https://forum.hello-robot.com/u/Mohamed_Fazil)\
**Post date:** [March 24, 2024, 10:39pm UTC](https://forum.hello-robot.com/t/creating-new-workspace-error-with-stretch-description/938/3 "2024-03-24T22:39:15Z")

</div>

Hi @byrnete, Thank you so much for raising this issue. After fixing it, I can get back to you by removing the hard-coded workspace name and trying to make the script agnostic to other work spaces.

---

<div class="post-metadata">

**Author:** ![Mohamed\_Fazil](https://yyz2.discourse-cdn.com/flex030/user_avatar/forum.hello-robot.com/mohamed_fazil/32/261_2.png) [@Mohamed\_Fazil](https://forum.hello-robot.com/u/Mohamed_Fazil)\
**Post date:** [March 26, 2024, 9:45pm UTC](https://forum.hello-robot.com/t/creating-new-workspace-error-with-stretch-description/938/4 "2024-03-26T21:45:53Z")

</div>

@byrnete I have updated the script with this [commit](https://github.com/hello-robot/stretch_urdf/commit/345cd7b186396d3637403774a3b989dbc1ab29b2), which removes the hard-coded workspace. It should be able to find the stretch description package path under the stretch\_ros2 repository existing within any workspace now.  
Upgrade your Stretch URDF package

```auto
pip3 install -U hello-robot-stretch-urdf

```

Let me know if this solves your issue.
