This package provides a ROS 2 driver for the Water Linked Sonar 3D-15, a real-time multibeam imaging sonar. The sonar streams 3D range images over UDP multicast, which are decoded and published as standard ROS messages:
- 3D point clouds:
sensor_msgs/PointCloud2on/sonar_point_cloud - Raw range images:
sensor_msgs/Imageon/sonar_range_image
The driver listens to RIP1 multicast packets, extracts and parses RangeImage protobuf messages, and converts the sonar data into formats usable by standard ROS visualization and processing tools.
- Receives and decodes RIP1 packets via UDP multicast
- Publishes point clouds and range images at real-time rates
- Automatically enables sonar acoustics and udp multicast on startup
- Compatible with ROS 2 (tested on Jazzy)
| Topic | Message Type | Description |
|---|---|---|
/sonar_point_cloud |
sensor_msgs/PointCloud2 |
3D point cloud in ROS frame |
/sonar_range_image |
sensor_msgs/Image |
Raw float32 range image (in meters) |
cd ~/ros2_ws/src
git clone --recurse-submodules https://github.com/waterlinked/Sonar-3D-15-ROS-driver.gitInstall requirements:
pip install -r requirements.txtChange to your sonars IP-address in the sonar3d.launch.py file:
{'IP': '192.168.194.96'}, # Change to your sonar IP, '192.168.194.96' is the fallback ip.Alternatively, you can modify the default parameter in multicast_listener.py directly.
self.declare_parameter('IP', '192.168.194.96')# <-- your sonar's IP here, '192.168.194.96' is the fallback ip.cd ~/ros2_ws
source /opt/ros/jazzy/setup.bash
colcon build --packages-select sonar3d
source install/local_setup.bashros2 launch sonar3d sonar3d.launch.pyA script has been included, which onverts Sonar 3D-15 .sonar files to ROS2 bagfiles.
Requirements:
- Tested with ROS2 Humble and Jazzy
- numpy, protobuf, sonar_3d_15_protcol_pb2.py
- sensor_msgs, std_msgs, builtin_interfaces
- cv_bridge (for ROS2)
Usage:
- Start recording in one terminal:
ros2 bag record -o <output_bag_dir> /sonar3d/range_image /sonar3d/point_cloud
- In another terminal, run:
python3 sonar_to_bag.py --file <sonar_file.sonar> --realtime-factor 1.0
The sonar_to_bag.py has been shared by Marios Xanthidis of SINTEF Ocean, with acknowledgements:
- Supported by the Research Council of Norway (EchoNav: NO-359447)
- Filtering and name conventions adapted from Alberto Quattrini Li @ Dartmouth His repository for ROS1 integration of the Sonar 3D-15 can be found in: https://github.com/quattrinili/Sonar-3D-15-api-example/tree/ros1
This package is distributed under the MIT License.