-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
New ray-based multibeam sonar implementation #25
Conversation
The sonar model needs to be implemented, but the plugin compiles and runs now. It uses a Gazebo DepthCameraSensor and generates a depth and normals texture from the depth camera output.
… with simple function
@woensug-choi I'm getting a link error when I try to run everything. I've installed CUDA (cuda, cuda-nvcc-11-1, and nvidia-cuda-toolkit), and everything compiles fine with catkin_make. When I try to run the sonar_tank_blueview_p900.launch example, I'm getting a "undefined symbol: cufftPlan1d" error. Is something missing from CMakeLists.txt or the launch file I'm using? |
Core part of the sonar calculation is done! 👍
Progress
To-dos (in priority order)
1. Plugin diagram2. How-to install and run2.1. Install CUDAOption 1. Install CUDA on the host machine (I installed latest version CUDA 11 download link) Option 2. Use docker file located at
2.2. Quickstart
roslaunch nps_uw_sensors_gazebo sonar_tank_blueview_p900.launch verbose:=true
Benchmark
|
I had missing library at CMakeLists. I've cleaned everything up again and tested on clean Docker environments. Could you try it again? |
@woensug-choi Everything starts up ok now, but as soon as I move the sonar I get the following error and plugin stops. Kernel Launch Failed It's entirely likely that I installed some of the CUDA libraries incorrectly or have the wrong versions. Any suggestions? |
@dtdavi1 @seankrag @crvogt @dtdavi1 Thank you for the comment on GitHub soft reset. Made soft reset and force push on this branch. @seankrag It looks promising! just needs some iterations to match the format. Can you try it again now? @crvogt Were you able to run it? Can you try it again? Also, it would be great if you can add some missing instructions on installation at https://github.com/Field-Robotics-Lab/dave/wiki/Multibeam-Forward-Looking-Sonar#Requirements |
@woensug-choi I've managed to get it running. The quickstart launch command is eating a lot of RAM for me (>10GB per min). Commenting out Is there an argument I need to pass or is it collecting data in a rosbag? |
@woensug-choi , the message format is identical. I suggest we hold off on switching to the Github repository for now until I finish testing the viewer. |
I am not sure what could manage those large memory usages. But in practical use, the line you've commented out should be commented out. ( |
Commenting out the `real_image`,`depth_image`,`normal_image` viewer for saving memory usage for the initial start-up settings.
…y in azimuth-major order. This change enables usage of UW:APL's libdraw_sonar tool to view sonar data.
This allows me to run the uw-apl viewer, which converts an imaging_sonar_msgs/SonarImage into a sensor_msgs/Image for display by ROS image_view. I still need to investigate whether we can fine-tune the uw-apl viewer, but your OpenCV code currently produces a higher-resolution image. See comparison below. |
@seankrag Glad to see it showing the image! Thanks! Are there any methods to modify the color scale max/min? @crvogt This looks like something we could reference! https://github.com/apl-ocean-engineering/libdraw_sonar/blob/c526cc2bde57cae0e598eaf891680d5a4fcd3e67/lib/DrawSonar.cpp |
Haven't been able to get a sonar image at all yet. To even publish on the However, when I subscribe to EDIT: Saw your note about setting to "Hot" and "0.25m". Getting an image now! (though, still with the RAM draw) |
@woensug-choi I will check, but much of the viewer code settings appear baked-in. Separately, I followed up with Laura Lindzey, who commented on the difference between our 32-bit OpenCV image and the APL:UW viewer's 8-bit image (it can also support16-bit images). She is happy to extend their viewer to 32-bit images if we like, but all of their sonar produce only 8- or 16-bit intensities (and she wasn't aware of actual sonars that produce higher levels of precision). We already cast our data into 8-bit values for the SonarImage msg, so this may really just a design/philosophical question: @bsb808 Do we need/want the high-precision currently used by our sonar model? Could we realize performance benefits by using 16-bit instead of 32-bit? |
Introducing new bundled viewer included in this PR (cv mapping fixed)
@crvogt The reference I've found was pretty straight forward to implement! Thank you for noticing the RAM usage! I was using a machine with 64GB RAM... I've found some not freeing memory allocation on Cuda calculation! Now it should be fixed! Could you do try user experience all over once again? I've updated Wiki page too. @seankrag I've made a new viewer bundled in this PR referencing UW APL's viewer codes. Currently, it is using the 16-bit image msg (OpenCV's CV_16UC1 sent as msgs MONO16). I was getting exactly the same image of your post with 8-bit data (CV_8UC1 OpenCV format; MONO8 msg format). In summary, I think 16-bit looks good enough. The only advantage of having 32-bit float data on my side is that it's easy to colorize with ROS bundled @dtdavi1 I believe this PR is now finally ready to go for the official review! We could use the last iteration to fix things if any problems are found before our celebrating meeting. |
f819549
to
7baa575
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Everything seems to run correctly and the images are all right. I am seeing 2 "Node::Advertis(): Error advertising a topic. Did you forget to start the discovery service?" messages, but I don't know what they are associated with.
I added one commit to fix the static code checks. A different check is still failing because of an error associated with finding the APL message repo.
Thank you for the quick review!
(UPDATE) |
Changing SonarImage.msg source from Gitlab to Github
…ensors_gazebo into gpu_sonar_re
Progress
To-dos (in priority order)
Notes on Sonar Beam/ray processing implementation