[Bug] Error on the missing file on the xacro.load yaml

This is an error report.


Screenshot of the error


Error details

There is a new error on the missing Xacro.load yaml file missing from the ur_description folder which I have no idea how to fix. I fixed the command needed for it to be executed but now have this issue

I used this past post for information but after purging the file base still get this error but I also get error when doing the colcon build:

[2.686s] WARNING:colcon.colcon_core.package_selection:Some selected packages are already built in one or more underlay workspaces:
‘ur_description’ is in: /home/user/ros2_ws/install/ur_description, /home/simulations/ros2_sims_ws/install/ur_description
If a package in a merged underlay workspace is overridden and it installs headers, then all packages in the overlay must sort their include directories by workspace order. Failure to do so may result in build failures or undefined behavior at run time.
If the overridden package is used by another package in any underlay, then the overriding package in the overlaymust be API and ABI compatible or undefined behavior at run time may occur.

If you understand the risks and want to override a package anyways, add the following to the command line:
–allow-overriding ur_description

This may be promoted to an error in a future release of colcon-override-check.
Starting >>> robotiq_85_msgs
Starting >>> robotiq_85_description
Starting >>> robotnik_sensors
Starting >>> ur_description
Finished <<< robotiq_85_description [1.06s]
Finished <<< robotnik_sensors [1.06s]
Starting >>> robotnik_sensors_gazebo
Finished <<< ur_description [1.17s]
Starting >>> my_moveit2_config
Finished <<< robotnik_sensors_gazebo [0.74s]
Finished <<< my_moveit2_config [0.63s]
Finished <<< robotiq_85_msgs [2.54s]
Starting >>> robotiq_85_driver
/usr/lib/python3/dist-packages/setuptools/dist.py:723: UserWarning: Usage of dash-separated ‘script-dir’ will not be supported in future versions. Please use the underscore name ‘script_dir’ instead
warnings.warn(
/usr/lib/python3/dist-packages/setuptools/dist.py:723: UserWarning: Usage of dash-separated ‘install-scripts’ will not be supported in future versions. Please use the underscore name ‘install_scripts’ instead
warnings.warn(
— stderr: robotiq_85_driver
/usr/lib/python3/dist-packages/setuptools/dist.py:723: UserWarning: Usage of dash-separated ‘script-dir’ will not be supported in future versions. Please use the underscore name ‘script_dir’ instead
warnings.warn(
/usr/lib/python3/dist-packages/setuptools/command/install.py:34: SetuptoolsDeprecationWarning: setup.py install is deprecated. Use build and pip and other standards-based tools.
warnings.warn(

Finished <<< robotiq_85_driver [1.72s]
Starting >>> robotiq_85_gripper
Finished <<< robotiq_85_gripper [0.43s]

Summary: 8 packages finished [6.97s]
1 package had stderr output: robotiq_85_driver

I tried resetting the system but did I mess up a step I used the rm -rf command out of the whole ros2_ws work space to start clean

Hi @Agarcia5612 ,

You can fix this error by providing the following command:
You just have to copy-paste this on the same terminal where you get this error.
You have to do this after every compilation from scratch, that is, when you remove build, install and log folders before doing colcon build.

cp /home/simulations/ros2_sims_ws/install/ur_description/share/ur_description/config/initial_positions.yaml /home/simulations/ros2_sims_ws/install/ur_description/share/ur_description/urdf/initial_positions.yaml

Regards,
Girish

Hi Girish,

user@3_xterm:~/ros2_ws$ colcon build --packages-select my_moveit2_configStarting >>> my_moveit2_configFinished <<< my_moveit2_config [0.31s]

Summary: 1 package finished [1.55s]
user@3_xterm:~/ros2_ws$ source install/setup.bash
user@3_xterm:~/ros2_ws$ colcon build
Starting >>> robotiq_85_msgs
Starting >>> robotiq_85_description
Starting >>> robotnik_sensors
Starting >>> ur_description
— stderr: robotiq_85_description
Traceback (most recent call last):
File “/opt/ros/humble/share/ament_cmake_core/cmake/package_templates/templates_2_cmake.py”, line 21, in
from ament_package.templates import get_environment_hook_template_path
ModuleNotFoundError: No module named ‘ament_package’
CMake Error at /opt/ros/humble/share/ament_cmake_core/cmake/ament_cmake_package_templates-extras.cmake:41 (message):
execute_process(/usr/bin/python3.10
/opt/ros/humble/share/ament_cmake_core/cmake/package_templates/templates_2_cmake.py
/home/user/ros2_ws/build/robotiq_85_description/ament_cmake_package_templates/templates.cmake)
returned error code 1
Call Stack (most recent call first):
/opt/ros/humble/share/ament_cmake_core/cmake/ament_cmake_coreConfig.cmake:41 (include)
/opt/ros/humble/share/ament_cmake/cmake/ament_cmake_export_dependencies-extras.cmake:15 (find_package)
/opt/ros/humble/share/ament_cmake/cmake/ament_cmakeConfig.cmake:41 (include)
CMakeLists.txt:4 (find_package)

gmake: *** [Makefile:226: cmake_check_build_system] Error 1

Failed <<< robotiq_85_description [0.65s, exited with code 2]
Aborted <<< ur_description [0.59s]
Aborted <<< robotnik_sensors [0.62s]
Aborted <<< robotiq_85_msgs [0.78s]

Summary: 0 packages finished [2.11s]
1 package failed: robotiq_85_description
3 packages aborted: robotiq_85_msgs robotnik_sensors ur_description
4 packages had stderr output: robotiq_85_description robotiq_85_msgs robotnik_sensors ur_description
4 packages not processed
user@3_xterm:~/ros2_ws$

I have a new error that did not appear before when I did colcon build command which I find confusing

Hi Girish,

I retried it again it works;

  1. rm -rf the ros2_ws directory

  2. mkdir-p ros2_ws/src

  3. cp -r /home/simulations/ros2_sims_ws/src/universal_robot_ros2/Universal_Robots_ROS2_Description/ /home/user/ros2_ws/src/
    cp -r /home/simulations/ros2_sims_ws/src/universal_robot_ros2/robotiq_85_gripper/ /home/user/ros2_ws/src/
    cp -r /home/simulations/ros2_sims_ws/src/universal_robot_ros2/robotnik_sensors/ /home/user/ros2_ws/src/
    cp /home/simulations/ros2_sims_ws/install/ur_description/share/ur_description/config/initial_positions.yaml /home/simulations/ros2_sims_ws/install/ur_description/share/ur_description/urdf/initial_positions.yaml

  4. colcon build

  5. Redo the whole moveit2 package configuration

  6. then run the command for the launch file and it works thank you again

Hi @Agarcia5612 ,

There a lot of dangerous mistakes in your steps, so let me clarify them:

DO NOT DO THIS! This command will remove ALL the user created projects inside ros2_ws directory and you WILL LOSE ALL YOUR DATA.

This step is again wrong. Recreating ros2_ws/src directory will only create an empty set of folders and subfolders.

These steps are again unnecessary. You do not require those package files.

To re-build from scratch, you must remove ONLY build, install and log folders and NOT the src folder or the entire ros2_ws directory. THIS IS A HUGE MISTAKE.

From your post, I can understand that you do not have a good understanding of how ROS2 works. Please get to know that before you do uninformed actions like deleting the ros2_ws directory.

Your post is NOT A SOLUTION.

For other students who refer to this post in the future:

The steps mentioned in this post ([Bug] Error on the missing file on the xacro.load yaml - #6 by Agarcia5612) is incorrect. DO NOT FOLLOW THIS!

The only step you need to do is mentioned in this post: [Bug] Error on the missing file on the xacro.load yaml - #4 by girishkumar.kannan

Regards,
Girish

My apologies and thank you for the clarification

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.