Native Visualization
This script launches RViz2 (and optionally the Zenoh bridge) directly on the host system. It's designed for visualization of robot state and sensor data for both simulation and real hardware.
Prerequisites
- ROS 2 Humble (desktop recommended)
- Cyclone DDS (ROS 2 RMW implementation)
- Zenoh bridge for ROS 2 DDS (robot mode only)
- Python 3
Installation (Ubuntu)
i. Install ROS 2 Humble
Follow the official ROS 2 Humble installation guide.
ii. Install Cyclone DDS RMW package
sudo apt update
sudo apt install ros-humble-rmw-cyclonedds-cpp
iii. Install Zenoh bridge (robot mode only)
echo "deb [trusted=yes] https://download.eclipse.org/zenoh/debian-repo/ /" | sudo tee -a /etc/apt/sources.list > /dev/null
sudo apt update
sudo apt install zenoh-bridge-ros2dds=1.2.1
Environment Setup
From the SDK root:
source /opt/ros/humble/setup.bash
colcon build
source install/setup.bash
Quick Start
⚠️ IMPORTANT:
BEFORE LAUNCHING THE VISUALIZATION, ENSURE THAT EITHER THE ROBOT IS POWERED ON AND RUNNING, OR THE SIMULATION IS ALREADY STARTED.
The visualization will not display meaningful data unless the robot or simulation is actively publishing state and sensor information.
Simulation Mode (Default)
Run from the SDK root:
python3 visualization/native_visualization/launch.py --character <character_name>
Robot Mode (With Zenoh Bridge)
To visualize data from a physical robot using the Zenoh bridge, run:
⚠️ IMPORTANT:
FOR ZENOH TO CONNECT TO THE ROBOT, SET --target-ip (OR target_ip IN common/configs/config.yaml) WHEN USING --with-zenoh.
python3 visualization/native_visualization/launch.py --character <character_name> --with-zenoh --target-hostname <hostname> --target-ip <robot_ip>
Command-Line Arguments
usage: native_visualization/launch.py [-h] [--character CHARACTER]
[--target-hostname TARGET_HOSTNAME]
[--target-ip TARGET_IP] [--with-zenoh]
[--debug]
Launch Zenoh bridge and RViz2 on your machine.
required for robot argument:
--target-ip TARGET_IP
required IP address to use for Zenoh endpoints when working with real robot.
Defaults to --target-hostname.
optional arguments:
-h, --help Show this help message and exit.
--character CHARACTER Name of the character to launch (default: miroki).
--target-hostname TARGET_HOSTNAME
Hostname or IP address for Zenoh endpoints (default: from config or localhost).
--with-zenoh Launch with Zenoh bridge (default: False). Set this when working with a robot.
--debug Enable debug logging.
Notes
- Character Name: Replace
<character_name>with the name of your robot character. The default ismiroki. - Zenoh Version: Ensure the Zenoh bridge version matches what is running on the robot for compatibility.
- Mesh lookup issues: If RViz cannot find meshes, ensure the workspace is built and sourced in the current shell.
- Troubleshooting: Use the
--debugflag for detailed logs if you encounter any issues.