ROS2 jetson nano moveit 2 Could not find a package configuration file provided by "ament_cmake" with any of the following names:

asked 2021-06-25 00:15:42 -0500

kazu08038 gravatar image

updated 2021-06-25 07:57:08 -0500

I installed ROS2 foxy and moveit 2 packages. But, the following error occured when compiling moveit 2.

 jetbot@jetbot:~/moveit_ws$ colcon build --event-handlers desktop_notification- status- --cmake-args -DCMAKE_BUILD_TYPE=Release
Starting >>> control_msgs
Starting >>> controller_manager_msgs
--- stderr: controller_manager_msgs
CMake Error at CMakeLists.txt:12 (find_package):
  By not providing "Findament_cmake.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "ament_cmake", but CMake did not find one.

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

    ament_cmakeConfig.cmake
    ament_cmake-config.cmake

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


make: *** [cmake_check_build_system] Error 1
---
Failed   <<< controller_manager_msgs [4.75s, exited with code 2]
--- stderr: control_msgs
CMake Error at CMakeLists.txt:13 (find_package):
  By not providing "Findament_cmake.cmake" in CMAKE_MODULE_PATH this project
  has asked CMake to find a package configuration file provided by
  "ament_cmake", but CMake did not find one.

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

    ament_cmakeConfig.cmake
    ament_cmake-config.cmake

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


make: *** [cmake_check_build_system] Error 1
---
Failed   <<< control_msgs [5.42s, exited with code 2]

Summary: 0 packages finished [14.6s]
  2 packages failed: control_msgs controller_manager_msgs
  2 packages had stderr output: control_msgs controller_manager_msgs
  31 packages not processed

Does anyone know how to solve this error?

Thanks.

edit retag flag offensive close merge delete

Comments

It seems like you haven't sourced your foxy setup file

Serafadam gravatar image Serafadam  ( 2021-06-25 08:01:25 -0500 )edit

I did setup this code.

source ~/moveit_ws/install/setup.bash

But, It did not good work.

kazu08038 gravatar image kazu08038  ( 2021-06-25 21:17:27 -0500 )edit

Oh sorry, I mistook code in setup.bash file. I fixed COLCON_CURRENT_PREFIX directories.

COLCON_CURRENT_PREFIX="/home/**"

I solved this issue!

Thanks your advice.

kazu08038 gravatar image kazu08038  ( 2021-06-25 21:24:48 -0500 )edit