# Failing to run auto mission with UGPS2

**URL:** <https://discuss.bluerobotics.com/t/failing-to-run-auto-mission-with-ugps2/16990>\
**Category:** ArduSub\
**Tags:** water-linked\
**Created:** [May 28, 2024, 11:22pm UTC](https://discuss.bluerobotics.com/t/failing-to-run-auto-mission-with-ugps2/16990 "2024-05-28T23:22:10Z")\
**Posts on this page:** 11\
**Page:** 1

<div class="post-metadata">

**Author:** ![yl1999](https://avatars.discourse-cdn.com/v4/letter/y/57b2e6/32.png) [@yl1999](https://discuss.bluerobotics.com/u/yl1999)\
**Post date:** [May 28, 2024, 11:22pm UTC](https://discuss.bluerobotics.com/t/failing-to-run-auto-mission-with-ugps2/16990/1 "2024-05-28T23:22:10Z")

</div>

Hi, we are trying to run auto mission in our new BlueROV2. BlueOS and firmware both latest.

It is connected with waterlinked UGPS2. But when we run auto/position hold mode, the error will pop up: **MAV\_CMD\_DP\_SET\_MODE command failed**

 ![MicrosoftTeams-image (2)](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/4/4947987361a753e4158bad9934ac739042e76946.jpeg)

When we turn off GPS and use DVL, auto mode runs normally.

We also have an old BlueROV which uses Pixhawk autopilot (firmware version v3.5.4). That one works well with waterlinked UGPS2.

We thought it might be the firmware version doesn’t work well with UGPS2.

We’ve try changed the setting according to these two posts: [https://discuss.bluerobotics.com/t/waterlinked-ugps-for-bluerov-autonomous-navigation/16491/4](https://discuss.bluerobotics.com/t/waterlinked-ugps-for-bluerov-autonomous-navigation/16491/4)  
[https://discuss.bluerobotics.com/t/revert-back-to-ardusub-3-5-4/7527](https://discuss.bluerobotics.com/t/revert-back-to-ardusub-3-5-4/7527)

They both don’t work.

May I know how can we downgrade the firmware or is there any other solution?

---

<div class="post-metadata">

**Author:** ![williangalvani](https://avatars.discourse-cdn.com/v4/letter/w/6f9a4e/32.png) [@williangalvani](https://discuss.bluerobotics.com/u/williangalvani)\
**Post date:** [May 29, 2024, 2:30pm UTC](https://discuss.bluerobotics.com/t/failing-to-run-auto-mission-with-ugps2/16990/3 "2024-05-29T14:30:46Z")

</div>

Hi, can you explain your setup a bit better?

So you have both a UGPS2 and the Waterlinked DVL? How do you “switch” between them?  
I suspect the issue is that while using the UGPS2, the ekf is not happy, we need to check why. Can you provide some bin logs?

---

<div class="post-metadata">

**Author:** ![yl1999](https://avatars.discourse-cdn.com/v4/letter/y/57b2e6/32.png) [@yl1999](https://discuss.bluerobotics.com/u/yl1999)\
**Post date:** [May 29, 2024, 9:30pm UTC](https://discuss.bluerobotics.com/t/failing-to-run-auto-mission-with-ugps2/16990/4 "2024-05-29T21:30:17Z")

</div>

Hi, yes, sure. Which part of set up you would like to know? We have the BlueROV2 which has navigator board.

Yes, we have both UGPS2 and DVL. We disable the DVL extension to turn off the DVL and think that is “switch” between them.

New user cannot upload attachment. May I know your email address or other way that I can provide the log files?

Thank you!

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [June 3, 2024, 5:21pm UTC](https://discuss.bluerobotics.com/t/failing-to-run-auto-mission-with-ugps2/16990/5 "2024-06-03T17:21:21Z")

</div>

To add some extra context here, it’s possible this can work in theory but it’s not something we’ve tried extensively or established as a supported functionality for even the most recent autopilot versions, let alone old ones.

[This thread](https://discuss.bluerobotics.com/t/waterlinked-ugps-and-dvl-driver-potential-conflict/13322) includes some relevant discussion, and [this Issue](https://github.com/bluerobotics/BlueOS-Water-Linked-DVL/issues/35) is the latest discussion I’m aware of around fusing those data sources.

> [@yl1999](#):
>
> Yes, we have both UGPS2 and DVL. We disable the DVL extension to turn off the DVL and think that is “switch” between them.

The Issue I linked to may cover a potential conflict between the device drivers because of the parameters that they currently set automatically.

> [@yl1999](#):
>
> New user cannot upload attachment. May I know your email address or other way that I can provide the log files?

I’ve just updated your trust level so you can upload files.

---

<div class="post-metadata">

**Author:** ![yl1999](https://avatars.discourse-cdn.com/v4/letter/y/57b2e6/32.png) [@yl1999](https://discuss.bluerobotics.com/u/yl1999)\
**Post date:** [June 3, 2024, 6:35pm UTC](https://discuss.bluerobotics.com/t/failing-to-run-auto-mission-with-ugps2/16990/6 "2024-06-03T18:35:16Z")

</div>

Hi Eliot,

Thanks so much for the information! I will look up on them.

Here is the latest binary file that experience the error. Please let me know if you find something about the issue. Thanks!!

[log\_89\_2024-5-24-11-32-46.bin](https://discuss.bluerobotics.com/uploads/short-url/xPRDIM3KxkpIzr5760KuYmgU9VN.bin) (12.2 MB)

---

<div class="post-metadata">

**Author:** ![yl1999](https://avatars.discourse-cdn.com/v4/letter/y/57b2e6/32.png) [@yl1999](https://discuss.bluerobotics.com/u/yl1999)\
**Post date:** [June 3, 2024, 6:45pm UTC](https://discuss.bluerobotics.com/t/failing-to-run-auto-mission-with-ugps2/16990/7 "2024-06-03T18:45:48Z")

</div>

> [@EliotBR](#):
>
> let alone old ones.

A data point that we can provide is, our old ROV which used Pixhawk autopilot can run auto mission with the UGPS2.

---

<div class="post-metadata">

**Author:** ![yl1999](https://avatars.discourse-cdn.com/v4/letter/y/57b2e6/32.png) [@yl1999](https://discuss.bluerobotics.com/u/yl1999)\
**Post date:** [June 5, 2024, 10:46pm UTC](https://discuss.bluerobotics.com/t/failing-to-run-auto-mission-with-ugps2/16990/8 "2024-06-05T22:46:03Z")

</div>

More information about the error:  
There are 8 mode that can choose. The first four modes works well. The same error pops up when we choose any of the last four modes.

![image](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/6/61aaa1d62424ac8dbb24e3d3fd0657813378d0e0.jpeg)  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/c/cd7aec2ead41bfa08a3f9d60f5f45b458a316ae8.png)

We looked up the MAVLINK command and found some parameter related. I wonder will that helps for solving this problem?

 ![image](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/5/5216546f563488221b30db8e674e16e10bada0ee.jpeg)

---

<div class="post-metadata">

**Author:** ![EliotBR](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/eliotbr/32/6937_2.png) [@EliotBR](https://discuss.bluerobotics.com/u/EliotBR)\
**Post date:** [June 10, 2024, 8:51am UTC](https://discuss.bluerobotics.com/t/failing-to-run-auto-mission-with-ugps2/16990/9 "2024-06-10T08:51:52Z")

</div>

> [@yl1999](#):
>
> Here is the latest binary file that experience the error. Please let me know if you find something about the issue. Thanks!!
> 
> [log\_89\_2024-5-24-11-32-46.bin](https://discuss.bluerobotics.com/uploads/short-url/xPRDIM3KxkpIzr5760KuYmgU9VN.bin) (12.2 MB)

Thanks for the extra information 🙂

This log file is very short, but also doesn’t include any position information in the GPS messages or AHRS estimator, which may be the source of your problem.

> [@yl1999](#):
>
> There are 8 mode that can choose. The first four modes works well. The same error pops up when we choose any of the last four modes.

The failing modes in this case are the position-enabled ones, which only work if the vehicle has a sufficiently stable position estimate. If the position measurements aren’t frequent or consistent enough then the autopilot doesn’t know where it is, so it can’t meaningfully perform position-based actions or missions, and it rightfully refuses to enter a mode that requires such an estimate.

If you check the MAVLink Inspector for the `lat`/`lon` fields in the `AHRS2`, `GLOBAL_POSITION_INT`, and `GPS_RAW_INT` messages, that should hopefully provide a sense of what the autopilot is estimating and receiving. I’d also recommend checking the status of the UGPS system and/or the DVL (depending on what you’re trying to use), to see whether at least the sensor thinks it has a valid position lock.

---

<div class="post-metadata">

**Author:** ![yl1999](https://avatars.discourse-cdn.com/v4/letter/y/57b2e6/32.png) [@yl1999](https://discuss.bluerobotics.com/u/yl1999)\
**Post date:** [July 17, 2024, 6:11pm UTC](https://discuss.bluerobotics.com/t/failing-to-run-auto-mission-with-ugps2/16990/10 "2024-07-17T18:11:54Z")

</div>

Hi Eliot,

Thanks for your reply! We did try a lot different settings recently and have some interesting findings.

1. The **MAV\_CMD\_DO\_SET\_MODE command failed** problem solve by downgrading QGC to 4.2.8 because that is the latest version that Ardusub support. ([Ardusub webpage](https://www.ardusub.com/quick-start/installing-qgc.html) says the latest version they support is 4.2.3 but the download link they provide is actually 4.2.8)

2. However, the auto mode still cannot work with the new GPS. When we park our ROV in a known point, both the Waterlinked page and QGC appears to oscillate. The error level is about 4 meters.  

Although the ~4m error exist, we still try to run the auto mission. But QGC said fail to change to Auto mode or any position-enabled modes, which you mentioned above, only work if the vehicle has a sufficiently stable position estimate.  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/8/8443b0e6ee4a946dd5a6057b1c7896fe413150f6.png)

I also check the MAVLink Inspector for the [lat/lon] fields in the [AHRS2], [GLOBAL\_POSITION\_INT], and [GPS\_RAW\_INT] messages, all the lat/lon are constant while depth does change in real time. It seems like the QGC doesn’t receive the real time GPS data/ have a valid position lock.

 ![image](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/8/82f8f5fc25694b0d91023b0c3096d9f534521879.jpeg)  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/3/3dfa286c557a4727e00e300594ebb87857f109af.jpeg)  
 ![image](https://us1.discourse-cdn.com/flex019/uploads/bluerobotics/original/2X/8/8b27e61056def7853e93211c97987b1b86a109ad.jpeg)

The log file is attached here, too.  
[log\_101\_2024-7-17-09-19-18.bin](https://discuss.bluerobotics.com/uploads/short-url/hB33ualFx8G80JIgwivJGAORMQm.bin) (17.1 MB)  
[log\_102\_2024-7-17-10-16-28.bin](https://discuss.bluerobotics.com/uploads/short-url/4yXzzL7CW2qw4OXG8ohPjfmRjU9.bin) (5.2 MB)

Thanks for your support all the time and looking forward to hearing from you!

---

<div class="post-metadata">

**Author:** ![tony-white](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/tony-white/32/18385_2.png) [@tony-white](https://discuss.bluerobotics.com/u/tony-white)\
**Post date:** [July 18, 2024, 12:38am UTC](https://discuss.bluerobotics.com/t/failing-to-run-auto-mission-with-ugps2/16990/11 "2024-07-18T00:38:53Z")

</div>

Hi @yl1999 -  
The issue is likely fundamental to your operating environment - a large tank! The acoustic GPS system can struggle with multipath in such environments…

---

<div class="post-metadata">

**Author:** ![Boko](https://sea1.discourse-cdn.com/flex019/user_avatar/discuss.bluerobotics.com/boko/32/7241_2.png) [@Boko](https://discuss.bluerobotics.com/u/Boko)\
**Post date:** [July 18, 2024, 8:13am UTC](https://discuss.bluerobotics.com/t/failing-to-run-auto-mission-with-ugps2/16990/12 "2024-07-18T08:13:19Z")

</div>

Hi!  
Since you have problem in the Waterlinked UI there is acoustic problems.  
Check Waterlinkeds diagnostics and try to find the problem: [http://192.168.2.94/#/diagnostic](http://192.168.2.94/#/diagnostic)

Waterlinked has a demopage online where you can check functionality display in open water: [Water Linked Underwater GPS](https://demo.waterlinked.com/#/diagnostic)
