I have a BlueROV2 heavy configuration with the Navigator and am trying to use it in GUIDED mode via Mavros. I have integrated a DVL-a50 and no GPS. My goal is to be able to set waypoints relative to its local coordinate system.
I am able to set the rov in GUIDED mode however as soon as I arm it, the thrusters goes in full force down without me setting any waypoint. I have tried limiting the speed with WPNAV_SPEED, WPNAV_SPEED_DN and WPNAV_SPEED_UP but still the same behavior. It seems that if it has a preset waypoint which I am unable to find what it is and also to override.
So my main key take away I would like from this is to get a better understanding of how GUIDED mode works for Ardusub. How do you set a waypoint? How do you get the current waypoint? How do you constrain its behavior with parameters? And this using mavros/mavlink.
Hi, sorry this seems to have been missed initially.
Can you clarify which ArduSub version you’re using?
Also, position-enabled modes expect a valid position estimate, which (with a relative positioning source like a DVL) requires an initial position to be specified. Are you doing that through the Water Linked DVL extension?
@williangalvani is the primary ArduSub maintainer, so may have some further insights, especially if you’re able to provide a DataFlash (.bin) log or telemetry (.tlog) log file where this behaviour occurred.
Putting the rov into position hold, creating a mission as per the instructions, and uploading it. When the mission starts the rov, switches to Auto mode, begins to dive rapidly and then hits a failsafe stating no rangefinder equipped.
We also have tried guided mode in which we wanted to, as per the SITL simulation we ran, pass mavlink messages to control the rov, but when we arm the rov in guided mode, it imediatly dives straight down like the previous comments on this thread.
Can you confirm whether the issue is still present in the latest stable ArduSub, which is 4.5.7?
4.1.0 is from back in June 2022, and there have been various fixes implemented since then, including some that seem relevant to the problem you’re describing that were added in 4.1.1.
There is an open pull request that may resolve this - you can check the linked issue to see whether it describes the behaviour you’re seeing.
Additional testing would be welcomed - if you let us know which flight controller board you’re using we can hopefully provide an autopilot firmware binary for you to test with.
The behaviour described in the pull request is almost the opposite of what we found for GUIDED.
Changing state from disarmed to armed, while guided mode is selected causes immeidate diving, our testing tank is 2-3m in depth and it will try to go beyond this.
Arming the vehicle in another mode and swithing over to Guided causes no issues. We can then send commands as desired.
We had observed behaviours in the past where the ROV would dive in a similar matter in depth hold mode, but this was due to the wrong BARO being selected we think when a fresh firmware was installed.
We are using the Navigator Flight Controller. It is fine for now, we are looking to edit the firmware for a custom flight mode at this time anyways, but are happy to test any changes.
Reading it again, it does seem to be a similar issue. Apologies. Something with how the state of the controller is reset or not between modes and arming/disarming. We have not noticed the exact described behavior with manual to depth hold mode though at this time.
I have seen the surf track mode in the firmware but am not aware of what it does.
The goal for our mode is in essence position hold + guided functionality through pymavlink messages, to ideally end up with an AUV by then implementing higher levels of abstracted control. The more we look at the guided mode though, we may not need to write a custom mode. I had originally completed this in a much older firmware version for basically semi autonomous control but it is all outdated at this time. Only recently did we buy a new waterlinked DVL, as the one we originally had broke at some stage.
Hi @plavo -
No worries! Surf Track is exactly like depth/altitude hold, but instead of using the pressure sensor, it uses the altitude from a single beam sonar (Ping) or DVL. So if you enter the mode 1m from the bottom, the vehicle will work to maintain that spacing as it moves laterally. Adjusting the set point is as simple as changing your altitude with the joystick, so it can be done “on the fly.” It has been a part of ArduSub since version 4.5. Currently this behavior is not available in guided or any other mode…
Guided mode indeed holds position once a target location has been reached!