ROS EKF 机器人位姿估计功能包:robot_pose_ekf 安装(Ubuntu20.04)
- 功能包简介
- 安装
功能包简介
robot_pose_ekf软件包用于基于来自不同来源的(部分)位姿测量值来估计机器人的3D姿势。它使用带有6D模型(3D位置和3D方向)的扩展卡尔曼滤波器,将来自车轮里程计,IMU传感器和视觉里程计的测量结果结合起来。基本思想是提供与不同传感器的松散耦合集成,其中传感器信号以ROS消息的形式接收。
安装
安装环境:ubuntu 20.04
ros版本:noetic
下载源码
git clone https://github.com/ros-planning/robot_pose_ekf
安装完成后提示:
正克隆到 ‘robot_pose_ekf’…
remote: Enumerating objects: 569, done.
remote: Counting objects: 100% (28/28), done.
remote: Compressing objects: 100% (15/15), done.
remote: Total 569 (delta 12), reused 22 (delta 12), pack-reused 541
接收对象中: 100% (569/569), 100.28 KiB | 251.00 KiB/s, 完成.
处理 delta 中: 100% (357/357), 完成.
将 robot_pose_ekf 文件夹拷贝到 ros的工作空间下,进行编译
catkin_make
– +++ processing catkin package: ‘robot_pose_ekf’
– ==> add_subdirectory(robot_pose_ekf)
– Checking for module ‘orocos-bfl’
– No package ‘orocos-bfl’ found
CMake Error at /usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:463 (message):
A required package was not found
Call Stack (most recent call first):
/usr/share/cmake-3.16/Modules/FindPkgConfig.cmake:643 (_pkg_check_modules_internal)
robot_pose_ekf/CMakeLists.txt:6 (pkg_check_modules)
有个这个报错
原因是在 robot_pose_ekf 功能包的 CMakeLists.txt 的 第6行
# bfl (Bayesian Filtering Library) is a third party package that uses pkg-config
find_package(PkgConfig)
pkg_check_modules(BFL REQUIRED orocos-bfl)
orocos-bfl 没有找到,所以报错
解决办法:
ubuntu16.04 or 18.04 :
sudo apt-get install ros-kinetic-bfl
or
sudo apt-get install ros-melodic-bfl
ubuntu20.04:sudo apt-get install ros-noetic-bfl
是不行的,需要
sudo apt-get install liborocos-bfl-dev
安装完成后提示:
准备解压 …/liborocos-bfl0.8_0.8.0-5build1_amd64.deb …
正在解压 liborocos-bfl0.8:amd64 (0.8.0-5build1) …
正在选中未选择的软件包 liborocos-bfl-dev:amd64。
准备解压 …/liborocos-bfl-dev_0.8.0-5build1_amd64.deb …
正在解压 liborocos-bfl-dev:amd64 (0.8.0-5build1) …
正在设置 liborocos-bfl0.8:amd64 (0.8.0-5build1) …
正在设置 liborocos-bfl-dev:amd64 (0.8.0-5build1) …
正在处理用于 libc-bin (2.31-0ubuntu9.9) 的触发器 …
再次对ros工作空间进行编译:
catkin_make
成功后会提示:
[100%] Linking CXX executable /home/jk-jone/jone_ws/devel/lib/robot_pose_ekf/test_robot_pose_ekf_zero_covariance
[100%] Linking CXX executable /home/jk-jone/jone_ws/devel/lib/robot_pose_ekf/test_robot_pose_ekf
[100%] Built target test_robot_pose_ekf_zero_covariance
[100%] Built target test_robot_pose_ekf
[100%] Linking CXX executable /home/jk-jone/jone_ws/devel/lib/robot_pose_ekf/robot_pose_ekf
[100%] Built target robot_pose_ekf