Heading & Depth data to surface?

Thanks Willian. Editing the IP address in the mavproxy_DepthOutput.py file now outputs data.

I am working on getting the Heading and Depth from the ROV in NMEA formats HDT, and DPT. I want to bring this data into another piece of software I will be using with the ROV. I think there is enough info in the forum to get me started on that part next.

Thank a lot @patrickelectric . Can you give some reference to build GUI(tkinter) in python and display those messages on that?

Hi,

I would recommend to use the official documentation webpage: Graphical User Interfaces with Tk — Python 3.10.6 documentation

Hi,

I recently came across an old post of mine from 2017 about extracting data from the Blue ROV, which I never managed to finalize. At that time, we ended up using a different ROV.

However, this functionality would be quite useful now. I’m looking to extract the following data from the Blue ROV:

  • Depth
  • Heading
  • Roll / Pitch

What would be the easiest way to send this data out via a UDP port so we can get the data in on our computer running the survey / navigation software?

Thanks in advance for any help!

That information is available via the MAVLink telemetry - more specifically

You can access that via the built in MAVLink2REST service[1], or by configuring an extra MAVLink endpoint and connecting to it via a library like Pymavlink.

That depends somewhat on your formatting and distribution requirements, but assuming you need some kind of custom format specific to the software you’re wanting to send the data to then the recommended approach for running custom code onboard the vehicle is to create an Extension. Alternatively you could run your MAVLink receiving + translation code on your control station computer, in case that’s easier for you to set up and maintain.


  1. That’s easiest to check out via the Available Services page ā†©ļøŽ

1 Like

We are just looking to get this datastream from the ROV sent to an UDP port:

{,#HEADING,18.57,#DEPTH,-0.24,#PITCH,3.00196763110161,#ROLL,-4.43289819562435,#TEMP1,54.08,#TEMP2,22.17,#BATVOLT,15.713,#,0,#S1,1500,#S2,1500,#S3,1500,#S4,1500,#S5,1500,#S6,1500,#S7,1500,#S8,1500,}

Then we can pick out the required fields in the survey program and forward it further to the Video overlay software together with the position in UTM X and Y format in an custom string. The issue at the moment is the overlay Oceanvault can only received 1 data stream.

I will try to look into the MAVLink receiving + translation code, but i was hoping if there was a easier way to forward the string directly.

Hi @Spipp -
You could develop a python script (that could even become an extension) that runs onboard the vehicle, and polls the Mavlink2Rest interface for the data you want. You could then construct the output packet you desire and send if via UDP to whatever port. This should be fairly straightforward! You can see an example of polling the interface for heading and other information in this extension.

1 Like

Thanks, @tony-white! I appreciate the feedback. Unfortunately, our in-house resources for writing code are quite limited. If anyone in the community has the skills and capacity to take on a project like this, please feel free to send me a private message. We can discuss the details and agree on terms and conditions. :slight_smile:

Ok @Spipp -
I may take a stab at doing this with NodeRed - I’ll update this guide if it works!
Can you share more about your requirements? You’d like to output the packet:

{,#HEADING,18.57,#DEPTH,-0.24,#PITCH,3.00196763110161,#ROLL,-4.43289819562435,#TEMP1,54.08,#TEMP2,22.17,#BATVOLT,15.713,#,0,#S1,1500,#S2,1500,#S3,1500,#S4,1500,#S5,1500,#S6,1500,#S7,1500,#S8,1500,}

At what frequency?Are the S# values referring to the 8 servo outputs?
You’d like this packet sent via UDP to a specific address - 192.168.2.1 for the host computer? What port?

Is this is to interface with software called Oceanvault? If that’s the correct software, I’d point out you can technically configure QGC to overlay this on your video recording (played with VLC media player) via .ass subtitle file by configuring the instrument panel at the bottom center of the interface to display your desired values - although I’m not sure the servo positions are available, everything else is!
When played from the Documents/QGroundControl//Video folder, with the subtitle file name the same as the video file, VLC will overlay the telemetry on the bottom of the screen.
Cockpit can also do this, but may not have as many values available for you to use (yet).

If I’m remembering correctly any MAVLink message field can be displayed in a Very Generic Indicator mini-widget, in which case it is also available to be in the generated subtitle file :slight_smile:

1 Like

Hi @EliotBR -
I agree- much more control - but somehow the dropdown lists of what can be displayed seem longer in QGC than cockpit… I could be wrong!! And I didn’t realize anything in a very generic indicator would then be possible to add, very cool. You could get named value floats with custom values in via Node-RED and our recent guide!

1 Like

Hi @Tony,
I aslo want to get heading, depth data from BlueROV2 and export to COM port. ASCII transmission data format (1 start bit, 4800 baud, 8 data bits, No Parity, 1 Stop bit). Data string example: $, field#1, field#2, field#3, field4, CR. Field1,2,3,4 are depth, heading, time, date.
Could you help to support this case?
Many thanks
Lap

Hi @Lap -
You should be able to generate the message you describe based on the info provided in this thread, above - can you share your goals for doing so? What device will receive the data? Do you need to output it it via true RS232, or are TTL voltages (3.3V UART) ok for the output? Is sending the data via network TCP/IP preferable?

Hi @tony-white,
Thanks for reply.
We have a Overlay software which run on a separate PC (OverlayPC). The Overlay PC will be connected to QGround PC via COM port. At the moment, this software only receives heading, depth data via COM port (ASCI format).

Hi @Lap -
What function is the Overlay software achieving? Are you aware that both Cockpit and QGC allow you record a subtitles file, which can overlay parameters like depth, heading, date and time over the video?

If you’re needing to output the data via comm port from your topside, you could develop a python script that pulls the relevant data from Mavlink2Rest on the ROV, formats it as you require, and sends via whatever comm port output device you have on your topside computer. This should be quite easy to do given the examples provided already!

Hi @tony-white
Yes, I am aware that both Cockpit and QGC allow me record video with overlay parameters.
In our ROV operation, we have video overlay PC which can record 1-4 separate video channels, take picture, event log… The overlay data will combine ROV (depth, heading…) and tool (CP, Gyro…). So, it would help if we can export ROV data to COM port.

Hi @Lap -
There are many ways to achieve this, but all involve developing some amount of custom software. The data is available for the taking, but as your application requires a specific format, off the shelf solutions like mavlink-server are not a turn-key solution. This is what I was suggesting above in this post.

It may also be possible to do in Node-RED, I have not had a chance to investigate.

It’s worth noting that Cockpit can also record simultaneous video streams, with overlay subtitle file, with the quantity only limited by the power of your computer!

1 Like