Skip to content

tuw-robotics/ros2_cyclonedds_wireguard

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

14 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ros2_cyclonedds_wireguard

ROS2 Sample Project with wireguard and cyclonedds with a publisher subscriber example.

In order to use ROS2 with Cyclone DDS over a wireguard network you have to export the enviroment variables RMW_IMPLEMENTATION and CYCLONEDDS_URI.

export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
export CYCLONEDDS_URI=file:///$(pwd)/cyclonedds.xml 

Setup

Install cyclonedds with:

sudo apt install ros-$ROS_DISTRO-rmw-cyclonedds-cpp

Change the cyclonedds.xml to fit your setup.

  • Set the correct NetworkInterface
    Currently:
    • wg-n16
  • Define the peers used with there wireguard ip adresses
    Currently:
    • 192.168.33.80
    • 192.168.33.51

Example

Compile the project with

export RMW_IMPLEMENTATION=rmw_cyclonedds_cpp
export CYCLONEDDS_URI=file:///$(pwd)/cyclonedds.xml  
colcon build

on 192.168.33.80 run:

ros2 run examples_rclcpp_minimal_subscriber subscriber_lambda

on 192.168.33.51 run:

ros2 run examples_rclcpp_minimal_publisher publisher_lambda

Tested

The setup was testet on

  • Ubuntu 22.04 with ROS humble.

About

ROS2 Sample Project with wireguard

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages