How to install dependencies in docker to run packages from this course?


I hope this is the right forum category because the course I’m working on is called URDF for Robot Modeling in ROS2 and not URDF for Robot Creation in ROS2.

I just finished Unit 4 and quite a lot happened there, and the robot will probably become increasingly complex throughout the rest of the course. Therefore, I wanted to take the packages developed so far and copy them to my Docker environment with ROS2 Humble so I could test it there and also reproduce what we have done so far locally. Unfortunately, I am unable to build the packages there because of (presumably) missing dependencies. Could someone help me figure out what dependencies I need to install in order to run the packages from this course locally and, preferably, how to install them?

For starters, here’s part of the error I get when running colcon build:

--- stderr: my_box_bot_description
CMake Error at CMakeLists.txt:11 (find_package):
  By not providing "Findxacro.cmake" in CMAKE_MODULE_PATH this project has
  asked CMake to find a package configuration file provided by "xacro", but
  CMake did not find one.

  Could not find a package configuration file provided by "xacro" with any of
  the following names:


  Add the installation prefix of "xacro" to CMAKE_PREFIX_PATH or set
  "xacro_DIR" to a directory containing one of the above files.  If "xacro"
  provides a separate development package or SDK, be sure it has been

Failed   <<< my_box_bot_description [0.54s, exited with code 1]
Aborted  <<< my_robot_model [0.53s]

The xacro package doesn’t come with the Humble installation by default, you need to install it with sudo apt install ros-humble-xacro. Usually most of the errors can be fixed by installing binaries like that, note the prefix

Thank you, that helped a lot! I wasn’t sure if I could install the dependencies like this, or I need to build some github repos myself, or if they are python libraries installed with pip.

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