Ubuntu 16.04+ROS kinetic 下配置 MAVROS【解决 No definition of [eigen] for OS version []等问题】

PX4英文版官网:https://dev.px4.io/en/ros/mavros_installation.html

(不要用中文版的,这里并不只有indigo和Kinect的不同,用中文版的永远也装不上)

配置过程:Source Installation方式:

mkdir -p ~/catkin_ws/src
cd ~/catkin_ws
catkin init
sudo apt-get install python-catkin-tools python-rosinstall-generator -y
wstool init src
rosinstall_generator --rosdistro kinetic mavlink | tee /tmp/mavros.rosinstall
rosinstall_generator --upstream mavros | tee -a /tmp/mavros.rosinstall
wstool merge -t src /tmp/mavros.rosinstall
wstool update -t src -j4
rosdep install --from-paths src --ignore-src -y

这里有个坑:执行上面那句之后老是弹出关于os的error

ERROR: the following packages/stacks could not have their rosdep keys resolved
to system dependencies:
ceres-solver: No definition of [eigen] for OS version []
cartographer: No definition of [eigen] for OS version []

16.04 的先执行这一句就好了:

rosdep install --from-paths src --ignore-src --rosdistro=${ROS_DISTRO} -y --os=ubuntu:xenial

 

然后: 

sudo chmod +x /src/mavros/mavros/scripts/install_geographiclib_datasets.sh
./src/mavros/mavros/scripts/install_geographiclib_datasets.sh
catkin build

这里也有一个坑:Error of catkin build: Unable to find source space ....

rm -rf ~/.catkin_tools

之后再:catkin build 又有一个坑:unavailable: no module named "future"

 pip install future

 

之后再:catkin build 应该就可以了

Ubuntu 16.04+ROS kinetic 下配置 MAVROS【解决 No definition of [eigen] for OS version []等问题】_第1张图片

折腾了两天终于成功了……


参考链接:

https://blog.csdn.net/qq_29343201/article/details/54707188

https://github.com/catkin/catkin_tools/issues/425

https://dev.px4.io/en/ros/mavros_installation.html

https://github.com/mavlink/mavros/tree/master/mavros#installation

你可能感兴趣的:(PX4开发)