Integration of DVL into ArduSub on NVIDIA Jetson boards

Hey guys,

We have been able to integrate the DVL with ArduSub (4.5) and able to get its local position pretty reliably, as well as switching to POSHOLD. I do have a few questions though.

At first, we could not really get it to work. My primary suspect is that we are polling for telemetry data at 1000hz with recv_match(blocking=False) which causes the autopilot to be too busy sending data to the mavlink node, and not able to receive the vision_position_delta fast enough. When I change the data pollling rate to 200hz, it works pretty well again. However, I run into issue with the attitude data not updating fast enough.

May I ask how this is implemented in BlueOS? What’s the rate used for polling telem data? And do you request message interval for certain types of message? Or just let it set by default? We are currently using 200hz polling rate, and set 10hz for attitude and position data, and around 1-2hz for the rest of the message types (and even -1 for some messages which are not important to us).

PS: I also notice that your existing DVL code does not take into account when the DVL attitude changes near the extreme angles. For example, if the current angle is -179 deg, and the last one is 179 deg, the angle change is actually +2deg (not -358deg). Should this be fine?

Hi @Luc001 -
Since the primary loop rate for ArduSub is by default 200Hz, polling at 1000Hz will definitely cause issues! You can increase this autopilot loop rate with the SCHED_LOOP_RATE parameter, to a max of 400hz.

Can you share what DVL code you’re referring to?

Ah I understand! After some research, I found out that the default message rate for most messages is 4hz. I stop the streaming of messages which I do not need, adjusted recv_match loop rate to 200hz and everything is smooth now. Thank you so much!

I mean the code in the BlueOS DVL extension. I have checked the code and do not see any handling of edge cases where the DVL angles approach -180 or 180 deg.

Hello @Luc001 , I am also trying to integrate a DVL for our competition AUV, would you be willing to share the code you wrote for this integration? We do not have a waterlinked A50 but I believe it could still help us greatly.