ubuntu16.04+kinetic源码安装kalibr标定工具

1.安装ros-kinetic-desktop-full(可以去ros官网去看详细的安装说明,找到国内的源,这样安装比较快)

2.安装kalibr源码编译所需依赖项:

sudo apt-get install python-setuptools

sudo apt-get install python-setuptools python-rosinstall ipython libeigen3-dev libboost-all-dev doxygen libopencv-dev

sudo apt-get install libopencv-dev ros-kinetic-vision-opencv ros-kinetic-image-transport-plugins ros-kinetic-cmake-modules python-software-properties 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


如果在安装依赖项的过程中出现如下提示:

E: 无法获得锁 /var/lib/dpkg/lock - open (11: 资源暂时不可用)
E: 无法锁定管理目录(/var/lib/dpkg/),是否有其他进程正占用它?

解决方法:

          ---强制解锁:

sudo rm /var/cache/apt/archives/lock

sudo rm /var/lib/dpkg/lock

(可以参考网址:https://blog.csdn.net/demonliuhui/article/details/77488296   )

2创建工作空间

mkdir -p~/kalibr_workspace/src
cd ~/kalibr_workspace
source/opt/ros/indigo/setup.bash
catkin init
catkin config --extend /opt/ros/indigo
catkin config --cmake-args -DCMAKE_BUILD_TYPE=Release
编译:

cd~/kalibr_workspace/src
git clone https://github.com/ethz-asl/Kalibr.git

cd~/kalibr_workspace
catkin build -DCMAKE_BUILD_TYPE=Release -j4(根据自己电脑配置调整数值)

source~/kalibr_workspace/devel/setup.bash

----------分割线------

kalibr-CDE模式(虽然功能不全但是比较推荐这个,不会因系统版本问题产生各种错误,比价方便):

下载(需要,且最好是在windows系统下下载):https://github.com/ethz-asl/kalibr/wiki/downloads

解压即可使用(切记添加环境变量)

.bashrc文件中添加:export PATH=${PATH}:/home/../../kalibr-cde

./cde-exec kalibr_calibrate_imu_camera --target april_6x6.yaml --cam camchain.yaml --imu imu_adis16448.yaml --bag dynamic.bag --bag-from-to 5 45(以上是下载的官方提供的数据集做的测试,成功)

 

 

你可能感兴趣的:(linux,开源库学习)