Skip to content

Running Simulations with ROSflight

New to ROSflight?

If you are new to ROSflight, we recommend that you first start by setting up the simulation environment and learning to use the ROSflight ecosystem. Do this by following the installation for sim guides, and then the ROSflight tutorials.

The guides in this section assume you have already followed these tutorials.

ROSflight is a modular simulation package allowing it to perform software-in-the-loop (SIL) simulations of the ROSflight firmware.

Image of the HoloOcean multirotor sim
Image of the HoloOcean multirotor simulator in the "forest" environment.

Motivation

The goals of the ROSflight simulation module (called rosflight_sim) are to

  • Enable easy and extensive SIL testing of an aircraft,
  • Provide to the sim the exact same software that flies the physical aircraft,
  • Support a variety of simulators out of the box -- from photorealistic to bare-bones, and
  • Enable users to support their own simulator needs.

See the simulator architecture description page for more information on adding your own simulator to rosflight_sim. This page also has more information on the modular structure of rosflight_sim.

A note on sims and viz

A simulator includes many different modules, such as dynamic propagation, sensor creation, forces and moments computation, etc. One of these modules is the visualization module, that provides the graphical element to the simulator. Different visualizers provide different functionality and require different information. For example, Gazebo Classic handles the dynamic propagation (integration) for users, while a simple visualizer like RViz does not.

Since each visualizer in large part determines what other functionality the simulator modules need to provide, they are tightly coupled. Thus, in this guide, we will refer interchangeably between simulator and visualizer.

The rosflight_sim architecture has been designed to be as modular as possible in order to adapt as easily as possible to the different needs of various visualizers. See the simulation architecture page for more information.

Sims that ship with rosflight_sim

The ROSflight simulation module was designed to be as modular as possible, in order to support different simulation and visualization needs. Currently, we support 3 visualizers out-of-the-box:

The standalone sim, Gazebo sim, and HoloOcean sim guides describe each simulator in a little more detail and how to do simulator-specific configuration.

Adding your own visualizer is part of what rosflight_sim was designed for. See the instructions on adding your own visualizer page for more information on plugging in your simulator into rosflight_sim.