Field-Robotics-Lab / nps_uw_multibeam_sonar

Multibeam sonar plugin with NVIDIA Cuda library
Apache License 2.0
35 stars 20 forks source link

Change rand_image generation algorithm #16

Closed woensug-choi closed 3 years ago

woensug-choi commented 3 years ago

@crvogt Can you try this out for me?

It's simple change and it builds fine. But I get runtime error saying gzserver: symbol lookup error: /home/woensug/uuv_ws/devel/lib/libnps_multibeam_sonar_ros_plugin.so: undefined symbol: _ZN2cv3Mat6createEiPKii

It crashes at a line which isn't new at all. https://github.com/Field-Robotics-Lab/nps_uw_multibeam_sonar/blob/a9eff3c81df070e14812f202e74d408c63b671a0/src/gazebo_ros_multibeam_sonar.cpp#L382

Maybe my computer problem (running on WSL, or gazebo version...)

Background: The rand_image which was randomized at every sonar calculation should only be calculated whenever the vehicle position is changed. @kerednoslo 's thankful comments

if the medium is static then the scatterers should have the same amplitudes across all frames. If the robot platform moves, then the scatterers will add up in different ways and the speckle pattern will change. But if the geometry is held fixed, the speckle should be the same. This is a real feature of acoustic measurements, and is exploited in a variety of navigation methods (called the redundant phase center, or displaced phase center technique), and even in medical ultrasound (called speckle tracking). ML methods should (eventually) be able to use this property of the acoustic data as well.

crvogt commented 3 years ago

@woensug-choi will do!

crvogt commented 3 years ago

@woensug-choi I tried this gazebo version 9.16.0 and nothing crashed. I could move the sensor around and the sonar image would change, but there was no noise "flickering" (not sure if intentional at the moment)(maybe better described as 'a single random sample of the scene') Screenshot from 2021-06-24 16-31-47 Screenshot from 2021-06-24 16-32-06

woensug-choi commented 3 years ago

@crvogt Yes, they are meant to stop flickering after this update. Thank you for the review!