diff --git a/docs/assets/simulation/gazebo/worlds/moving_platform.png b/docs/assets/simulation/gazebo/worlds/moving_platform.png new file mode 100644 index 0000000000..66dc65523c Binary files /dev/null and b/docs/assets/simulation/gazebo/worlds/moving_platform.png differ diff --git a/docs/en/releases/main.md b/docs/en/releases/main.md index aca34b5e88..c075b5ca49 100644 --- a/docs/en/releases/main.md +++ b/docs/en/releases/main.md @@ -79,6 +79,7 @@ Please continue reading for [upgrade instructions](#upgrade-guide). - New vehicle model `quadtailsitter` — [Quad Tailsitter VTOL](../sim_gazebo_gz/vehicles.md#quad-tailsitter-vtol) ([PX4-Autopilot#23943](https://github.com/PX4/PX4-Autopilot/pull/23943) and [PX4-gazebo-models#65](https://github.com/PX4/PX4-gazebo-models/pull/65)). - New vehicle model `tiltrotor` — [Tiltrotor VTOL](../sim_gazebo_gz/vehicles.md#tiltrotor-vtol) ([PX4-Autopilot#24028](https://github.com/PX4/PX4-Autopilot/pull/24028) and [PX4-gazebo-models#66](https://github.com/PX4/PX4-gazebo-models/pull/66)). - [Faster than Real-time Simulation](../simulation/index.md#simulation_speed) ([PX4-Autopilot#24421](https://github.com/PX4/PX4-Autopilot/pull/24421), [PX4-Autopilot#23783](https://github.com/PX4/PX4-Autopilot/pull/23783)) + - [Moving platform simulation](../sim_gazebo_gz/worlds#moving-platform) ([PX4-Autopilot#24471](https://github.com/PX4/PX4-Autopilot/pull/24471)) ### Ethernet diff --git a/docs/en/sim_gazebo_gz/index.md b/docs/en/sim_gazebo_gz/index.md index f7af63b70a..a83b257701 100644 --- a/docs/en/sim_gazebo_gz/index.md +++ b/docs/en/sim_gazebo_gz/index.md @@ -148,15 +148,16 @@ PX4_GZ_WORLD=windy make px4_sitl gz_x500 The [supported worlds](../sim_gazebo_gz/worlds.md) are listed below. -| World | Command | Description | -| ---------- | -------------------------- | ----------------------------------------------------------- | -| `default` | `make px4_sitl *` | Empty world (a grey plane) | -| `aruco` | `make px4_sitl *_aruco` | Empty world with aruco marker for testing precision landing | -| `baylands` | `make px4_sitl *_baylands` | Baylands world surrounded by water | -| `lawn` | `make px4_sitl *_lawn` | Lawn world for testing rovers | -| `rover` | `make px4_sitl *_rover` | Rover world (optimised/preferred) | -| `walls` | `make px4_sitl *_walls` | Wall world for testing collision prevention | -| `windy` | `make px4_sitl *_windy` | Empty world with wind enabled | +| World | Command | Description | +| ----------------- | ---------------------------------- | ----------------------------------------------------------- | +| `default` | `make px4_sitl *` | Empty world (a grey plane) | +| `aruco` | `make px4_sitl *_aruco` | Empty world with aruco marker for testing precision landing | +| `baylands` | `make px4_sitl *_baylands` | Baylands world surrounded by water | +| `lawn` | `make px4_sitl *_lawn` | Lawn world for testing rovers | +| `rover` | `make px4_sitl *_rover` | Rover world (optimised/preferred) | +| `walls` | `make px4_sitl *_walls` | Wall world for testing collision prevention | +| `windy` | `make px4_sitl *_windy` | Empty world with wind enabled | +| `moving_platform` | `make px4_sitl *_moving_platform` | World with moving takeoff / landing platform | :::warning Note that if no world is specified, PX4 will use the `default` world. @@ -262,6 +263,9 @@ where `ARGS` is a list of environment variables including: - This variable is ignored if an existing simulation is already running. - This value should be [specified for the selected airframe](#adding-new-worlds-and-models) but may be overridden using this argument. + - If the [moving platform world](../sim_gazebo_gz/worlds.md#moving-platform) is selected using `PX4_GZ_WORLD=moving_platform` (or any world using the moving platform plugin), the platform can be configured using environment variables: + - `PX4_GZ_PLATFORM_VEL`: Platform speed (m/s). + - `PX4_GZ_PLATFORM_HEADING_DEG`: Platform heading and direction of velocity (degrees). 0 = east, positive direction is counterclockwise. - `PX4_SIMULATOR=GZ`: Sets the simulator, which for Gazebo must be `gz`. diff --git a/docs/en/sim_gazebo_gz/worlds.md b/docs/en/sim_gazebo_gz/worlds.md index 5307e42a5a..ef2d4206d0 100644 --- a/docs/en/sim_gazebo_gz/worlds.md +++ b/docs/en/sim_gazebo_gz/worlds.md @@ -73,6 +73,30 @@ World with walls that is designed for testing [collision prevention](../computer [PX4-gazebo-models/main/worlds/windy.sdf](https://github.com/PX4/PX4-gazebo-models/blob/main/worlds/windy.sdf) +## Moving Platform + + + +[Empty world](#default) with the addition of a flat moving platform, to simulate drone operations from moving vehicles like ships or trucks. The platform is controlled by a plugin which is included in the world. The platform is at a height of 2m, so place the vehicle on it with: + +``` +PX4_GZ_MODEL_POSE=0,0,2.2 PX4_GZ_WORLD=moving_platform make px4_sitl gz_standard_vtol +``` + +The plugin can be configured with the following environment variables: + + - `PX4_GZ_PLATFORM_VEL`: Platform speed (m/s). + - `PX4_GZ_PLATFORM_HEADING_DEG`: Platform heading and direction of velocity (degrees). 0 = east, positive direction is counterclockwise. + +[PX4-gazebo-models/main/worlds/moving_platform.sdf](https://github.com/PX4/PX4-gazebo-models/blob/main/worlds/moving_platform.sdf) + +![screenshot of moving platform world](../../assets/simulation/gazebo/worlds/moving_platform.png) + +::: tip +The moving platform plugin can also be used within other worlds. +For more information, see the plugin [README](https://github.com/PX4/PX4-Autopilot/blob/main/src/modules/simulation/gz_plugins/moving_platform_controller/README.md). +::: + ## Model Specific Worlds {#model_specific_worlds} Some [vehicle models](../sim_gazebo_gz/vehicles.md) rely on the physics / plugins of a specific world.