Environment
- OS Version: Docker image: ros-jazzy-base
- ROS2 version: Jazzy
- Source or binary build: binary, from apt.
- Ros_gz_bridge version:
1.0.22-1noble.20260412.043437
Description
- When supplying a service bridge configuration to ros_gz_bridge, the startup enters
an infinite loop and the node is not visible using ros2 node list
- This happens if the configuration includes services only and no topics
- Expected behavior: the bridge starts normally, as when specifying regular topics
Steps to reproduce
- Write the following to a YAML config file:
- ros_type_name: ros_gz_interfaces/srv/ControlWorld
service_name: /world/default/control
gz_req_type_name: gz.msgs.WorldControl
gz_rep_type_name: gz.msgs.Boolean
- Start the bridge (e.g. using a launch file or the command line), passing the YAML file to it:
bridge = Node(
package="ros_gz_bridge",
executable="parameter_bridge",
name="service_bridge",
output="screen",
parameters=[ { "config_file": gz_bridge_config} ], )
-
Observe when startup enters a loop
-
Now modify the YAML to also include a topic to bridge:
- ros_type_name: std_msgs/msg/String
ros_topic_name: /dummy
gz_topic_name: /dummy
gz_type_name: gz.msgs.StringMsg
direction: ROS_TO_GZ
- ros_type_name: ros_gz_interfaces/srv/ControlWorld
service_name: /world/default/control
gz_req_type_name: gz.msgs.WorldControl
gz_rep_type_name: gz.msgs.Boolean
- Launch the bridge again and the above loop does not occur.
Output
Interestingly, the bug does not occur, if I pass the bridges to create through extra_bridge_params (supported in Jazzy) using the RosGZBridge launch action:
bridge = RosGzBridge(
bridge_name="my_bridge",
config_file=gz_bridge_config,
extra_bridge_params={
"bridge_names": ["service_bridge"],
"bridges.service_bridge.service_name": "/world/default/control",
"bridges.service_bridge.ros_type_name": "ros_gz_interfaces/srv/ControlWorld",
"bridges.service_bridge.gz_req_type_name": "gz.msgs.WorldControl",
"bridges.service_bridge.gz_rep_type_name": "gz.msgs.Boolean",
}
)
Not certain, but could this be due to handles being empty which cause infinite spinning?
Environment
1.0.22-1noble.20260412.043437
Description
an infinite loop and the node is not visible using
ros2 node listSteps to reproduce
Observe when startup enters a loop
Now modify the YAML to also include a topic to bridge:
Output
Interestingly, the bug does not occur, if I pass the bridges to create through extra_bridge_params (supported in Jazzy) using the RosGZBridge launch action:
Not certain, but could this be due to handles being empty which cause infinite spinning?