-
Notifications
You must be signed in to change notification settings - Fork 38
2. Simulation
This section assumes you having completed section 1 Getting Started. It describes how to run ROScopter in simulation using Gazebo.
ROScopter Sim - Simplified Dynamics Model
This simulation does not simulate the firmware (rosflight) and does not require RC input. It has the same API as the SIL stack, and can be useful for developing high-level algorithms, however it makes some simplifying assumptions in the dynamics which reduces the fidelity of the simulation.
You can run the Gazebo simulator with
$ roslaunch roscopter_sim gazebo.launch
Make sure to push the play button in the Gazebo simulator.
ROSflight Sim - Software In The Loop
To run the rosflight SIL simulation information with the full roscopter stack, connect a joystick, transmitter, or clone and build the rosflight_joy package to use the keyboard as an RC controller.
Open the "gazebo.launch" file in "roscopter_sim/launch" folder and change this line
$ <arg name="simulation_mode" default="roscopter_sim"/>
to
$ <arg name="simulation_mode" default="rosflight_sim"/>
Then run
$ roslaunch roscopter_sim gazebo.launch
In a new terminal, callibrate the IMU
$ rosservice call /rosflight/param_set MIXER 2
$ rosservice call /rosflight/calibrate_imu
$ rosservice call /rosflight/param_set ARM_CHANNEL 5