How can I build navigation2 from source?
I have installed "ROS 2 Eloquent Elusor - Patch Release 1" from https://github.com/ros2/ros2/releases. It works well, in fact I can run the examples of publisher/listener. I want now to build navigation2 from source, but when I do it:
lorenzoteo@lorenzoteo-HP-ZBook-15v-G5:~/navigation2$ colcon build --symlink-install
Starting >>> nav2_common
Starting >>> nav_2d_msgs
Starting >>> nav2_gazebo_spawner
--- stderr: nav2_common
CMake Error at CMakeLists.txt:5 (find_package):
By not providing "Findament_cmake_core.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"ament_cmake_core", but CMake did not find one.
Could not find a package configuration file provided by "ament_cmake_core"
with any of the following names:
ament_cmake_coreConfig.cmake
ament_cmake_core-config.cmake
Add the installation prefix of "ament_cmake_core" to CMAKE_PREFIX_PATH or
set "ament_cmake_core_DIR" to a directory containing one of the above
files. If "ament_cmake_core" provides a separate development package or
SDK, be sure it has been installed.
---
Failed <<< nav2_common [ Exited with code 1 ]
Aborted <<< nav2_gazebo_spawner
--- stderr: nav_2d_msgs
CMake Error at CMakeLists.txt:4 (find_package):
By not providing "Findgeometry_msgs.cmake" in CMAKE_MODULE_PATH this
project has asked CMake to find a package configuration file provided by
"geometry_msgs", but CMake did not find one.
Could not find a package configuration file provided by "geometry_msgs"
with any of the following names:
geometry_msgsConfig.cmake
geometry_msgs-config.cmake
Add the installation prefix of "geometry_msgs" to CMAKE_PREFIX_PATH or set
"geometry_msgs_DIR" to a directory containing one of the above files. If
"geometry_msgs" provides a separate development package or SDK, be sure it
has been installed.
---
Aborted <<< nav_2d_msgs
Summary: 0 packages finished [1.04s]
1 package failed: nav2_common
2 packages aborted: nav2_gazebo_spawner nav_2d_msgs
2 packages had stderr output: nav2_common nav_2d_msgs
26 packages not processed
Why?
Have you followed instructions from here? It looks like it's not find certain ros2 packages. Have you sourced your
ros2_ws
?