ubuntu18.04 installation kalibr crazy stepping pit record

1. Install ros corresponding to ubuntu18.04

I'm using the image Docker Hub , which contains vnc and ros

docker pull tiryoh/ros-desktop-vnc:melodic

2. Install kalibr

(1) Installation dependent environment

sudo apt-get install python-setuptools python-rosinstall ipython libeigen3-dev libboost-all-dev doxygen libopencv-dev ros-melodic-vision-opencv ros-melodic-image-transport-plugins ros-melodic-cmake-modules software-properties-common software-properties-common libpoco-dev python-matplotlib python-scipy python-git python-pip ipython libtbb-dev libblas-dev liblapack-dev python-catkin-tools libv4l-dev

The error I encountered and the solution

Install kalibr stepping on the pit 5: E: Package 'python-software-properties' has no installation candidate_Sweet early summer blog-CSDN blog

Install kalibr stepping on the pit 2: fatal error: ceres/rotation.h: No such file or directory #include “ceres/rotation.h“_Sweet early summer blog-CSDN blog

Install kalibr stepping on the pit 1: Could NOT find GTest (missing: GTEST_LIBRARY GTEST_MAIN_LIBRARY)_Sweet early summer blog-CSDN blog

sudo pip install python-igraph --upgrade

 Install kalibr stepping on the pit 3: install python-igraph and report an error - Programmer Sought

(2). Create a workspace

At first I created the workspace in a custom folder in the root directory, such as /code. Later compilation always reported strange errors, such as link errors, but after I clicked the link, the error was still reported. Later changed to ~/kalibr_workspace/src directory. Do not report this error again, please try not to change the directory

Use the -fPIC option to compile the protobuf static library libprotobuf.a - Short Book (jianshu.com)

Let’s officially start creating the workspace

mkdir -p ~/kalibr_workspace/src
cd ~/kalibr_workspace
source /opt/ros/melodic/setup.bash
catkin init
catkin config --extend /opt/ros/melodic
catkin config --merge-devel # Necessary for catkin_tools >= 0.4. catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release

(3) Download the source code

cd ~/kalibr_workspace/src
catkin build -DCMAKE_BUILD_TYPE=Release -j4

I did not report an error during the compilation process, but some friends had the problem that the suitesparse download took too long or even failed. The solution is to link ubuntu 18.04 to install kalibr (detailed steps)

 (4) Test whether the installation is successful

Download the file on the network disk, and execute the following command in the file directory

Link: https://pan.baidu.com/s/1SZM_LOsrArX09oLhmACEFA?pwd=rc4r 
Extraction code: rc4r 

source ~/kalibr_workspace/devel/setup.bash
kalibr_calibrate_imu_camera --target april_6x6.yaml --cam camchain.yaml --imu imu_adis16448.yaml --bag dynamic.bag --bag-from-to 5 45

 Most people have reached this point, and the code is considered successful if it runs through.

But I reported an error bash: kalibr_calibrate_imu_camera: command not found

 Solution: switch to the directory where kalibr_calibrate_imu_camera is located, run it by executing the python file, and it succeeds

python kalibr_calibrate_imu_camera --target april_6x6.yaml --cam camchain.yaml --imu imu_adis16448.yaml --bag dynamic.bag --bag-from-to 5 45

Reference document: Kalibr camera calibration tool installation and usage notes (zhaoxuhui.top)

Guess you like

Origin blog.csdn.net/lian740930980/article/details/126469989