Alpha release: Simple Ping2 Survey Extension

Do you have a BlueBoat? Do you have a Ping2? I’ve got an extension for you!
@gabedbv @cyamin @mattcmgb @pob747 @Anyone else who may care… presenting:

Simple Ping2 Survey Extension

This is an ALPHA release. There are certainly bugs lurking, and I hope you can help me uncover them to minimize data loss and headache for all who may benefit in the future. Thanks!

Background

I’m no software engineer, but I am a passionate jack-of-all trades who loves working with marine tech! I developed this extension to better understand BlueOS and its extensions, and learn to work with Javascript and Vue. In the modern world of LLMs like ChatGPT and Bard, it’s easier than ever before to quickly jump into learning new software!
The Blue Robotics team is preparing to launch a sleek new product that makes using a Ping2 with a BlueBoat as easy and optimized as possible. While simply checking a box in BlueOS will make your ArduRover autopilot logs contain time-sync’d position and depth, regardless of your communications link to the vessel during the mission, there are a couple drawbacks… and so I was inspired!

Viewing data in Ping Viewer consumes more bandwidth than necessary to monitor data quality.

Logs contain all gps position and depth data, as you can quickly check with this tool, but (at least for now) confidence % from the Ping2 is not recorded. This can makes noisy data much tougher to filter!

What does this Simple solution do?

In as simple a way as I could think, the user can:

  1. Start & stop position and depth data recording, and download the results.
  2. Monitor vehicle position and orientation alongside useful coloration and geometry for judging data quality.

Before use:

  1. Ping2, mounted, connected, SerialPort removed from autopilot and the Ping Sonar mavlink box checked.


    Here Ping2 connected to Serial 4 - Access from Autopilot menu at top left of BlueOS
    image
    image

  2. Obtain GPS lock.

  3. Install extension (requires Internet access) and open

Usage

  1. Navigate vehicle to survey region, and start desired mapping operation (via QGC.)
  2. In this extension, click play button in the upper left (triangle.) The map will automatically center on the vehicle location, and if the computer you’re using to view the extension has internet access, satellite view map tiles from Google will load. A python script is now logging the data onboard the vehicle at 2Hz. If you refresh the page or access it from another machine, the interface may not reflect that data is being collected - clicking play on that interface will not impact the continuity of already ongoing data collection.
  3. Monitor the collected data. The table at the bottom of the page reflects the latest data received from the vehicle, with the logos in the upper corners turning as each data messages is received over your communications link. Depth values that have a confidence of over 95% will show up as a to-scale colored circle on the map. The color of the circle scales with depth, from white to dark blue. The diameter of the circle gives a representation of the beam coverage, given the Ping2 25 degree beam and the measured depth and some simple trigonometry with the tangent function. Objects that give a strong return within this beam may impact the actual area averaged by the sonar’s depth measurement, but it is a handy visualization of both depth and survey coverage. In shallower waters, you may need to mow the lawn at a closer survey spacing!
  4. Download the data. You don’t have to click stop, logging will continue. Some users may prefer to stop before collection of vehicle, as logs contain all raw data (confidence level 0-100%, not filtered.)
    I’ve had the best results when connected to a vehicle via cell-data and Zerotier, as this lets me control the vehicle with one device (my phone running QGround Control Android) and monitor with another (my laptop running off of phone hotspot.) This gives the laptop both connection to vehicle and access to the internet, so the map tiles load right up!

This process will be further detailed, along with step-by-step directions for using QGIS to generate bathymetric contour plots from the data, in an upcoming guide. I’m putting this out now for early adopters to give it a whirl! Please share your experiences, and feel free to checkout the source, make improvements, fork in your own direction, etc.

Future improvements and feature ideas

  • WP Survey speed parameter control on page?
  • User controlled confidence filter on live and/or logged data?
  • Show GPS speed over ground in table, HDOP
  • User configurable color gradient to depth mapping
  • Better mobile experience - scaling corner logos

How do I get it?

In the near future, it will just appear in the BlueOS Extension store - getting listed is as simple as a pull request! I’d like to have some confirmed reports of users having success before doing so, so in the meantime…
Update 1/22/24 - This extension is available on the Store! Select the check-box for Blue Robotics provider under Extensions, and Install the extension. Full guide coming soon!

  1. Wait for the CPU/Memory usage graphs to populate, this can take a few minutes, so go get a snack. You should then be able to find the Extension in the side menu bar

Let me know how it goes!

4 Likes

Does the Ping2 extension work with a Ping1D? I couldn’t get it to display anything, not even a lat/long position. does it need to be configured in some way?

cheers.

-Paul

Hi @PaulBarter -
We moved your enquiry here for relevance. Yes, the Ping 1D should work just fine! Your vehicle needs GPS lock, and the Ping detected under Ping Sonar devices, with Mavlink messages turned on:

Nothing is displayed until you click the play button in the upper left above the map, then it should show vehicle position, heading, and if confidence above 95%, a circle on the map @ the vehicle position.

For the moment, stick with v1.0.0, still working some kinks out of the update!
V1.0.1 makes the log persist between vehicle reboots, the logs can can be found with the File Browser (Pirate mode) under /extensions/ping-survey-logs

Let me know if you still have issues! Happy to help

Hi, Great work! Will is work with Cerulean S500? Cheers Matt

Hi @Matt1 -
If you’re able to see the S500 under Ping Sonar Devices, and enable the switch for MAVlink distances, it should work yes! Please let me know- I’ve not tested with that hardware. It’s also worth noting that the S500 has a much tighter, 5 degree beam, so you may want to modify the software - specifically index.html, line 300, changing 12.5 to 2.5.

                    const radiusInMeters = (depth/100) * Math.tan(12.5 * Math.PI / 180); // convert depth to Meter, 25degree beam angle is 12.5 degree, divide by pi/180 for radian to degree
1 Like

Hi everyone!
This guide detailing this extension and using its data has been published, and the extension is now in “beta”. Please let me know your experiences and issues! The BR team is having fun using it around the world!

1 Like

nice extension, I was wondering if you could add ROV depth to the data collected then it could be used with the blue ROV adding up altitude and depth to get the total water depth

Hi @CUIS -
That’s a cool idea! I do think that there are many challenges to integrating a Blue Boat with companion Blue ROV2, and not a lot of to doing so… I’m still looking for the “killer application” to motivate such a combination!
The Ping2 sonar gives total water depth without having to drag an ROV around, allowing for a much faster survey speed!

Your program already works on my blue ROV, Im running a DVL and ping2 on it, the use case is while completing inspection you can log a profile of the bed (ie a pipeline inspection) I already do this but your application would make a much more streamlined approach all it needs to add is recording the pressure sensor depth in another column. It wouldn’t need the blue boat to collect the data

Hi @CUIS -
That makes sense. It should be very easy to add that in! Do you have any interest in forking the repository and learning how?
I would mention, your location based only off of DVL is only as good as your initial definition of the vehicle position, and the tracking from that point forward… that’s a big disadvantage compared with the GPS position tracked BlueBoat!

In this section: https://bluerobotics.com/learn/collecting-creating-bathymetry-blueboat-ping2/#extension-troubleshooting we can read this: Map tiles will only load if your computer has internet access.

Usually I don’t have internet access but I store my map in QGC before I go to the field. Would this work?

Great extension by the way:)

Hi @Charles -
Glad you like the extension!
As that section recommends, connecting your BaseStation via USB and your computer to a WiFi hotspot can provide internet in the field, while maintaining the connection to the BlueBoat. I typically use cellular data for both the control station and the boat, so this hasn’t been an issue!

The maps in QGC are not related to the tiles loaded in the extension… You may be able to load the region you want in the extension manually before hand, but if you lose connection and have to refresh the page, the map tiles may be lost. Offline maps is a good feature for the extension development to target!