patrykcieslak / stonefish

Stonefish - an advanced C++ simulation library designed for (but not limited to) marine robotics.
https://stonefish.readthedocs.io/
GNU General Public License v3.0
126 stars 32 forks source link

range and intensity data for Mechanical scanning imaging sonar (MSIS) #31

Closed linzha0 closed 1 year ago

linzha0 commented 1 year ago

Is your feature request related to a problem? Please describe. This is not related to a problem.

Describe the solution you'd like MSIS sensor publishes another data format such as sensor_msgs/LaserScan

Additional context Thanks for sharing this awesome project. We are trying to get range and intensity from the MSIS sensor. I checked the source file generated sonar image such as the OpenGLMSIS.cpp , but this seems strongly related to OpenGL, which I am not familiar with.

Could you give some suggestions to get raw range and intensity data from the MSIS sonar? Maye some tips to extract data from the OpenGL buffer, or maybe post-process the sonar image to get the data we want.

Thank you so much !!

patrykcieslak commented 1 year ago

Sonar as you noticed is implemented using OpenGL and the output is an image that is closely related to the real sonar data. This data is representing in X the beams of the sonar and in Y the distance bins, while the value of each pixel represent the echo intensity. What you would like to achieve is a profiler sonar and this can be done by post-processing the image using some threshold for the echo intensity.

linzha0 commented 1 year ago

I currently found getCurrentRotationStep function from MSIS, so we can get the current measurement from the raw image(bin-beam format), and get raw range and intensity for each bin-beam.