ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

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

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

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

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 image zmk5  ( 2019-08-10 11:54:48 -0600 )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 image surfertas  ( 2019-08-10 19:54:05 -0600 )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 image zmk5  ( 2019-08-10 21:16:47 -0600 )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 image surfertas  ( 2019-08-10 22:56:46 -0600 )edit
1

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 image zmk5  ( 2019-08-11 01:45:25 -0600 )edit

Yes, thank you.

surfertas gravatar image surfertas  ( 2019-08-11 05:37:24 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
4

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

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

Question Tools

1 follower

Stats

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

Seen: 3,908 times

Last updated: Aug 11 '19