본문 바로가기

ROS2

[ROS2] navigation2(humble) package install & compile

1. Git Clone from ros-planning navigation2

cd ${your ros2 workspace}/src
git clone -b humble https://github.com/ros-planning/navigation2.git

2. 필요 library & package 설치 및 compile

2-1. bondcpp (requires in nav2_util)

sudo apt-get install ros-humble-bondcpp

2-2. test_interface_files (requires in test_msgs)

cd ${your ros2 workspace}/src
git clone -b humble https://github.com/ros2/test_interface_files.git
cd ../
colcon build --packages-select test_interface_files
source install/setup.bash

2-3. test_msgs (requires in nav2_util)

cd ${your ros2 workspace}/src
git clone -b humble https://github.com/ros2/rcl_interfaces.git
cd ../
colcon build --packages-select test_msgs
source install/setup.bash

2-4. GRAPHICSMAGICKPP (requires in nav2_map_server)

sudo apt-get install graphicsmagick*

2-5. BehaviorTree.CPP (requires in nav2_behavior_tree)

sudo apt-get install ros-humble-behaviortree-cpp-v3

2-6. diagnostic_updater (requires in nav2_lifecycle_manager)

cd ${your ros2 workspace}/src
git clone -b ros2 https://github.com/ros/diagnostics.git
cd ../
colcon build --packages-select diagnostic_updater
source install/setup.bash

2-7. ceres-solver (requires in nav2_constrained_smoother)

2-7-1. gflags (requires in glog)

sudo apt-get install libgflags-dev

2-7-2. glog (requires in ceres-solver)

cd ${your ros2 workspace}/src
git clone https://github.com/google/glog.git
cd ../
colcon build --packages-select glog
source install/setup.bash

2-7-3. atlas (requires in ceres-solver)

sudo apt-get install libatlas-base-dev

2-7-4. eigen3 (requires in ceres-solver)

sudo apt-get install libeigen3-dev

2-7-5. suitesparse (requires in ceres-solver)

sudo apt-get install libsuitesparse-dev

2-7-6. ceres-solver

cd ${your ros2 workspace}/src
git clone https://ceres-solver.googlesource.com/ceres-solver
mkdir ceres-bin && cd ceres-bin
cmake ..
make -j3
make test
sudo make install

2-8. ompl (requires in smac_planner)

sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list'
wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
sudo apt-get update
sudo apt-get install ros-humble-ompl

2-9. gazebo_ros_pkgs (requires in nav2_planner)

sudo apt-get install ros-humble-gazebo-ros-pkgs

2-10 xtensor (requires in nav2_mppi_controller)

sudo apt-get install xtensor-dev