経緯
前回、参考先URLに沿ってFree-Fleetをインストールしたが、Traffic-editorが使えなかったので、環境作成からやり直した。 Humble環境でOpen-RMFをインストール後に、Free-Fleetをインストールする手順で一応、無事に完了したので手順をメモ。 ソースからビルドしようとしていたが2日間くらいハマった。時間がやたらかかるので断念してバイナリインストールの手順に切り替えて実施した。
インストールガイドに沿って手順を進める。
sudo apt update && sudo apt install \ python3-pip \ curl \ python3-colcon-mixin \ ros-dev-tools \ -y sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list' wget https://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add - python3 -m pip install flask-socketio fastapi uvicorn sudo rosdep init # run if first time using rosdep. rosdep update colcon mixin add default https://raw.githubusercontent.com/colcon/colcon-mixin-repository/master/index.yaml colcon mixin update default
「ソースからのビルド」ではなく「バイナリインストール」を選択。
sudo apt update && sudo apt install ros-humble-rmf-dev mkdir ~/rmf_ws/src -p cd ~/rmf_ws/src git clone https://github.com/open-rmf/rmf_demos.git -b 2.0.3 cd ~/rmf_ws colcon build
Free-Fleetをインストール。
git clone https://github.com/open-rmf/free_fleet -b main rm -rf ./free_fleet/free_fleet_client_ros2 cd .. source /opt/ros/humble/setup.bash rosdep install --from-paths src --ignore-src --rosdistro humble -yr colcon build --symlink-install --packages-skip-build-finished --continue-on-error --parallel-workers 4
Troubleshooting_1
ビルド時にこんな感じのエラーが出たら source /opt/ros/humble/setup.bash で解決。
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.
Troubleshooting_2
特定のパッケージのビルドをスキップしたいときは、以下のようにCOLCON_IGNOREファイルを当該Dir直下に作成するとスキップできる。
touch src/ros-visualization/COLCON_IGNORE
Troubleshooting_3
--packages-skip-build-finished:すでにビルド済みのパッケージをスキップしたいとき --parallel-workers 1:CPUが高騰して発熱でシステムが落ちるとき
colcon build --symlink-install --packages-skip-build-finished --continue-on-error --parallel-workers 1