Closed srmainwaring closed 2 years ago
Run on a 2013 MacBook with 8GB RAM (which is only just enough to run Ignition). A modern high-spec machine with 16+GB RAM is a must to run the example at near RT speeds.
The example should be considered very much a beta version. It depends upon development branches of Ignition and ArduPilot/ardupilot_gazebo. It has only been tested on macOS and while it should port to Ubuntu this is not guaranteed.
Ignition Garden built from source and patched to support macOS / Metal. For Ubuntu, Ignition Fortress should be sufficient - the use of Garden for macOS is for the Metal rendering support.
ArduPilot/ardupilot_gazebo - ignition-garden branch. This branch includes support for forwarding commands to Ignition topics. This is required by the Thruster system plugins used by the WAM-V. There are two options to support Fortress: 1. is to backport the changes from the ignition-garden branch to ignition-fortress, 2. is to use the CMakeLists.txt patch which selects the Ignition library versions based on the environment variable IGNITION_VERSION
which may be either fortress
or garden
. The second option is preferred.
Follow the ignition-marine
branch instructions for installing dependencies and building. If you have the dependencies, the main steps are:
$ mkdir -p ~/ign_marine_ws/src && cd ~/ign_marine_ws/src
$ git clone https://github.com/srmainwaring/asv_wave_sim -b feature/ship-landing-demo
$ export IGNITION_VERSION=garden
$ colcon build --merge-install --cmake-args -DCMAKE_BUILD_TYPE=RelWithDebInfo -DCMAKE_MACOSX_RPATH=FALSE -DCMAKE_INSTALL_NAME_DIR=$(pwd)/install/lib
Configure each terminal that will be used to run Ignition commands:
#--------------------------------------------------------------------------
# Set Ignition environment variables
export IGN_VERBOSE=0
export IGN_IP=127.0.0.1
# assuming Ignition is built from source in a colcon workspace
export IGN_CONFIG_PATH=\
$HOME/ign_fortress_ws/install/share/ignition
# location of model and world files, edit as required
export IGN_GAZEBO_RESOURCE_PATH=\
$HOME/ardupilot_gazebo/models:\
$HOME/ardupilot_gazebo/worlds:\
$HOME/SITL_Models/Ignition/models:\
$HOME/SITL_Models/Ignition/worlds:\
$HOME/ign_marine_ws/src/asv_wave_sim/ign-marine-models/models:\
$HOME/ign_marine_ws/src/asv_wave_sim/ign-marine-models/world_models:\
$HOME/ign_marine_ws/src/asv_wave_sim/ign-marine-models/worlds
# location of system plugins, edit as required
export IGN_GAZEBO_SYSTEM_PLUGIN_PATH=\
$HOME/ardupilot_gazebo/build:\
$HOME/ign_marine_ws/install/lib
#--------------------------------------------------------------------------
# Use brew version of ruby to avoid SIP issues
export PATH=/usr/local/opt/ruby/bin:$PATH
Start SITL:
# the script assumes SITL will be launched from the ardupilot root directory
$ cd ~/ardupilot
# edit the paths for the script variables: ARDUPILOT_ROOT, SITL_MODELS_DIR,
# IGN_MARINE_MODELS_DIR as required, then run the script
$ ~/ign_marine_ws/src/asv_wave_sim/ign-marine-models/launch/ship-quadplane-landing.sh
Start MAVProxy:
# the argument 2 represents the number of vehicles
$ ~/ign_marine_ws/src/asv_wave_sim/ign-marine-models/launch/mavproxy-multi-vehicle.sh 2
Remember to source the Ignition workspace and export the environment variables from the configure step above before running Ignition.
Start the server:
$ ign gazebo -v4 -s -r waves.sdf
Start the client:
$ ign gazebo -v4 -g
The two ship-landing examples are available on:
The second version is used in this presentation https://youtu.be/NY5wKlkeJAs at the ArduPilot dev conference 2022
This issue is to track adding a ship landing example using the WAM-V (scaled) and an Alti-Transition quad-plane from ArduPilot/SITL_Models. It is intended as a PoC / demo and is not intended to be merged back into the ignition-marine branch.
Example branch
https://github.com/srmainwaring/asv_wave_sim/tree/feature/ship-landing-demo
Tasks