Home        Store        Docs        Blog

Depth Hold Mode


(David Ardis) #1

A few depth hold question.
When i push the depth hold button on the surface the ROV immediately dives to about 0.5m is this normal…
Can the speed of dive and surface be changed my Blue ROV When I pull back on the stick even a small amount the ROV dives quickly.

Thanks

David Ardis


(Jacob) #2

Hi David,

In depth hold mode, the minimum depth is specified by the SURFACE_DEPTH parameter (default 10cm). If you are seeing it go deeper, I would suspect that you have a non-zero depth reading while in air which is producing an offset. You can zero the depth in air from the Sensors tab on the Vehicle Setup page.

You can adjust the speed of diving with the input gain, this will also adjust the speed of other types of movement too. The gain on the ‘throttle’ (dive/ascend) channel can be scaled separately from the other channels with the JS_THR_GAIN parameter.


(David Ardis) #3

Jacob

At the moment I am diving inside concrete tanks so have the gain set to 25% for slow accurate moves. If I adjust JS_THR_GAIN is that if fixed or will the Dive/Ascend speed get faster as i increase the gain.

Can I also set the maximum depth to say 4.5m as i would like to stay 5m off the floor to stop disturbing the silt.

Thanks

David Ardis


(Jacob) #4

It works like this, the input gain will always change the scale of all channels, the JS_THR_GAIN scales the throttle gain once more relative to the overall gain.

So this is how it works:

the Dive/Ascend speed get faster as i increase the gain.

For example:

input gain = 100%, JS_THR_GAIN = 0.5, throttle channel gain = 50%
input gain = 50%, JS_THR_GAIN = 0.5, throttle channel gain = 25%

Can I also set the maximum depth to say 4.5m as i would like to stay 5m off the floor to stop disturbing the silt.

This is a feature still in development so the instructions here are subject to change in the future. To do this set the following parameters:

FENCE_ALT_MIN=-4.5 (Negative!)
FENCE_ENABLE=Enabled
FENCE_ACTION=Report Only
FENCE_TYPE=Altitude Only
FENCE_MARGIN=0


(David Ardis) #5

Jacob

Thanks for the explanation

David Ardis


(David Ardis) #6

Jacob

I Dont have a FENCE_ALT_MIN and FENCE_MARGIN cannot be set to zero the lowest is 1

David


(Jacob) #7

Hm, do you see a FENCE_DEPTH_MAX parameter? If, so you should update to ArduSub 3.5. Use a max of 3.5 + margin of 1 to limit to 4.5 m.


(David Ardis) #8

Jacob

Updated to Ardusub version 3.5 QGround control is telling me all the flight mode paremeters are mission. The Qground control version is 3.1.3 which I think is the most up to date.


(Jacob) #9

@ardisd,

Please find the most up-to-date version for use with ArduSub in the first post here.

-Jacob


(Shivam) #10

Sir we are using Bluerov2 and we are trying depth hold commands for our underwater vehicle.
we used
autopilot.set_mode(2) i.e ALT_HOLD,
but it is not maintaining its height inside water.
what is mode_id for depth_hold for bluerov2?
what is position_hold and surface_depth in mode_mapping_sub


(Patrick José Pereira) #11

@shivam,

Can you share the code that you are using ?

The mode_id for ALT_HOLD is 2.

  • surface_depth: minimum depth of the vehicle
  • position_hold: the ROV will hold the position if a ‘3D fix’ position is available