Rotors simulator ETH-ASL的无人机仿真系统安装指南
Rotors simulator ETH-ASL的无人机仿真系统安装指南
ethz的这个基于ros和gazebo的仿真环境还是相当不错的,不过安装起来bug百出(狗头.jpg)这里把踩得坑说一下。
Rotors Github
本安装说明针对 Ubuntu 16.04 ros kinetic
首先一定要下载全部依赖
首先安装ros
#ros安装完成的请忽略
$ sudo sh -c 'echo "deb http://packages.ros.org/ros/ubuntu `lsb_release -sc` main" > /etc/apt/sources.list.d/ros-latest.list'
$ wget http://packages.ros.org/ros.key -O - | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install ros-kinetic-desktop-full
$ sudo rosdep init
$ rosdep update
$ source /opt/ros/kinetic/setup.bash
下载所有的包以及项目文件
$ sudo apt-get install ros-kinetic-joy ros-kinetic-octomap-ros ros-kinetic-mavlink python-wstool python-catkin-tools protobuf-compiler libgoogle-glog-dev ros-kinetic-control-toolbox
$ mkdir -p ~/catkin_ws/src
$ cd ~/catkin_ws/src
$ catkin_init_workspace # initialize your catkin workspace
$ wstool init
$ wget https://raw.githubusercontent.com/ethz-asl/rotors_simulator/master/rotors_hil.rosinstall
$ wstool merge rotors_hil.rosinstall # download all git files
$ wstool update
build
cd ~/catkin_ws
catkin build
说实话catkin build的编译界面比catkin_make清楚好多,求大神科普一下两个区别。
Add sourcing to your .bashrc
file
$ echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
test
Launch the simulator with a hex-rotor helicopter model, in our case, the AscTec Firefly in a basic world.
$ roslaunch rotors_gazebo mav_hovering_example.launch mav_name:=firefly world_name:=basic
问题汇总
2. 出现找不到autoreconf这个问题 autoreconf not found
安装
sudo apt-get install autoconf automake libtool
3. ‘Any’ is not a member of ‘gazebo::msgs’
编译遇到这个错误,将gazebo升级就好了。
$ sudo sh -c 'echo "deb http://packages.osrfoundation.org/gazebo/ubuntu-stable `lsb_release -cs` main" > /etc/apt/sources.list.d/gazebo-stable.list'
$ wget http://packages.osrfoundation.org/gazebo.key -O - | sudo apt-key add -
$ sudo apt-get update
$ sudo apt-get install gazebo7 gazebo7-common
$ sudo apt-get install gazebo7 gazebo7-common --fix-missing
4. 出现fatal error: ignition/math/Inertial.hh: 没有那个文件或目录
原因:升级gazebo后缺少依赖库
解决:
$ sudo apt-get install libignition-math2-dev
5. ImportError: No module named future
pip2 install --user future
6. error: ‘struct mavlink::common::msg::ODOMETRY’ has no member named ‘twist_covariance’
changed twist_covariance
to velocity_covariance
in odom.cpp
file