Skip to content

Commit

Permalink
Start gz bridge for clock topic (#60)
Browse files Browse the repository at this point in the history
Start a gz_sim_bridge to have the /clock topic available.
  • Loading branch information
fmauch authored Oct 22, 2024
1 parent b586757 commit 26f81e0
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 0 deletions.
11 changes: 11 additions & 0 deletions ur_simulation_gz/launch/ur_sim_control.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -183,6 +183,16 @@ def launch_setup(context, *args, **kwargs):
condition=UnlessCondition(gazebo_gui),
)

# Make the /clock topic available in ROS
gz_sim_bridge = Node(
package="ros_gz_bridge",
executable="parameter_bridge",
arguments=[
"/clock@rosgraph_msgs/msg/Clock[ignition.msgs.Clock",
],
output="screen",
)

nodes_to_start = [
robot_state_publisher_node,
joint_state_broadcaster_spawner,
Expand All @@ -192,6 +202,7 @@ def launch_setup(context, *args, **kwargs):
gz_spawn_entity,
gz_launch_description_with_gui,
gz_launch_description_without_gui,
gz_sim_bridge,
]

return nodes_to_start
Expand Down
1 change: 1 addition & 0 deletions ur_simulation_gz/package.xml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,7 @@
<exec_depend>ur_description</exec_depend>
<exec_depend>ur_moveit_config</exec_depend>
<exec_depend>urdf</exec_depend>
<exec_depend>ros_gz_bridge</exec_depend>
<exec_depend>ros_gz_sim</exec_depend>
<exec_depend>xacro</exec_depend>

Expand Down

0 comments on commit 26f81e0

Please sign in to comment.