RotorS Simulator Installation
Last updated
Last updated
RotorS is a MAV gazebo simulator. It provides some multirotor models such as the , the , or the , but the simulator is not limited for the use with these multicopters.
There are simulated sensors coming with the simulator such as an IMU, a generic odometry sensor, and the , which can be mounted on the multirotor.
This package also contains some example controllers, basic worlds, a joystick interface, and example launch files.
Below we provide the instructions necessary for getting started. See RotorS' wiki for more instructions and examples (https://github.com/ethz-asl/rotors_simulator/wiki).
Github链接 :
切换到工作目录下,catkin_make
每次出错最好将devel
和build
两个目录都删除,在重新catkin_make
错误描述
原因及解决方案
错误提示说明缺少依赖包octomap_ros
,XXX_XXXConfig.cmake
为错误提示内容组成,包名即XXX_XXX
,eg : octomap_rosConfig.cmake
的包名为octomap_ros
。而在shell命令中,需要在前面加上 ros-kinetic
(ros-安装的ros版本
),然后用连字符 -
替换下划线 _
,即 ros-kinetic-octomap-ros
,安装完成即可:
错误描述
解决方案
错误描述
原因及解决
缺少protobuf-compiler
编译器,使用如下命令安装即可
输入以下命令,打开gazebo
加载模型和世界:
有一些基本的启动文件,可以加载带有其他传感器的不同多旋翼飞行器。在WORKSPACE_PATH/src/rotors_simulator/rotors_gazebo/launch
中找到。
可以修改world_name
后的参数加载新场景,可以在WORKSPACE_PATH/src/rotors_simulator/rotors_gazebo/worlds
下找到其他的场景;
There are some basic launch files where you can load the different multicopters with additional sensors. They can all be found in
~/catkin_ws/src/rotors_simulator/rotors_gazebo/launch
.The
world_name
argument looks for a .world file with a corresponding name in~/catkin_ws/src/rotors_simulator/rotors_gazebo/worlds
. By default, all launch files, with the exception of those that have the world name explicitly included in the file name, use the empty world described inbasic.world
.
运行事件
The simulator starts by default in paused mode. To start it you can either
use the Gazebo GUI and press the play button
or you can send the following service call.
运行结果如下:
使用rostopic
查看当前发布的话题:
其中/firefly/command/pose
为无人机位置信息话题,可以通过rostopic pub 话题名 消息类型 消息内容
,发布新消息,以控制无人机移动:
这表明设置的新位置为 (1.0, 1.0, 1.0),-1
表示发布一次消息后退出。
虽然场景可以启动,但可能仍有依赖未安装,如源代码中python用到的一些三方库。