ROS2Sonic  0.2.0
A ROS2 driver for R2Sonic MBES
Loading...
Searching...
No Matches
ROS2Sonic

About

<figure><figcaption></figcaption></figure>

The ROS2Sonic package is a ROS2 driver designed to receive data from a R2Sonic multibeam and re-publish the data as a relevant ROS message.

Refer Complete API documentation for additional details

NOTE: This project is currently in pre-release. It has been tested with R2Sonic hardware but the interface is subject to change until the first major release.

Installation

This project can be installed like any other ROS2 source package

Begin by getting the package the dependencies

First clone the package to your ROS workspace source directory

git clone https://github.com/USF-COMIT/ros2sonic.git

This package uses the marine_messages package. Clone them to your work space's src directory

git clone -b ros2 https://github.com/apl-ocean-engineering/marine_msgs.git

The rest of the dependencies can be acquired through rosdep. Run the following command from your workspace root directory.

rosdep install --from-paths src -y --ignore-src

Compile

Finally you can compile the package from the root directory of your ros workspace

colcon build

Getting Started

With R2Sonic Hardware

This package has a sample launch file for testing. You may need to edit or create your own r2sonic/params/bench_test.yaml to match the port numbers of your unit.

The driver can be started with the following command

ros2 launch r2sonic bench_test.py

Without R2Sonic Hardware Using Logged Data

If you do not have an R2Sonic unit available or want a more convenient test in the lab you can replay captured R2Sonic packets using the replay_pcap.sh utility with the following command:

ros2 run r2sonic replay_pcap.sh <pcap file> <interface>

Replace <pcap file> with the log you wish to replay. You can find more about these files in the #logs section. Replace <interface> with one of your computer's interfaces with a vaild IP address. You can list your interfaces and their associated IP address with the following command:&#x20;

ip addr show

Additional Utilities

There are a few other packages associated with the marine_msgs standards that may be useful for processing and visualizing data generated by this driver.

Visualizing the data

Acoustic Msgs Tools Is a collection of tools to view and interpret messages in the marine_msgs package.

&#x20;wc\_gui2-2022-02-22\_15 21 30

Topics

This driver publishes the marine_msgs that bes correspond with the raw R2Sonic types (described in #logs). The raw binary messages are also published under the /r2sonic/raw/* topics. These raw topics can be converted to marine_msgs using the the api functions in the conversions namespace.

IMPORTANT NOTE ABOUT LOGGING: This project can be used for data acquisition in it's pre-release state. However, it is imperative that you log the r2sonic_interfaces/msg/* messages. The marine_msgs package is currently subject to change and may not record important data until this package is out of -re-release.

Below is a description of the available (default) topic

  • /r2sonic/acoustic_image the acoustic_msgs::msg::RawSonarImage representation of the the R2Sonic AID0, acoustic image, packet. This is basically a down sampled water column view to reduce data sizes.
  • /r2sonic/detections the detection associated with a given sonar ping from the R2Sonic BTH0, bathymetric detection, message.
  • /r2sonic/raw/aid0 the raw acoustic image data in big endian binary directly from the sonar.&#x20;
  • /r2sonic/raw/bth0 the raw acoustic image data in big endian binary directly from the sonar.&#x20;

Parameters

topics: # Any topic specified with an empty string , "", will not be computed or published.
detections: "~/detections" # The topic to publish your acoustic_msgs::msg::Detections
bth0: "~/raw/bth0" # The topic to publish raw bathy data
ports:
bathy: 4000 #65500 # The port you are receiving bathy data on
sonar_ip: "10.0.0.86" # The IP address of the sonar. This is where you will send sonar commands.
# does not need to be specified if you are listen only
interface_ip: "0.0.0.0" # The IP of the interface you want to listen on. Default ["0.0.0.0"]
# If you want to listen on all interfaces specify "0.0.0.0"
tx_frame_id: "r2sonic_tx" # The frame id of the acoustic transmitter
rx_frame_id: "r2sonic_rx" # The frame id of the acoustic receiver

Testing Logs and R2Sonic Data Format Documentation

R2Sonic provides developers with PCAP logs of R2Sonic network traffic associated with all their datatypes. &#x20;

To access PCAP logs and Official Data Format Definitions:

Credits

This package was created by Kris Krasnosky of the USF COMIT group and offered under the Apache 2.0 License.

This package was made possible through the technical support and doccumentation of R2Sonic. &#x20;