按照官网的介绍进行安装,难度不大,记录一下
https://github.com/ethz-asl/rotors_simulator
按照下边的步骤:
1 进行安装的
$ 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 ros-kinetic-joy ros-kinetic-octomap-ros ros-kinetic-mavlink python-wstool python-catkin-tools protobuf-compiler libgoogle-glog-dev ros-kinetic-control-toolbox ros-kinetic-mavros
$ sudo rosdep init
$ rosdep update
$ source /opt/ros/kinetic/setup.bash
中间遇到一个问题:查找资料进行解决
安装rotors出现“raw.githubusercontent.com (raw.githubusercontent.com)|:😐:443… 失败:拒绝连接。“问题
2 工作区建立
$ 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
$ wstool update
截图过程中的几个图片吧

3
$ cd ~/catkin_ws/
$ catkin build
4
$ echo "source ~/catkin_ws/devel/setup.bash" >> ~/.bashrc
$ source ~/.bashrc
进行一个简单节点的测试的
roslaunch rotors_gazebo mav_hovering_example.launch mav_name:=firefly world_name:=basic
无人机模型出现了!!

过程之中出现几个问题:记录一下
问题一: catkin_make 之后出现问题
出现如下的问题,昨天晚上截图没有保存,就这样先记录着吧。 这个是gazebo版本问题,从gazebo从7.0到7.16
Gazebo版本升级7.0—>7.16(‘Any’ is not a member of ‘gazebo::msgs’)
问题二:fatal error: sdf sdf.hh: No such file or directory include sdf sdf.hh 解决办法
据说这个问题是gazebo版本更换之后,出现的问题
fatal error: sdf sdf.hh: No such file or directory include sdf sdf.hh 解决办法
运行的launch文件的场景记录的

roslaunch rotors_gazebo fixed_wing.launch

roslaunch rotors_gazebo three_multicopters_hovering_example.launch

roslaunch rotors_gazebo mav_hovering_example_with_vi_sensor.launch

本文记录了在ROS环境下安装和配置无人机模拟器rotors_simulator的过程。包括安装ROS必需组件、搭建工作区、解决常见问题等步骤,并成功展示了无人机模型在Gazebo中的运行效果。
3348

被折叠的 条评论
为什么被折叠?



