Skip to content

Jazzy Harmonic Bridge Setup

Setup

  • jazzy docker image
  • harmonic docker image
  • both run using docker-compose

gz_transport

gz_transport is Gazebo's communication middleware, used for inter-process communication (IPC) between different Gazebo components — like sensors, plugins, UI, and even ROS bridges.

  • GZ_PARTITION: Isolates topic namespaces between different simulations
  • GZ_DISCOVERY_SERVER: IP address of the main discovery server (usually the Gazebo server machine)
  • GZ_TRANSPORT_IP: IP address the local process uses to advertise itself to others

jazzy

bridge configuration

config/gz_bridge.yaml
1
2
3
4
5
- ros_topic_name: "clock"
  gz_topic_name: "clock"
  ros_type_name: "rosgraph_msgs/msg/Clock"
  gz_type_name: "gz.msgs.Clock"
  direction: GZ_TO_ROS
launch/clock.launch.py
import os

from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch.actions import DeclareLaunchArgument
from launch.actions import IncludeLaunchDescription
from launch.launch_description_sources import PythonLaunchDescriptionSource
from launch.substitutions import LaunchConfiguration
from launch_ros.actions import Node

PACKAGE_NAME = 'gz_tutorial'

def generate_launch_description():
    ld = LaunchDescription()

    bridge_params = os.path.join(get_package_share_directory(PACKAGE_NAME),'config','gz_bridge.yaml')
    ros_gz_bridge = Node(
        package="ros_gz_bridge",
        executable="parameter_bridge",
        arguments=[
            '--ros-args',
            '-p',
            f'config_file:={bridge_params}',
        ],
        parameters=[
            {'use_sim_time': True},
        ],
    )

    ld.add_action(ros_gz_bridge)


    return ld

harmonic