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
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.