Years ago, I had been doing research with surface vessels that were based off of the USV for gazebo_boat inside the simulator. This was back when the repo was “Firmware” instead of PX4-Autopilot if that gives you a sense of timing. Covid happened and research priorities changed.
I see the simulator has been removed with upgrade to the latest version of gazebo. Before trying to sort out the different alternatives for writing a new simulation, I wanted to see if there was an “easy” port between the two. Thanks in advance.
The original boat simulation was part of the Gazebo Classic integration. The old USV target is still documented as:
make px4_sitl gazebo-classic_boat
However, I couldn’t find an equivalent ready-to-use gz_boat target in the current PX4 Gazebo documentation.
The good news is that you may not need to rebuild the entire simulation from scratch.
I would approach the migration in three parts:
Vehicle model: Reuse the existing SDF geometry, collision definitions, mass properties and inertial parameters wherever compatible.
Marine dynamics: Identify which Gazebo Classic plugins provide buoyancy, hydrodynamic forces and propulsion. These may require replacement or porting to the newer Gazebo system-plugin architecture.
PX4 integration: Adapt the simulator interface, actuator mapping and vehicle startup configuration to the current PX4 Gazebo integration.
PX4 also documents how to add custom models and worlds to the newer Gazebo simulation environment.
Before recommending a specific migration path, could you share:
The PX4/Firmware version or commit you originally used.
Whether your USV model was the stock gazebo_boat model or a modified version.
Whether you need realistic hydrodynamics and wave simulation, or primarily navigation and controller testing.
With that information, we could determine whether a lightweight model port is sufficient or whether the original marine plugins need to be migrated.
Thanks for the reply. I anticipated being able to pull in the vehicle model. The marine dynamics were what I’m concerned about along with the PX4 stuff. I saw the work on custom models etc. but one of the great benefits originally was that this was pretty much plug-and-play
I have no idea which version it was. Likely the version that was live in Dec. 2022
Stock version of gazebo_boat
Realistic hydrodynamics for navigation and controller testing. I don’t need waves but I do need hydrodynamic responses to be somewhat accurate for the work I’m doing.
Thanks for clarifying. That helps narrow down the problem considerably.
Since you used the stock gazebo_boat model around December 2022 and primarily need realistic hydrodynamic responses for navigation and controller testing, I think there is a promising alternative to porting the entire old Gazebo Classic implementation.
Modern Gazebo already provides native marine simulation components:
Buoyancy for flotation.
Hydrodynamics for added mass and hydrodynamic damping.
Thruster for propulsion.
LiftDrag where appropriate for control surfaces.
There is also an official Gazebo example, auv_controls.sdf, demonstrating several of these components together.
Reference:
Example:
Given your requirements, I would suggest:
Recover the original stock boat model and its physical parameters.
Reuse the geometry, mass properties and actuator arrangement.
Replace the Gazebo Classic marine physics with the corresponding Gazebo Sim systems.
Establish the actuator and sensor interface with the current PX4 SITL integration.
Validate straight-line acceleration, turning response, stopping distance and yaw-rate behavior.
Since wave simulation is not required, we can initially focus on calm-water dynamics. That should reduce the migration effort.
One important consideration is that the built-in hydrodynamics components still require appropriate coefficients. They provide the simulation framework, but realistic behavior depends on parameter calibration.
I haven’t verified a complete plug-and-play PX4 boat configuration for modern Gazebo, so I wouldn’t want to suggest that this is simply a matter of changing the simulation target.
However, I think the existing Gazebo marine systems offer a practical route that avoids rewriting the hydrodynamics engine from scratch.
If you’re interested, we could investigate the original stock model and identify the minimum changes needed for a reusable PX4/Gazebo USV configuration.