AWS RoboMaker
Developer Guide

Troubleshooting Colcon Build and Bundle

This section provides more information about common issues encountered when building and bundling applications with colcon. For more information about the bundle format and other technical details, see Building and Bundling a ROS Application for AWS RoboMaker on the AWS Open Source Blog.

Colcon Build Failed

See the following topics for common solutions.

Are there CMakeLists.txt files in nested folders?

If you are building a ROS1 application previously built with catkin_make, colcon may not properly enumerate all of the packages in the workspace. This is usually caused by nested folder structures with CMakeLists.txt in one or more intermediate directories. colcon supports nested folder structures and finds your packages automatically.

For example, the CMakeLists.txt in the intermediate_directory is not required:

src/ ├── package_1/ │ ├── package.xml | └── CMakeLists.txt # okay └── intermediate_directory/ ├── package_2 | ├── package.xml | └── CMakeLists.txt # okay ├── package_3 | ├── package.xml | └── CMakeLists.txt # okay └── CMakeLists.txt # !!! remove !!!

Are there missing install directives in CMakeLists.txt?

If you are building a ROS1 application previously built with catkin_make, the devel directory and its setup.sh adds all local packages into the search paths for ROS tools. colcon behaves differently. It installs the targets you specify into the install directory, so all of your CMake install() directives are executed.

If you are experiencing errors like [my_launchfile] is neither a launch file in package [my_package] nor is [my_package] a launch file name or [rosrun] Couldn't find executable named my_node below /opt/ros/$ROS_DISTRO/share/my_package, then adding calls to install() in your CMakeLists.txt might fix the issue.

For more examples on how to fix this issue, see the ROS Wiki.

Colcon Bundle Failed

See the following topics for common solutions.

Cannot Locate rosdep Definition for [package_name]

Ensure that you are using the correct ROS package name for the package you want to depend on. For example, the package might be named ros-kinetic-packagename in apt, but in your package.xml it should be packagename. Search the ROS distro GitHub repo to see if the package is in the existing rosdep database. If it is missing, add the dependency to rosdep. For more information about adding dependencies to rosdep, see the tutorials.

There are missing dependencies

Common error messages for missing dependencies include:

  • Could not load libxyz.so

  • No such file or directory some_script.py

  • Could not load module 'python_dependency'

To solve this problem, add the dependency to package.xml of the package that require it, and then retry the bundle command.

If your applications use dependencies from your own apt or pip repository, you need to include those repositories when you invoke colcon bundle. To resolve this issue, try the following:

  • Override the sources.lst used by the apt installer for colcon bundle with the --apt-sources-list argument. To avoid resolution errors for base OS and ROS packages, we recommend that you include all the sources we currently use. For more information, see examplesources.list on GitHub.

  • To override pip or pip3 sources, use --pip-args and --pip3-args arguments. The string after these arguments is passed directly to pip. For example, --extra-index-url https://my-custom-pip-repo/index.