ArduPilot / SITL_Models

Models of aircraft for SITL
70 stars 111 forks source link

Gazebo: add BiCopter model #108

Closed srmainwaring closed 6 months ago

srmainwaring commented 6 months ago

A model for a BiCopter configured for ArduPilot originally developed here: GreenPine-CK/bicopter_simulation

Ardupilot discuss thread: GAZEBO SITL, Bi-copter

gz_bicopter_ardupilot_auto

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

Run Gazebo

$ gz sim -v4 -r bicopter_runway.sdf

Run ArduPilot SITL

$ sim_vehicle.py -v ArduCopter --model JSON --add-param-file=$HOME/SITL_Models/Gazebo/config/bicopter.param --console --map

Notes

In MAVProxy the flight modes for the BiCopter appear as Plane modes, so you need to enter the Plane mode with the same index as the Copter mode you want:

For example the Copter simulation starts in STABILIZE mode which appears as MANUAL when running the bicopter.

Table: Map flight modes from Plane to Copter

# Copter Plane
0 STABILIZE MANUAL
1 ACRO CIRCLE
2 ALT_HOLD STABILIZE
3 AUTO TRAINING
4 GUIDED ACRO
5 LOITER FBWA
6 RTL FBWB
7 CIRCLE CRUISE
8 AUTOTUNE

Credits