Skip to content

ros_gz_bridge parsing parameter problem #116

@xxh3289147418

Description

@xxh3289147418

Issue in ROS 2 Jazzy's display.launch.py
At line 40:

python
Copy Code
ros_gz_bridge = RosGzBridge(
bridge_name='ros_gz_bridge',
config_file=bridge_config_path,
container_name='ros_gz_container',
create_own_container='False',
use_composition='True',
)
Runtime Error
The __extra_bridge_params parameter fails to parse correctly in ros_gz_bridge.py:

python
Copy Code
parsed_bridge_params.update(self.__extra_bridge_params[0])
Error trace:

text
Copy Code
File "/opt/ros/jazzy/lib/python3.12/site-packages/ros_gz_bridge/actions/ros_gz_bridge.py", line 246, in execute
parsed_bridge_params.update(self.__extra_bridge_params[0])
~~~~~~~~~~~~~~~~~~~~~~~~~~
IndexError: string index out of range
Temporary Workaround
Manually inject parameters:

python
Copy Code
ros_gz_bridge = RosGzBridge(
bridge_name='ros_gz_bridge',
config_file=bridge_config_path,
container_name='ros_gz_container',
create_own_container='False',
use_composition='True',
extra_bridge_params=[{'use_sim_time': LaunchConfiguration('use_sim_time')}]
)
Recommended Fix
Add parameter validation in RosGzBridge class to handle empty/undefined __extra_bridge_params cases.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions