Position Hold won't function as expected

When switching to Position Hold (with 16 available satelites) my platform freaks out and goes to one direction full power or when I try to use my controller the platform just freaks out.
What’s the logic behind this mod? Shouldn’t the position where you activate the mod be the position it holds and then as you move the controller’s stick the hold moves to the new position resiting the flow that comes from each direction to hold in place?

Thanks in advance.

Bump,
I would appreciate if someone can explain how does this mod work (program wise explanation would be amazing!)

Hi!

Yes, your reasoning is correct. This behavior is weird. Try settings the LOG_BITMASK so it logs the PIDs and share a log here.

Meanwhile, you could try lowering the position controller gains to check if the issue persists.
Trying both Ardusub 4.0.3 and 3.5.4 would also be worthwhile.

What is your ROV like? I believe this mode is mostly used with a DVL.

I’ll do it, the ROV I want to build will be on the bottom of a pool/sea but right now I test the concept in the air, hanged.
I scripted a 4 motors (no altitude control) build relaying on the Vectored ROV veachile frame (without motor 5 and 6 which are alt control motors)
And I want to use the pos hold mod to resist air/water flow to hold the current given/moved location(again, the altitude is not related nor controlled in this product)
I currently use a here 2 as a gps and orange cube as the FC & tbs transciever for comms (for this stage).
Do you have any idea from what I described to why it does not work? (I’ll get to uploading the log asap)

Position hold includes Attitude and Altitude controllers. It may be trying to correct attitude.

The GPS position may also be not good enough for your tests. How much room does it have to move?

is it trying to correct ALTITUDE or ATTITUDE? because it looks like it’s trying to fix ALTITUDE from what I saw.
It is hanged with a 2.5m rope to the ceiling with about a meter or meter and a half radius of movement
I attached the log in this message. I’ve started with Position hold and then moved to Stabilized mod which works almost perfectly (I wish the motors would aspire to stop working when there is no resistance of wind/water flow).
log_22_2021-4-13-17-03-20.bin (3.2 MB)

Is the ceiling in the way of GPS signals? I’m not sure GPS alone is good enough for maintaining position in a 3 m circle, especially if there is a ceiling in the way of GPS reception.

You can try setting the Attitude AND altitude PIDs to zero to leave only the psc_xy factors.
Also keep in mind that the position controller is a 3-layer controller, with an acceleration P controller, a Velocity PID, and an external Position P controller.

Actually both. It tries to stay level, and at the same 3D position.

Would you recommend using a specific GPS or hardware that can maintain good location hold?

For testing out of the water, you could try visual odometry. It is is the same interface we use for the DVL. The issue is that it uses Ardupilot’s ApSync image instead of our companion. I have no idea of how their t265 driver in ApSync is, or how hard it would be to put it into our companion.

If you don’t need the functionality in our companion, I expect that would work.

I Think RTK could work too, but I never used it and idk how complex the setup is… If you have a public base station nearby, it could be an easier option.

Should I set the PSC vertical acceleration controller parameters to 0 as well? (there are horizontal and vertical params)

Yes, as it is hanging, I don’t think there is a point in letting it try to control altitude.