ROS2 jetson nano moveit 2 Could not find a package configuration file provided by "ament_cmake" with any of the following names:
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.
It seems like you haven't sourced your foxy setup file
I did setup this code.
source ~/moveit_ws/install/setup.bash
But, It did not good work.
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.