Ask Your Question
0

ROS2: issues building the composition demo found in ros2/demos

asked 2019-08-10 07:59:28 -0500

updated 2019-08-10 23:10:33 -0500

I am using ROS2 version dashing on Ubuntu 18.04.3 LTS.

I am failing to build the ros2 demos found at:

https://github.com/ros2/demos/tree/ma...

Steps to reproduce:

$ mkdir -p ros2_demos_ws/src
$ cd ros2_demos_ws/src
$ git clone https://github.com/ros2/demos

I place COLCON_IGNORE in all the folders that I want colcon to ignore (basically all the demos except the "composition" demo).

$ cd ros2_demos_ws
$ colcon build --symlink-install

Which results in the following output.

[0.192s] WARNING:colcon.colcon_ros.prefix_path.catkin:The path 
'home/ros2_example_ws/install/examples_rclcpp_minimal_action_client' in the environment variable 
CMAKE_PREFIX_PATH doesn't exist
--- stderr: composition                         
CMake Error at CMakeLists.txt:133 (find_package):
By not providing "Findlaunch_testing_ament_cmake.cmake" in
CMAKE_MODULE_PATH this project has asked CMake to find a package
configuration file provided by "launch_testing_ament_cmake", but CMake did
not find one.

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

   launch_testing_ament_cmakeConfig.cmake
   launch_testing_ament_cmake-config.cmake

 Add the installation prefix of "launch_testing_ament_cmake" to
 CMAKE_PREFIX_PATH or set "launch_testing_ament_cmake_DIR" to a directory
 containing one of the above files.  If "launch_testing_ament_cmake"
 provides a separate development package or SDK, be sure it has been
 installed.
edit retag flag offensive close merge delete

Comments

How did you install ros2 dashing? The package it is looking for is within the default installation of dashing seen here. Did you source the ros2 installation before running colcon build --symlink-install?

EDIT:

Also would you be so kind as to format above so it is more code like for future people who may have this issue?

zmk5 gravatar imagezmk5 ( 2019-08-10 11:54:48 -0500 )edit
  1. I installed following the instructions Installing ROS2 via Debian Packages

  2. Yes, after installation I set up the environment by running source /opt/ros/dashing/setup.bash.

surfertas gravatar imagesurfertas ( 2019-08-10 19:54:05 -0500 )edit
1

Try the following:

sudo apt install ros-dashing-launch*

Once the packages are installed, source your ros2 installation, and then try and build again.

zmk5 gravatar imagezmk5 ( 2019-08-10 21:16:47 -0500 )edit

The build finished successfully and the composition demo worked. Thanks for the help. Wondering why these were left out?

Running sudo apt install ros-dashing-launch* resulted in installing the following packages that weren't installed originally.

ros-dashing-launch-testing ros-dashing-launch-testing-ament-cmake ros-dashing-launch-testing-ros

Once installed, I sourced the ros2 installation:

$ . /opt/ros/dashing/setup.bash

Then ran colcon build:

$ colcon build --symlink-install

Which resulted in a warning, but build finished successfully.

[0.197s] WARNING:colcon.colcon_ros.prefix_path.ament:The path 
'/home/ros2_example_ws/install/examples_rclpy_minimal_subscriber' in the environment 
variable AMENT_PREFIX_PATH doesn't exist

Then to run the demo:

$ . install/setup.bash
$ ros2 launch composition composition_demo.launch.py
surfertas gravatar imagesurfertas ( 2019-08-10 22:56:46 -0500 )edit

Don't worry about the warning. I don't think it will apply to what you needed. The demo started properly, correct? If so, I'll make a formal answer and you can accept it for future users who may have this problem :-)

zmk5 gravatar imagezmk5 ( 2019-08-11 01:45:25 -0500 )edit

Yes, thank you.

surfertas gravatar imagesurfertas ( 2019-08-11 05:37:24 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted
1

answered 2019-08-11 11:18:55 -0500

To solve this issue, install the following packages:

sudo apt install ros-dashing-launch*

Once the packages are installed, source your ros2 installation, and then try and build again.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2019-08-10 07:59:28 -0500

Seen: 116 times

Last updated: Aug 11