-
 
No version for distro humble. Known supported distros are highlighted in the buttons above.
No version for distro iron. Known supported distros are highlighted in the buttons above.

network_bridge package from network_bridge repo

network_bridge

Package Summary

Tags No category tags.
Version 1.0.2
License MIT License
Build type AMENT_CMAKE
Use RECOMMENDED

Repository Summary

Checkout URI https://github.com/brow1633/network_bridge.git
VCS Type git
VCS Version main
Last Updated 2024-07-11
Dev Status MAINTAINED
CI status No Continuous Integration
Released RELEASED
Tags No category tags.
Contributing Help Wanted (0)
Good First Issues (0)
Pull Requests to Review (0)

Package Description

Allows for arbitrary network links (UDP, TCP, etc) to bridge ROS2 messages

Additional Links

No additional links.

Maintainers

  • Ethan Brown

Authors

No additional authors.

Network Bridge

CI

Network Bridge is a lightweight ROS2 node designed for robust communication between robotic systems over arbitrary network protocols. Supporting UDP and TCP protocols out of the box, this packages seamlessly bridges ROS2 topics across networks, facilitating effective remote communications between a base station and robotic systems, or between multiple robotic systems.

Installation

Simply clone the repository into your ROS2 workspace and build with colcon build.

Usage

Demo

TCP

ros2 launch network_bridge tcp.launch.py

ros2 topic pub /tcp1/MyDefaultTopic std_msgs/msg/String "data: 'Hello World'"

ros2 topic echo /tcp2/MyDefaultTopic

UDP

ros2 launch network_bridge udp.launch.py

ros2 topic pub /udp1/MyDefaultTopic std_msgs/msg/String "data: 'Hello World'"

ros2 topic echo /udp2/MyDefaultTopic

Configuration

Simply setup the network interface parameters and list your desired topics to get started. If you are using UDP over cellular data, it is recommended to setup a VPN to facilitate connection. Also, please note that no encryption occurs within this package. Currently, if you would like encryption, you must use a VPN.

See config/Udp1.yaml for a description of all parameters, as well as the TCP example configuration files.

Minimal Example

The following configuration examples demonstrate a robot sending a message on /gps/fix over UDP to a basestation that will then re-publish the message. This works seamlessly on all message types, so long as they are built and sourced on both ends of the transmission.

Robot

/udp_sender:
  ros__parameters:
    UdpInterface:
      local_address: "192.168.1.2"
      receive_port: 5001
      remote_address: "192.168.1.3"
      send_port: 5000
    
    topics:
      - "/gps/fix"

Base Station

/udp_receiver:
  ros__parameters:
    UdpInterface:
      local_address: "192.168.1.3"
      receive_port: 5000
      remote_address: "192.168.1.2"
      send_port: 5001

Choice of protocol

  • UDP: Use UDP for low-latency, high-throughput communications, where occasional data loss is tolerable. Ideal for real-time telemetry data like sensor streams.
  • TCP: Opt for TCP when data integrity and reliability are critical. This ensures that control commands and state transitions are reliably delivered, though with potentially higher latency.

Network protocols are implemented as pluginlib plugins, allowing the creation of arbitrary interfaces using the abstract class include/network_interfaces/network_interface_base.hpp. Any interface that can send and receive bytes could theoretically be implemented, including protocols that go beyond point-to-point communication, such as ZMQ. Please consider opening a pull request if you implement a new network interface.

Tuning

This node can be launched with logger level DEBUG, which provides useful information for tuning the compression, rate and stale message parameters. For each message that is sent, the receiving side will output the number of bytes received, the decompressed size in bytes and the transmission delay.

Acknowledgements

This package was developed for use in the Indy Autonomous Challenge by the Purdue AI Racing team. Inspiration was taken from mqtt_client (https://github.com/ika-rwth-aachen/mqtt_client/).

CHANGELOG

Changelog for package network_bridge

1.0.2 (2024-07-10)

  • Move launch_testing_ament_cmake requirement to if testing block
  • Contributors: Ethan Brown

1.0.1 (2024-07-10)

  • Merge branch 'main' of github.com:brow1633/tether
  • Updated package.xml deps
  • Update README.md
  • Add release to CI, turn off fail fast
  • Update README.md
  • add pkg-config
  • CI
  • Python linting
  • Create CI.yml
  • Add boost system for asio
  • Remove un-needed from package.xml
  • Dependency and CMake Changes
  • Remove Boost as dependency
  • Added const for jazzy
  • Fixed package.xml deps
  • Change package name
  • Use bit_cast instead of reinterpret_cast
  • Fix TCP Packet Framing
  • linting
  • Merge branch 'main' of github.com:brow1633/tether
  • Updated license
  • Update README.md
  • Contributors: Ethan Brown, brow1633

1.0.0 (2024-05-31)

  • Update README.md
  • Update README.md
  • Update README.md
  • Update README.md
  • Added subscription namespaces, docs
  • Added license to one file
  • Updated readme
  • init commit
  • Initial commit
  • Contributors: Ethan Brown, brow1633

Wiki Tutorials

This package does not provide any links to tutorials in it's rosindex metadata. You can check on the ROS Wiki Tutorials page for the package.

Launch files

No launch files found

Messages

No message files found.

Services

No service files found

Plugins

No plugins found.

Recent questions tagged network_bridge at Robotics Stack Exchange

No version for distro rolling. Known supported distros are highlighted in the buttons above.
No version for distro noetic. Known supported distros are highlighted in the buttons above.
No version for distro galactic. Known supported distros are highlighted in the buttons above.
No version for distro melodic. Known supported distros are highlighted in the buttons above.