6-DOF velocity command

Hello!

I’m doing a project on a ROV which is similar to BlueROV2 Heavy with Pixhawk 6C and the ArduSub firmware, based on Image Based Visual Servoing(IBVS). The command of IBVS is a 6-DOF velocity command(vx, vy, vz, roll_rate, pitch_rate, yaw_rate). Dose ArduSub able to follow the 6-DOF velocity command which is produced by IBVS controller?

Thanks for your generous reply.

Hi @953241206, welcome to the forum :slight_smile:

Overview

In short, if your vehicle has position estimates then you can use “Guided” mode and set the attitude and velocity controller targets as desired.

If you don’t have position estimates then the closest approach that is currently available would be to use “Acro” mode and send pilot-style inputs to control the motion. Note that that approach is with normalised controls that may not correlate linearly with control authority (e.g. when factoring in thrust responses, water currents, and drag).

Theoretical Context

Controlling a variable requires an estimate of its value (and/or its control authority), which usually requires some kind of sensor to provide measurements of the variable in question.

With the inertial sensors built into a flight controller board (like your Pixhawk 6C) you can estimate rotation rates with a gyroscope, and acceleration rates with an accelerometer, but there is no direct measurement of the vehicle’s velocity.

If you have external sensors that provide velocity measurements, or position measurements the velocity can be estimated from over time, then there’s a velocity estimate available that can in principle be used as a feedback mechanism in a velocity controller. Acceleration measurements can also be integrated to give a velocity estimate, but doing so requires an initial velocity to be known, and is subject to growing integration error (“drift”) over time.

Implementation Limitations

Acro: Pilot-style control

ArduSub has an “Acro” mode that uses normalised pilot inputs (see relevant MAVLink messages at the top) to try to control the rotation rates (subject to the ACRO_* paramaters and a few other constraints), and translational thrusts (which do not use feedback control, so do not adjust to compensate for environmental influences like current or drag) of the vehicle.

Guided: Target-based control (positions required)

More direct rate control is possible using ArduSub’s “Guided” mode, which mixes the attitude rate controller that’s used in “Acro” with a velocity controller for the translational movements, while also being controllable more straightforwardly via the SET_ATTITUDE_TARGET and SET_POSITION_TARGET_LOCAL_NED MAVLink messages, using the “typemask” bitmasks to control only the desired rates.

The major caveat to Guided mode is that valid position estimates are currently required to enable it. There is some ongoing work to make that requirement less strict (for people who don’t need the capability to guide to specific positions), but in the meantime if the vehicle isn’t receiving regular position updates (from a GPS, USBL, DVL, vision system, etc) it will refuse to enter guided mode.

1 Like

Thanks for your generous reply, our team will have a try to solve this problem through the method mentioned above!