ArduPilot / SITL_Models

Models of aircraft for SITL
82 stars 116 forks source link

Gazebo: add Blue Robotics BlueBoat #103

Closed srmainwaring closed 10 months ago

srmainwaring commented 10 months ago

Blue Robotics BlueBoat (operates as skid steer rover in ArduPilot).

blueboat_gz

Usage

Gazebo and the plugins should be installed as per the ArduPilot Gazebo Plugin instructions.

Update the GZ_SIM_RESOURCE_PATH to include these models:

export GZ_SIM_RESOURCE_PATH=$GZ_SIM_RESOURCE_PATH:\
$HOME/SITL_Models/Gazebo/models:\
$HOME/SITL_Models/Gazebo/worlds

Waves model

The model is configured to work with the hydrodynamics plugin from the wave sim package. Follow the package instructions to set up the marine simulation.

The model may be included in the waves.sdf world by adding the element:

<include>
  <pose degrees="true">0 0 0 0 0 90</pose>
  <uri>model://blueboat</uri>
</include>

Run Gazebo

gz sim -v4 -r waves.sdf

Run ArduPilot SITL

sim_vehicle.py -D -v Rover -f rover-skid --model JSON  --console --map

The default skid steer rover parameters give a workable simulation with minor modifications:

CRUISE_SPEED      2.0
CRUISE_THROTTLE   50.0
FRAME_CLASS       2.0
WP_SPEED          2.0

blueboat_gz_clip

Notes

The hull form used to model the hydrodynamics is an approximation. It has slightly more volume in the keel fins and aft, which requires the centre of mass in the simulation to be moved aft for level trim. The hull collision meshes used to calculate the buoyancy and hydrodynamics could be further refined to more closely model the true hull form at a later stage if needed.

blueboat_gz_waterline
rmackay9 commented 10 months ago

Super great stuff!