0. 준비
가. 새로운 컴퓨터를 Ubuntu 18.04 LTS 및 ROS melodic로 셋업한 사항
1) 기본만 셋업한 상황, 외부 라이브러리 설치하지 않음
나. catkin_make 사용하지 않고 catkin build를 사용함
1) $ sudo apt install python-catkin-tools
1. 컴파일
가. 다른 컴퓨터에서 소스를 가져옴
1) 나의 경우 기존 컴퓨터에서 사용하던 소스를 가져옴
나. 새로운 컴퓨터에 소스 복사
1) $ catkin build
2. 에러 케이스 및 해결
가. CMake Error at /opt/ros/melodic/share/catkin/cmake/catkinConfig.cmake:83 (find_package):
Could not find a package configuration file provided by "serial" with any
of the following names:
serialConfig.cmake
serial-config.cmak
1) 에러 : 시리얼 장치(COM포트)를 사용하는 패키지에서 발생한 에러
2) 해결 : $ sudo apt install ros-melodic-serial
나. CMake Error at /usr/share/cmake-3.10/Modules/FindPkgConfig.cmake:649 (message):
None of the required 'libusb' found
Call Stack (most recent call first):
CMakeLists.txt:5 (pkg_search_module)
1) 에러 : libusb 라이브러리 없음
2) 해결 : $ sudo apt install libusb-dev
다. Errors << mt4n:make /home/kajuha/catkin_ws/logs/mt4n/build.make.000.log
/home/kajuha/catkin_ws/src/mt4n/src/mt4n.cpp:16:10: fatal error: modbus.h: No such file or directory
#include <modbus.h>
1) 에러 : modbus 라이브러리 없음
2) 해결 : $ sudo apt install libmodbus-dev
라. Errors << spacenav_node:make /home/kajuha/catkin_ws/logs/spacenav_node/build.make.000.log
/home/kajuha/catkin_ws/src/joystick_drivers/spacenav_node/src/spacenav_node.cpp:40:10: fatal error: spnav.h: No such file or directory
#include "spnav.h"
1) 에러 : libspnav 라이브러리(Client library for connecting to 3Dconnexion's 3D input devices) 없음
2) 해결 : $ sudo apt install libspnav-dev
마. Errors << wiimote:make /home/kajuha/catkin_ws/logs/wiimote/build.make.000.log
In file included from /home/kajuha/catkin_ws/src/joystick_drivers/wiimote/src/wiimote_controller.cpp:45:0:
/home/kajuha/catkin_ws/src/joystick_drivers/wiimote/include/wiimote/wiimote_controller.h:49:10: fatal error: bluetooth/bluetooth.h: No such file or directory
#include <bluetooth/bluetooth.h>
1) 에러 : 블루투스 라이브러리 없음
2) 해결 : $ sudo apt install libbluetooth-dev
바. Errors << wiimote:make /home/kajuha/catkin_ws/logs/wiimote/build.make.000.log
In file included from /home/kajuha/catkin_ws/src/joystick_drivers/wiimote/src/wiimote_controller.cpp:45:0:
/home/kajuha/catkin_ws/src/joystick_drivers/wiimote/include/wiimote/wiimote_controller.h:52:10: fatal error: cwiid.h: No such file or directory
#include <cwiid.h>
1) 에러 : libcwiid 라이브러리 없음
2) 해결 : $ sudo apt install libcwiid-dev
사. Errors << hector_geotiff:cmake /home/kajuha/catkin_ws/logs/hector_geotiff/build.cmake.000.log
qmake: could not find a Qt installation of ''
CMake Error at /usr/share/cmake-3.10/Modules/FindQt4.cmake:1320 (message):
Found unsuitable Qt version "" from NOTFOUND, this code requires Qt 4.x
1) 에러 : Qt 라이브러리 없음
2) 해결 : $ sudo apt install libqt4-dev