Multirotor Simulator

Introduction

For simulation purposes with Multirotor simulator , Aerostack2 provides with a platform that serves as an entry point for aerial robotics simulated in this environment.

Installation

  • For binary installation, install by running:

sudo apt install ros-humble-as2-platform-multirotor-simulator

Warning

This package is available for aerostack2 v1.1 and onwards.

Aerostack2 Common Interface

For more details about platform control modes and sensors, see Aerostack2 Aerial Platform Concepts.

Control Modes

These are supported control modes:

Control Modes Multirotor Simulator Platform

Control Mode

Yaw Mode

Reference Frame

Hover

None

None

Position

Angle

ENU

Position

Speed

ENU

Speed

Angle

ENU

Speed

Speed

ENU

Trajectory

Angle

ENU

Trajectory

Speed

ENU

Acro

None

None

Sensors

These are supported sensors:

Sensors Multirotor Simulator Platform

Sensor

Topic

Type

IMU

sensor_measurements/imu

sensor_msgs/msg/Imu

GPS

sensor_measurements/gps

sensor_msgs/msg/NavSatFix

Gimbal

Gimbal is supported in simulation. These are the supported gimbal model types:

Gimbal Control Modes Multirotor Simulator Platform

Gimbal type

Topic

Type

Control mode id

gimbal_position

platform/{gimbal_name}/gimbal_command

as2_msgs/msg/GimbalControl

“0”

Gimbal state is published in the following topics:

Gimbal State Multirotor Simulator Platform

Topic

Type

sensor_measurements/{gimbal_name}

geometry_msgs/msg/PoseStamped

Config Simulation

Configuration files are located in as2_platform_multirotor_simulator/config/:

  • control_modes.yaml: available input control modes for the aerostack2 aerial platform.

  • platform_config_file.yaml: ROS 2 configuration, with tf names, frequencies and aerostack2 parameters.

  • simulation_config.yaml: simulation configuration, with frequency and environment parameters.

  • uav_configuav_config.yaml: UAV configuration, with the drone’s physical parameters and controller configuration.

  • world_config.yaml: world configuration, as parameters override for each drone namespace in the configuration file.

Platform Launch

Aerostack2 Multirotor Simulator platform provides two launch files:

  • as2_platform_multirotor_simulator.launch.py: launch the platform with platform configuration file.

  • as2_platform_multirotor_simulator_world.launch.launch.py: launch the platform with world configuration file.

You can show launcher parameters by running:

ros2 launch as2_platform_multirotor_simulator as2_platform_multirotor_simulator.launch..py --show-args
ros2 launch as2_platform_multirotor_simulator as2_platform_multirotor_simulator_world.launch..py --show-args

Launcher parameters order:

  1. Default configuration file in as2_platform_multirotor_simulator/config/ folder.

  2. Custom configuration file in the launch command (e.g. platform_config_file:=path/to/file.yaml).

  3. Custom parameters in the launch command (e.g. frequency:=100).

  4. Custom world configuration in the launch command (e.g. world_config:=path/to/file.yaml), for the world launcher.

Example of launch command:

ros2 launch as2_platform_multirotor_simulator as2_platform_multirotor_simulator.launch.py namespace:=drone0

For launch the simulation, run the following command:

ros2 launch as2_platform_multirotor_simulator as2_platform_multirotor_simulator_world.launch.launch.py namespace:=drone0 world_config:=config/world_config.yaml