Skip to content

A set of ROS2 drivers for transport-layer protocols.

License

Notifications You must be signed in to change notification settings

agbread/transport_drivers

 
 

Repository files navigation

transport_drivers (Fork)

A set of ROS 2 drivers for transport-layer protocols. This repository currently utilizes the stand-alone ASIO library for most transport-layer functionality.

Note (Fork notice)
This repository is a fork of ros-drivers/transport_drivers.

If you are looking for the official upstream project, please refer to the upstream link above.

License

This project is distributed under the Apache-2.0 license.
License notices and attributions from the upstream project are retained in this fork.

Supported Drivers

UDP Driver

A package which encapsulates basic receiving and sending of UDP data.

Provided within this package are the following executables:

  • udp_receiver_str_node_exe: can receive UDP data and publish ROS2 string topic
  • udp_sender_str_node_exe: can receive ROS2 string topic and send UDP data asynchronously
  • udp_bridge_str_node_exe: combines both receiver and sender nodes into one

This package also provides a udp_driver library without ROS 2 dependencies, which can be used elsewhere.

Serial Driver

A package which encapsulates basic receiving and sending of serial data.

Provided within this package is the following executable:

  • serial_bridge: combines both receiver and sender nodes into one

This package also provides a serial_driver library without ROS 2 dependencies, which can be used elsewhere.

IO Context

A library to write synchronous and asynchronous networking applications.

Quick start

Clone this fork into your workspace (typically workspace/src/<clone-repo-here>):

mkdir -p ~/ros2_ws/src && cd ~/ros2_ws/src
git clone https://github.com/agbread/transport_drivers.git

Install dependencies using rosdep from your top-level workspace directory:

cd ..
rosdep install --from-paths src --ignore-src -r -y

Once you have the repository cloned and dependencies installed, you can now go ahead and compile:

colcon build

After successful compilation, you should be able to source your newly built packages:

source install/setup.bash

...and now you should be able to run your newly built executables. Here is how you would launch the udp_driver bridge node:

ros2 run udp_driver udp_bridge_node_exe --ros-args --params-file ./src/transport_drivers/udp_driver/params/example_udp_params.yaml

UDP ↔ ROS 2 String Bridge

This fork includes bridge executables that convert between:

  • ROS 2 std_msgs/msg/String topics and UDP packets
  • UDP packets and ROS 2 std_msgs/msg/String topics

1) ROS 2 String Topic → UDP (Sender Bridge)

  • Input (ROS 2 topic): /udp_write_string (std_msgs/msg/String)
  • Output: UDP packets sent to the configured IP/port
ros2 run udp_driver udp_senderstr_bridge_node_exe --ros-args --params-file /home/home/ros2_ws/src/transport_drivers/udp_driver/params/udp_sender_params.yml

2) UDP → ROS 2 String Topic (Receiver Bridge)

  • Input: UDP packets received on the configured IP/port
  • Output (ROS 2 topic): /udp_read_string (std_msgs/msg/String)
ros2 run udp_driver udp_receiverstr_bridge_node_exe --ros-args --params-file /home/home/ros2_ws/src/transport_drivers/udp_driver/params/udp_receiver_params.yml

3) udp_driver bridge node:

ros2 run udp_driver udp_bridge_str_node_exe --ros-args --params-file /home/home/ros2_ws/src/transport_drivers/udp_driver/params/example_udp_params.yaml

Testing

Comprehensive unit tests have been written for every package within this repository.

To run them yourself, use the normal command from your top-level workspace directory:

colcon test

About

A set of ROS2 drivers for transport-layer protocols.

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • C++ 87.9%
  • CMake 9.3%
  • Python 2.8%