Field-Robotics-Lab / nps_uw_multibeam_sonar

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

Rqt_image_viewer crops the sonar_image #35

Open woensug-choi opened 2 years ago

woensug-choi commented 2 years ago

Strangely, the image shown in the rqt_image_viewer crops in the azimuthal direction at the resulting sonar image. Image drawn using the Matlab script shows just fine.

image

image

soldierofhell commented 8 months ago

Hi @woensug-choi , IMO the problem is in sonar_image size (https://github.com/Field-Robotics-Lab/nps_uw_multibeam_sonar/blob/50c34356513d6d0827eb5ad6f5cc691caf06d7ab/src/gazebo_multibeam_sonar_ray_based.cpp#L578). I don't understand why width is defined as nBeams, IMO it should be something like 2 nFreq sin(FOV/2), so for example if FOV is 180 deg, the image should be (2 * nFreq, nFreq), so that half-circle of sonar image fit in it? Regards,