Combine two working models for gz sim

The copter LOITER and CIRCLE modes require throttle to be set to mid to set the climb rate to zero.

You can test this using the iris_runway.sdf example in the ardupilot_gazebo repo.

STABILIZE> LOITER
LOITER> arm throttle
LOITER> rc 3 1700
# climb to around 20m then hold position
LOITER> rc 3 1500
LOITER> CIRCLE
# reduce alt while circling
CIRCLE> rc 3 1200

The copter is set up to follow the truck trailer (this is the behaviour used in the quad-plane truck and quadplane-ship examples). See the additional params set up in the launch file (this from the quadplane, but similar for the iris):

# additional parameter file for the quadplane
cat <<EOF > sitl/quadplane/follower.param
SYSID_THISMAV 3
FOLL_ENABLE 1
FOLL_OFS_X -5
FOLL_OFS_Y 0
FOLL_OFS_Z 10
FOLL_OFS_TYPE 1
FOLL_SYSID 2
FOLL_DIST_MAX 1000
FOLL_YAW_BEHAVE 2
FOLL_ALT_TYPE 1
EOF

The idea is that the trailer (RTK) GPS is a beacon for the copter.

For your project I’d suggest the following approach:

1. take off from moving vehicle

Adapt the plane ship landing Lua script to for copters:

2. go to various waypoints relative to the ship

Switch to GUIDED, compute waypoints and use SET_POSITION_TARGET_LOCAL_NED either through mavlink or the new DDS interface which has support for external control.

3. aim the camera at a GPS location from the moving truck/ship

Not sure if the mission commands handle this in the case of the moving target?

5. land either on of aft of the aruco marker, on the moving truck/ship

Use the modified Lua script.

In summary, the takeoff and landing from the moving platform is handled on the flight controller using scripting. The camera control may need to be commanded off-board (I’m not an expert in the features available here, so would need to review options for that). Mavlink or ROS 2 / DDS in GUIDED for the external control portion.