Skip to content

RICE-unige/zenoh_internet_bridge

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 

Repository files navigation

Zenoh ROS 2 Bridge

This directory contains the Zenoh bridge setup for connecting ROS 2 systems over the internet, used for linking a Cloud PC (Isaac Sim) with a Local PC (RViz2/Control).


🚀 Quick Start

0. On Your Local PC

Clone this repository and ensure the Zenoh bridge is installed:

git clone https://github.com/RICE-unige/zenoh_internet_bridge.git ~/zenoh_internet_bridge
cd ~/zenoh_internet_bridge

# Download and extract the binary (v1.6.2)
wget https://github.com/eclipse-zenoh/zenoh-plugin-ros2dds/releases/download/1.6.2/zenoh-plugin-ros2dds-1.6.2-x86_64-unknown-linux-gnu-standalone.zip
unzip zenoh-plugin-ros2dds-1.6.2-x86_64-unknown-linux-gnu-standalone.zip
chmod +x zenoh-bridge-ros2dds

1. On Your Cloud PC

SSH into your cloud instance and run:

mkdir -p ~/zenoh_internet_bridge && cd ~/zenoh_internet_bridge
wget https://github.com/eclipse-zenoh/zenoh-plugin-ros2dds/releases/download/1.6.2/zenoh-plugin-ros2dds-1.6.2-x86_64-unknown-linux-gnu-standalone.zip
unzip zenoh-plugin-ros2dds-1.6.2-x86_64-unknown-linux-gnu-standalone.zip
chmod +x zenoh-bridge-ros2dds

2. Configure Firewall

Open TCP/UDP Port 7447 in your cloud provider's firewall settings.

Important

Restrict the source IP to your local PC's public IP (curl ifconfig.me) for security. Never use 0.0.0.0/0.

3. Start Both Bridges

On Cloud PC:

source /opt/ros/humble/setup.bash  # Adjust to your distro
./zenoh-bridge-ros2dds -l tcp/0.0.0.0:7447

On Local PC (this directory):

./connect_to_cloud.sh <YOUR_CLOUD_IP>

🛠️ Installation & Setup

Local PC

To install the Zenoh bridge on your local PC:

# Clone the repository
git clone https://github.com/RICE-unige/zenoh_internet_bridge.git ~/zenoh_internet_bridge
cd ~/zenoh_internet_bridge

# Download Zenoh bridge binary (v1.6.2)
wget https://github.com/eclipse-zenoh/zenoh-plugin-ros2dds/releases/download/1.6.2/zenoh-plugin-ros2dds-1.6.2-x86_64-unknown-linux-gnu-standalone.zip

# Extract and make executable
unzip zenoh-plugin-ros2dds-1.6.2-x86_64-unknown-linux-gnu-standalone.zip
chmod +x zenoh-bridge-ros2dds

Cloud PC (Detailed)

If you prefer a more robust setup on the cloud, follow these steps:

  1. Install: (See Quick Start Step 1)
  2. Setup Startup Script:
    cat > ~/zenoh_internet_bridge/start_bridge.sh << 'EOF'
    #!/bin/bash
    source /opt/ros/humble/setup.bash # or jazzy/iron
    cd ~/zenoh_internet_bridge
    ./zenoh-bridge-ros2dds -l tcp/0.0.0.0:7447
    EOF
    chmod +x ~/zenoh_internet_bridge/start_bridge.sh

Cloud Firewall Guides

Provider Key Settings
AWS EC2 Security Groups -> Inbound Rule: Custom TCP, Port 7447, Source: <LOCAL_IP>/32
GCP VPC Network -> Firewall Rules: Ingress, TCP/UDP 7447, Source: <LOCAL_IP>/32
Azure Networking -> Add inbound port rule: Port 7447, TCP/UDP, Source: <LOCAL_IP>
Oracle Security List -> Add Ingress Rule: TCP, Port 7447, Source CIDR: <LOCAL_IP>/32

🔗 Usage & Verification

Connection

Once both bridges are active, verify the connection on your local PC:

source /opt/ros/jazzy/setup.bash
ros2 topic list        # Should list Isaac Sim topics (e.g., /tf, /joint_states)
ros2 topic hz /tf      # Check data flow frequency

Visualization (Local PC)

rviz2

In RViz2, set the Fixed Frame correctly (e.g., map or odom) to see the streamed data.


⚙️ Advanced Configuration

Run as a Systemd Service (Cloud PC)

To ensure the bridge starts automatically on boot:

sudo tee /etc/systemd/system/zenoh-bridge.service << EOF
[Unit]
Description=Zenoh ROS 2 Bridge
After=network.target

[Service]
Type=simple
User=$USER
Environment="ROS_DISTRO=humble"
ExecStart=/home/$USER/zenoh_internet_bridge/zenoh-bridge-ros2dds -l tcp/0.0.0.0:7447
Restart=on-failure
RestartSec=5

[Install]
WantedBy=multi-user.target
EOF

sudo systemctl daemon-reload && sudo systemctl enable zenoh-bridge.service && sudo systemctl start zenoh-bridge.service

Performance & Options

  • Bandwidth Throttling: --max-frequency 10
  • Namespacing: --namespace /robot1
  • Manual Local Connect: ./zenoh-bridge-ros2dds -e tcp/<CLOUD_IP>:7447

❓ Troubleshooting

  • No Connection: Verify port 7447 is open and you are using the correct Cloud IP.
  • No Topics: Ensure Isaac Sim is running and publishing on the cloud PC. Check if ROS_DOMAIN_ID matches on both.
  • Latency: Check network ping. Use compressed image transport for camera feeds.

🔐 Security Best Practices

  1. IP Restriction: Always restrict firewall access to your specific public IP.
  2. VPN: Use Tailscale, WireGuard, or Husarnet instead of port forwarding.
  3. Monitor: Check service logs: journalctl -u zenoh-bridge -f.

📚 Resources

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages