トラブルシューティング

よくある失敗・エラーとその対処方法についてまとめています。 対処方法が変わっていたり、追加で載せた方がよいものがあったら是非編集リクエストをお願いします!

catkin_makeに失敗する

‘catkin_make’ is currently not installed

$ catkin_make
The program 'catkin_make' is currently not installed. You can install it by typing:
sudo apt install catkin

上記のようなメッセージが出てcatkin_makeが実行できない場合があります。 setup.bashを再読み込みしてからcatkin_makeしてみてください。

ROS Kineticの場合

source /opt/ros/kinetic/setup.bash
cd ~/catkin_ws && catkin_make
source ~/catkin_ws/devel/setup.bash

ROS Melodicの場合

source /opt/ros/melodic/setup.bash
cd ~/catkin_ws && catkin_make
source ~/catkin_ws/devel/setup.bash

目的のパッケージがビルドされない

$ catkin_make
Base path: /home/ubuntu/catkin_ws
Source space: /home/ubuntu/catkin_ws/src
Build space: /home/ubuntu/catkin_ws/build
Devel space: /home/ubuntu/catkin_ws/devel
Install space: /home/ubuntu/catkin_ws/install
####
#### Running command: "make cmake_check_build_system" in "/home/ubuntu/catkin_ws/build"
####
####
#### Running command: "make -j8 -l8" in "/home/ubuntu/catkin_ws/build"
####

catkin_makeを実行しても上記のようになにもビルドせず、目的のパッケージのcatkin_makeに失敗する場合があります。 setup.bashを再読み込みしてからcatkin_makeしてみてください。

source ~/catkin_ws/devel/setup.bash
cd ~/catkin_ws && catkin_make
source ~/catkin_ws/devel/setup.bash