|
| 1 | +.. _aerial_platform_multirotor_simulator: |
| 2 | + |
| 3 | +==================== |
| 4 | +Multirotor Simulator |
| 5 | +==================== |
| 6 | + |
| 7 | +.. contents:: Table of Contents |
| 8 | + :depth: 3 |
| 9 | + :local: |
| 10 | + |
| 11 | + |
| 12 | + |
| 13 | +.. _aerial_platform_multirotor_simulator_introduction: |
| 14 | + |
| 15 | +------------ |
| 16 | +Introduction |
| 17 | +------------ |
| 18 | + |
| 19 | +For simulation purposes with `Multirotor simulator <https://github.com/RPS98/multirotor_simulator>`__ , Aerostack2 provides with a platform that serves as an entry point for aerial robotics simulated in this environment. |
| 20 | + |
| 21 | + |
| 22 | +.. _aerial_platform_multirotor_simulator_installation: |
| 23 | + |
| 24 | +------------ |
| 25 | +Installation |
| 26 | +------------ |
| 27 | + |
| 28 | +* For binary installation, install by running: |
| 29 | + |
| 30 | +.. code-block:: bash |
| 31 | +
|
| 32 | + sudo apt install ros-humble-as2-platform-multirotor-simulator |
| 33 | +
|
| 34 | +.. warning:: This package is available for aerostack2 v1.1 and onwards. |
| 35 | + |
| 36 | +* For source installation, clone Aerostack2 repository into your workspace and build it. See it in :ref:`Aerostack2 installation guide <getting_started_ubuntu_installation_source>`. |
| 37 | + |
| 38 | + |
| 39 | + |
| 40 | + |
| 41 | +.. _aerial_platform_multirotor_simulator_as2_common_interface: |
| 42 | + |
| 43 | +--------------------------- |
| 44 | +Aerostack2 Common Interface |
| 45 | +--------------------------- |
| 46 | + |
| 47 | +For more details about platform control modes and sensors, see :ref:`Aerostack2 Aerial Platform Concepts <as2_concepts_aerial_platform>`. |
| 48 | + |
| 49 | + |
| 50 | + |
| 51 | +.. _aerial_platform_multirotor_simulator_as2_common_interface_control_modes: |
| 52 | + |
| 53 | +Control Modes |
| 54 | +============= |
| 55 | + |
| 56 | +These are supported control modes: |
| 57 | + |
| 58 | +.. list-table:: Control Modes Multirotor Simulator Platform |
| 59 | + :widths: 50 50 50 |
| 60 | + :header-rows: 1 |
| 61 | + |
| 62 | + * - Control Mode |
| 63 | + - Yaw Mode |
| 64 | + - Reference Frame |
| 65 | + * - Hover |
| 66 | + - None |
| 67 | + - None |
| 68 | + * - Position |
| 69 | + - Angle |
| 70 | + - ENU |
| 71 | + * - Position |
| 72 | + - Speed |
| 73 | + - ENU |
| 74 | + * - Speed |
| 75 | + - Angle |
| 76 | + - ENU |
| 77 | + * - Speed |
| 78 | + - Speed |
| 79 | + - ENU |
| 80 | + * - Trajectory |
| 81 | + - Angle |
| 82 | + - ENU |
| 83 | + * - Trajectory |
| 84 | + - Speed |
| 85 | + - ENU |
| 86 | + * - Acro |
| 87 | + - None |
| 88 | + - None |
| 89 | + |
| 90 | + |
| 91 | +.. _aerial_platform_multirotor_simulator_as2_common_interface_sensors: |
| 92 | + |
| 93 | +Sensors |
| 94 | +======= |
| 95 | + |
| 96 | +These are supported sensors: |
| 97 | + |
| 98 | +.. list-table:: Sensors Multirotor Simulator Platform |
| 99 | + :widths: 50 50 50 |
| 100 | + :header-rows: 1 |
| 101 | + |
| 102 | + * - Sensor |
| 103 | + - Topic |
| 104 | + - Type |
| 105 | + * - IMU |
| 106 | + - sensor_measurements/imu |
| 107 | + - sensor_msgs/msg/Imu |
| 108 | + * - GPS |
| 109 | + - sensor_measurements/gps |
| 110 | + - sensor_msgs/msg/NavSatFix |
| 111 | + |
| 112 | +Gimbal |
| 113 | +====== |
| 114 | + |
| 115 | +Gimbal is supported in simulation. These are the supported gimbal model types: |
| 116 | + |
| 117 | +.. list-table:: Gimbal Control Modes Multirotor Simulator Platform |
| 118 | + :widths: 50 50 50 50 |
| 119 | + :header-rows: 1 |
| 120 | + |
| 121 | + * - Gimbal type |
| 122 | + - Topic |
| 123 | + - Type |
| 124 | + - Control mode id |
| 125 | + * - gimbal_position |
| 126 | + - platform/{gimbal_name}/gimbal_command |
| 127 | + - as2_msgs/msg/GimbalControl |
| 128 | + - "0" |
| 129 | + |
| 130 | +Gimbal state is published in the following topics: |
| 131 | + |
| 132 | +.. list-table:: Gimbal State Multirotor Simulator Platform |
| 133 | + :widths: 50 50 |
| 134 | + :header-rows: 1 |
| 135 | + |
| 136 | + * - Topic |
| 137 | + - Type |
| 138 | + * - sensor_measurements/{gimbal_name} |
| 139 | + - geometry_msgs/msg/PoseStamped |
| 140 | + |
| 141 | +.. _aerial_platform_multirotor_simulator_config_simulation: |
| 142 | + |
| 143 | +----------------- |
| 144 | +Config Simulation |
| 145 | +----------------- |
| 146 | + |
| 147 | +Configuration files are located in ``as2_platform_multirotor_simulator/config/``: |
| 148 | + |
| 149 | +* ``control_modes.yaml``: available input control modes for the aerostack2 aerial platform. |
| 150 | +* ``platform_config_file.yaml``: ROS 2 configuration, with tf names, frequencies and aerostack2 parameters. |
| 151 | +* ``simulation_config.yaml``: simulation configuration, with frequency and environment parameters. |
| 152 | +* ``uav_configuav_config.yaml``: UAV configuration, with the drone's physical parameters and controller configuration. |
| 153 | +* ``world_config.yaml``: world configuration, as parameters override for each drone namespace in the configuration file. |
| 154 | + |
| 155 | + |
| 156 | +.. _aerial_platform_multirotor_simulator_platform_launch: |
| 157 | + |
| 158 | +--------------- |
| 159 | +Platform Launch |
| 160 | +--------------- |
| 161 | + |
| 162 | +Aerostack2 Multirotor Simulator platform provides two launch files: |
| 163 | + |
| 164 | +* ``as2_platform_multirotor_simulator.launch.py``: launch the platform with platform configuration file. |
| 165 | +* ``as2_platform_multirotor_simulator_world.launch.launch.py``: launch the platform with world configuration file. |
| 166 | + |
| 167 | +You can show launcher parameters by running: |
| 168 | + |
| 169 | +.. code-block:: bash |
| 170 | +
|
| 171 | + ros2 launch as2_platform_multirotor_simulator as2_platform_multirotor_simulator.launch..py --show-args |
| 172 | +
|
| 173 | +.. code-block:: bash |
| 174 | +
|
| 175 | + ros2 launch as2_platform_multirotor_simulator as2_platform_multirotor_simulator_world.launch..py --show-args |
| 176 | +
|
| 177 | +
|
| 178 | +Launcher parameters order: |
| 179 | + |
| 180 | +1. Default configuration file in ``as2_platform_multirotor_simulator/config/`` folder. |
| 181 | +2. Custom configuration file in the launch command (e.g. *platform_config_file:=path/to/file.yaml*). |
| 182 | +3. Custom parameters in the launch command (e.g. *frequency:=100*). |
| 183 | +4. Custom world configuration in the launch command (e.g. *world_config:=path/to/file.yaml*), for the world launcher. |
| 184 | + |
| 185 | +Example of launch command: |
| 186 | + |
| 187 | +.. code-block:: bash |
| 188 | +
|
| 189 | + ros2 launch as2_platform_multirotor_simulator as2_platform_multirotor_simulator.launch.py namespace:=drone0 |
| 190 | +
|
| 191 | +For launch the simulation, run the following command: |
| 192 | + |
| 193 | +.. code-block:: bash |
| 194 | +
|
| 195 | + ros2 launch as2_platform_multirotor_simulator as2_platform_multirotor_simulator_world.launch.launch.py namespace:=drone0 world_config:=config/world_config.yaml |
0 commit comments