Closed woensug-choi closed 3 years ago
@crvogt Could you test this PR if the feature works on your machine? Try true/false of the constantReflectivity
handle will be good enough.
New notes on Monday (2/8) It would be much helpful if you could try this review at PR https://github.com/Field-Robotics-Lab/nps_uw_multibeam_sonar/pull/9. PR #9 is built on top of this PR.
Launch command to test true/false of the constantReflectivity
would be roslaunch nps_uw_multibeam_sonar sonar_tank_blueview_p900_nps_multibeam.launch
New feature : Variational reflectivity
Related issue : Variational surface reflectivity #2
Although high fidelity target strength is beyond reach for simple implementation, a user can give different surface reflectivity on the scene's objects with this PR.
How it works
model.sdf
of the sonar model (in this case,nps_uw_multibeam_sonar/models/blueview_p900_nps_multibeam/model.sdf
cv::Mat this->reflectivityImage
is calculated if the scene is changed (it detects the change by comparing the maximum depth value of the depth camera with the previous scene. If the value is stabled (if equal for 3 consecutive frames, the calculation is performed once)reflectivityImage
OpenCV matrix is then transferred to GPU memory and used for sonar calculationResults
@mabelzhang
Thank you! for the support! It was amazing to show comprehensive copy&paste-able code hints and advice for the optimization!