at_sonde_ros_driver
A ROS 2 driver to stream the monitored parameters of an In-Situ Aqua TROLL Multiparameter Sonde.
README
at_sonde_ros_driver
Overview
This package provides a ROS 2 driver to stream the monitored parameters of an In-Situ Aqua TROLL Multiparameter Sonde, through modbus serial communication.
This package has been tested with the AT600 Sonde.
Installation
Make sure you have ROS 2 installed on your system.
Binary
To install the binary package, use the following command:
sudo apt update
sudo apt install ros-jazzy-at-sonde-ros-driver
From Source
To build the package from source, follow these steps:
Create a workspace directory:
mkdir -p ~/ros2_ws/src
cd ~/ros2_ws/src
Clone the repository:
git clone https://github.com/ma-shangao/at_sonde_ros_driver.git
Prepare the required dependencies with rosdep:
cd ~/ros2_ws
rosdep install --from-paths src --ignore-src -r -y
Build the package:
colcon build
ROS 2 Node: at_sonde_ros_driver_node
Published Topics
The node publishes the following topics:
Topic Name |
Message Type |
Description |
---|---|---|
see ROS param |
|
Publisher of selected sonde parameters |
… |
ROS Parameters
The configurable ROS parameters for the node:
Parameter Name |
Type |
Default Value |
Description |
---|---|---|---|
|
int |
19200 |
Baud rate for serial communication |
|
bool |
false |
Enable debug messages for modbus communication |
|
int |
700000 |
Timeout for modbus communication in microseconds |
|
int |
0 |
Timeout for modbus communication in seconds |
|
list[string] |
[“temperature”, “battery_remaining”] |
Names of the topics to publish the streamed data |
|
int |
5 |
Number of retries for modbus communication |
|
bool |
false |
Scan the sensor on the first use after reconfiguration |
|
string |
“/dev/ttyUSB0” |
Serial port for modbus communication |
|
int |
1 |
Sonde address for modbus communication |
|
list[int] |
[5450, 5674] |
Register addresses of the parameters to be streamed |
The pub_topic_names
and streaming_param_reg_adds
parameters must be set in pairs. The first element of pub_topic_names
corresponds to the first element of streaming_param_reg_adds
, and so on.
Usage
To run the node, use the following command:
ros2 run at_sonde_ros_driver at_sonde_ros_driver_node
The ROS parameters can also be configured using a YAML file.
ros2 run at_sonde_ros_driver at_sonde_ros_driver_node --ros-args --params-file <path_to_yaml_file>
Known Issues
Some ROS 2 parameters can currently only be set at the start of the node.