Skip to content

Commit

Permalink
Add missing bridge for simulation time (#443)
Browse files Browse the repository at this point in the history
  • Loading branch information
christophfroehlich authored Dec 2, 2024
1 parent 07a2d3b commit 301ca58
Show file tree
Hide file tree
Showing 9 changed files with 83 additions and 1 deletion.
9 changes: 9 additions & 0 deletions gz_ros2_control_demos/launch/cart_example_effort.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ def generate_launch_description():
],
)

# Bridge
bridge = Node(
package='ros_gz_bridge',
executable='parameter_bridge',
arguments=['/clock@rosgraph_msgs/msg/Clock[gz.msgs.Clock'],
output='screen'
)

return LaunchDescription([
# Launch gazebo environment
IncludeLaunchDescription(
Expand All @@ -97,6 +105,7 @@ def generate_launch_description():
on_exit=[effort_controller_spawner],
)
),
bridge,
node_robot_state_publisher,
gz_spawn_entity,
# Launch Arguments
Expand Down
12 changes: 11 additions & 1 deletion gz_ros2_control_demos/launch/cart_example_position.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ def generate_launch_description():
joint_state_broadcaster_spawner = Node(
package='controller_manager',
executable='spawner',
arguments=['joint_state_broadcaster'],
arguments=['joint_state_broadcaster',
],
)
joint_trajectory_controller_spawner = Node(
package='controller_manager',
Expand All @@ -77,6 +78,14 @@ def generate_launch_description():
],
)

# Bridge
bridge = Node(
package='ros_gz_bridge',
executable='parameter_bridge',
arguments=['/clock@rosgraph_msgs/msg/Clock[gz.msgs.Clock'],
output='screen'
)

return LaunchDescription([
# Launch gazebo environment
IncludeLaunchDescription(
Expand All @@ -97,6 +106,7 @@ def generate_launch_description():
on_exit=[joint_trajectory_controller_spawner],
)
),
bridge,
node_robot_state_publisher,
gz_spawn_entity,
# Launch Arguments
Expand Down
9 changes: 9 additions & 0 deletions gz_ros2_control_demos/launch/cart_example_velocity.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,14 @@ def generate_launch_description():
],
)

# Bridge
bridge = Node(
package='ros_gz_bridge',
executable='parameter_bridge',
arguments=['/clock@rosgraph_msgs/msg/Clock[gz.msgs.Clock'],
output='screen'
)

return LaunchDescription([
# Launch gazebo environment
IncludeLaunchDescription(
Expand All @@ -107,6 +115,7 @@ def generate_launch_description():
imu_sensor_broadcaster_spawner],
)
),
bridge,
node_robot_state_publisher,
gz_spawn_entity,
# Launch Arguments
Expand Down
9 changes: 9 additions & 0 deletions gz_ros2_control_demos/launch/diff_drive_example.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ def generate_launch_description():
],
)

# Bridge
bridge = Node(
package='ros_gz_bridge',
executable='parameter_bridge',
arguments=['/clock@rosgraph_msgs/msg/Clock[gz.msgs.Clock'],
output='screen'
)

return LaunchDescription([
# Launch gazebo environment
IncludeLaunchDescription(
Expand All @@ -97,6 +105,7 @@ def generate_launch_description():
on_exit=[diff_drive_base_controller_spawner],
)
),
bridge,
node_robot_state_publisher,
gz_spawn_entity,
# Launch Arguments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ def generate_launch_description():
],
)

# Bridge
bridge = Node(
package='ros_gz_bridge',
executable='parameter_bridge',
arguments=['/clock@rosgraph_msgs/msg/Clock[gz.msgs.Clock'],
output='screen'
)

return LaunchDescription([
# Launch gazebo environment
IncludeLaunchDescription(
Expand All @@ -100,6 +108,7 @@ def generate_launch_description():
on_exit=[gripper_controller_spawner],
)
),
bridge,
node_robot_state_publisher,
gz_spawn_entity,
# Launch Arguments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,14 @@ def generate_launch_description():
],
)

# Bridge
bridge = Node(
package='ros_gz_bridge',
executable='parameter_bridge',
arguments=['/clock@rosgraph_msgs/msg/Clock[gz.msgs.Clock'],
output='screen'
)

return LaunchDescription([
# Launch gazebo environment
IncludeLaunchDescription(
Expand All @@ -100,6 +108,7 @@ def generate_launch_description():
on_exit=[gripper_controller_spawner],
)
),
bridge,
node_robot_state_publisher,
gz_spawn_entity,
# Launch Arguments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ def generate_launch_description():
],
)

# Bridge
bridge = Node(
package='ros_gz_bridge',
executable='parameter_bridge',
arguments=['/clock@rosgraph_msgs/msg/Clock[gz.msgs.Clock'],
output='screen'
)

return LaunchDescription([
# Launch gazebo environment
IncludeLaunchDescription(
Expand All @@ -97,6 +105,7 @@ def generate_launch_description():
on_exit=[effort_controller_spawner],
)
),
bridge,
node_robot_state_publisher,
gz_spawn_entity,
# Launch Arguments
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,14 @@ def generate_launch_description():
],
)

# Bridge
bridge = Node(
package='ros_gz_bridge',
executable='parameter_bridge',
arguments=['/clock@rosgraph_msgs/msg/Clock[gz.msgs.Clock'],
output='screen'
)

return LaunchDescription([
# Launch gazebo environment
IncludeLaunchDescription(
Expand All @@ -97,6 +105,7 @@ def generate_launch_description():
on_exit=[joint_trajectory_controller_spawner],
)
),
bridge,
node_robot_state_publisher,
gz_spawn_entity,
# Launch Arguments
Expand Down
9 changes: 9 additions & 0 deletions gz_ros2_control_tests/tests/position_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,8 +101,17 @@ def generate_test_description():
],
)

# Bridge
bridge = Node(
package='ros_gz_bridge',
executable='parameter_bridge',
arguments=['/clock@rosgraph_msgs/msg/Clock[gz.msgs.Clock'],
output='screen'
)

ld = launch.LaunchDescription([
included_launch,
bridge,
gz_spawn_entity,
node_robot_state_publisher,
RegisterEventHandler(
Expand Down

0 comments on commit 301ca58

Please sign in to comment.