Decoding Omniscan450 log

Dear Community!
My project uses a Cerulean Omniscan 450 FS sonar, and I wish to decode the data it saves to an svlog file. I am using the decoder script that is available in the grithub repository from BlueRobotics, but it gives me the below error:

Traceback (most recent call last):
  File "E:\Downloads\Sonar\decode_sensor_binary_log.py", line 290, in <module>
    for index, (timestamp, decoded_message) in enumerate(log.parser()):
  File "E:\Downloads\Sonar\decode_sensor_binary_log.py", line 209, in parser
    for (timestamp, message) in self:
  File "E:\Downloads\Sonar\decode_sensor_binary_log.py", line 189, in __iter__
    self.unpack_header(file)
  File "E:\Downloads\Sonar\decode_sensor_binary_log.py", line 168, in unpack_header
    self.header.string = self.unpack_string(file)
  File "E:\Downloads\Sonar\decode_sensor_binary_log.py", line 112, in unpack_string
    return cls.unpack_array(file).decode('UTF-8')
AttributeError: 'NoneType' object has no attribute 'decode'

The script is able to decode a test .bin log from a ping360 sonar, but not the .svlog from this cerulean product. However, in the BlueRobotics documentation it shows that the omniscan is using a very similar if not the same ping protocol. The SonarView software that Cerulean uses can open the svlog file, and the Ping360 bin file as well, and the PingViewer can open the svlog file, but shows nothing on the screen. The content of the files look extremely similar with all the binary identifiers of the building blocks, thus I am confused why this script does not work for the cerulean sonar to decode the mesages.

I’m looking for some help regarding decoding this sonar svlog file. It feels like I am missing something important.
Thank you very much in advance!
Regards,
Papi

Hi @Papi -
The script you’re trying to use is intended for PingViewer logs, which are not created by Cerulean’s Sonar View application used with the Omniscan! It is not surprising that things don’t work as expected. The data from a mechanical scanning sonar and an omniscan are fundamentally different! I would recommend reaching out to Cerulean support for advice on how to decode log files. Best of luck!

Thank you Tony!
I think I got confused about omniscan being mentioned in the blue robotics documentation. I will reach out to cerulean and see where I get to.
Regards,
Papi

Dears,
I heard back from Cerulean, who pointed me to their documentation. For anyone facing the same “problem” I am including my resolution.

According to the docs the sonar uses the same binary packet format as the Ping360. Therefore, I will try and modify the BlueRobotics code so it can read the omniscan, as I am not an advanced coder who could write the script from scratch.

Thank you for your support, and wish you a great weekend ahead.
Regards,
Papi

1 Like

Hi @Papi, welcome to the forum :slight_smile:

While both the Ping360 and Omniscan 450 devices use the ping protocol for communication, different applications may package recordings of those communication messages in different ways.

Ping Viewer has a defined binary file structure (organised as a sequence of timestamps and byte arrays of partial ping-protocol messages), which is what my decoding script makes use of to extract the stored ping protocol messages from within Ping Viewer’s .bin logs. If Cerulean’s SonarView program records messages in some different way in its .svlog files then decoding those files will require parsing their file structure, which doesn’t seem to be described in the SonarView documentation.

Note also that the Omniscan 450’s messages were only recently added to the official ping protocol specification, which has not yet been propagated to our ping-python library, so even if the file structure can be parsed you’ll need an updated library version to be able to parse the actual messages. I’ll try to get that sorted out.

1 Like

Hi! I have the same question as @Papi , I am wondering if you @EliotBR or anyone else has made documentation to help with decoding the side scan sonar .svlog files?

Hi @coanderson, welcome to the Blue Robotics forum :slight_smile:

While SonarView is compatible with some Blue Robotics ping-family devices, it is a software application developed and documented by Cerulean.

I asked around and @williangalvani mentioned this documentation is likely what you’re after :slight_smile:

Hi everyone!

The documentation was a little incomplete online so it took a while to figure out. With a ton of help, I have been putting together a git repository with all of my progress on decoding data from the ping altimeter, ping 360, and omniscan450s, which our lab is attempting to use to implement a SLAM algorithm (down the road). Anyway, I am not a software developer, so I made the git repository as beginner friendly as possible, so other people can easily decode stuff themselves. It is still a work in progress, but good enough to be dangerous right now. Here is the link: GitHub - APPG-SIO/BlueROV2_sensor_data: This repository is for the handling of all things BlueROV2 related, including sensors in the payload

All the best,
Courtney

3 Likes

Cool project - thanks for sharing!

The data aggregation aspect reminds me of my data-alignment project, which I started a few years ago but haven’t had the chance to flesh out nearly as much as I originally hoped to. The bootstrap functionality there may be helpful for you with making sure the ping viewer log processing script is available :slight_smile:

If I’m remembering correctly I was intending to combine aligned data into HDF5 tables, because they store data efficiently and are fast to access. Making everything into CSVs makes the data very visually accessible in spreadsheets, but also multiplies its size and the time it takes to process / work with it, which may cause issues down the track - especially as your datasets expand.

I like your data_logging page idea, although I imagine the lack of data persistence from refreshing can be quite inconvenient. You might want to consider implementing it as a DIY widget in Cockpit, and saving the data to the vehicle. I’ve been intending to make an example like that for the documentation, but haven’t got around to it yet :sweat_smile:

Eventually it would be nice to have eventing functionality either built into Cockpit or available as an easily installable add-on. Feel free to contribute to the discussion in that Issue if you have ideas on what such a feature would ideally include for your use-cases :slight_smile:

2 Likes