Skip to content

Commit

Permalink
Switch to new-style static_transform_publisher arguments. (ros-naviga…
Browse files Browse the repository at this point in the history
…tion#4563)

These arguments have been the preferred way to use things
since at least Humble.  This avoids warnings when running it for the tests.

Signed-off-by: Chris Lalancette <[email protected]>
Signed-off-by: Vladyslav Hrynchak <[email protected]>
  • Loading branch information
clalancette authored and VladyslavHrynchak200204 committed Jul 30, 2024
1 parent 30dac64 commit 13aea93
Show file tree
Hide file tree
Showing 9 changed files with 188 additions and 26 deletions.
22 changes: 20 additions & 2 deletions nav2_costmap_2d/test/integration/costmap_tests_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -36,14 +36,32 @@ def main(argv=sys.argv[1:]):
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=['0', '0', '0', '0', '0', '0', 'map', 'odom'],
arguments=[
'--x', '0',
'--y', '0',
'--z', '0',
'--roll', '0',
'--pitch', '0',
'--yaw', '0',
'--frame-id', 'map',
'--child-frame-id', 'odom'
],
)

odom_to_base_link = launch_ros.actions.Node(
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=['0', '0', '0', '0', '0', '0', 'odom', 'base_link'],
arguments=[
'--x', '0',
'--y', '0',
'--z', '0',
'--roll', '0',
'--pitch', '0',
'--yaw', '0',
'--frame-id', 'odom',
'--child-frame-id', 'base_link'
],
)

lifecycle_manager = launch_ros.actions.Node(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,16 @@ def generate_launch_description():
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=['0', '0', '0', '0', '0', '0', 'map', 'odom'],
arguments=[
'--x', '0',
'--y', '0',
'--z', '0',
'--roll', '0',
'--pitch', '0',
'--yaw', '0',
'--frame-id', 'map',
'--child-frame-id', 'odom'
],
parameters=[{'use_sim_time': True}],
),
# Need transforms
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,16 @@ def generate_launch_description():
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=['0', '0', '0', '0', '0', '0', 'map', 'odom'],
arguments=[
'--x', '0',
'--y', '0',
'--z', '0',
'--roll', '0',
'--pitch', '0',
'--yaw', '0',
'--frame-id', 'map',
'--child-frame-id', 'odom'
],
parameters=[{'use_sim_time': True}],
),
# Need transforms
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,16 @@ def generate_launch_description():
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=['0', '0', '0', '0', '0', '0', 'map', 'odom'],
arguments=[
'--x', '0',
'--y', '0',
'--z', '0',
'--roll', '0',
'--pitch', '0',
'--yaw', '0',
'--frame-id', 'map',
'--child-frame-id', 'odom'
],
parameters=[{'use_sim_time': True}],
),
# Need transforms
Expand Down
22 changes: 20 additions & 2 deletions nav2_system_tests/src/error_codes/test_error_codes_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,13 +37,31 @@ def generate_launch_description():
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=['0', '0', '0', '0', '0', '0', 'map', 'odom'],
arguments=[
'--x', '0',
'--y', '0',
'--z', '0',
'--roll', '0',
'--pitch', '0',
'--yaw', '0',
'--frame-id', 'map',
'--child-frame-id', 'odom'
],
),
Node(
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=['0', '0', '0', '0', '0', '0', 'odom', 'base_link'],
arguments=[
'--x', '0',
'--y', '0',
'--z', '0',
'--roll', '0',
'--pitch', '0',
'--yaw', '0',
'--frame-id', 'odom',
'--child-frame-id', 'base_link'
],
),
Node(
package='nav2_controller',
Expand Down
49 changes: 38 additions & 11 deletions nav2_system_tests/src/gps_navigation/test_case_py.launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -64,34 +64,61 @@ def generate_launch_description():
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=['0', '0', '0', '0', '0', '0', 'base_footprint', 'base_link'],
arguments=[
'--x', '0',
'--y', '0',
'--z', '0',
'--roll', '0',
'--pitch', '0',
'--yaw', '0',
'--frame-id', 'base_footprint',
'--child-frame-id', 'base_link'
],
),
Node(
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=['0', '0', '0', '0', '0', '0', 'base_link', 'base_scan'],
arguments=[
'--x', '0',
'--y', '0',
'--z', '0',
'--roll', '0',
'--pitch', '0',
'--yaw', '0',
'--frame-id', 'base_link',
'--child-frame-id', 'base_scan'
],
),
Node(
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=[
'-0.32',
'0',
'0.068',
'0',
'0',
'0',
'base_link',
'imu_link',
'--x', '-0.32',
'--y', '0',
'--z', '0.068',
'--roll', '0',
'--pitch', '0',
'--yaw', '0',
'--frame-id', 'base_link',
'--child-frame-id', 'imu_link'
],
),
Node(
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=['0', '0', '0', '0', '0', '0', 'base_link', 'gps_link'],
arguments=[
'--x', '0',
'--y', '0',
'--z', '0',
'--roll', '0',
'--pitch', '0',
'--yaw', '0',
'--frame-id', 'base_link',
'--child-frame-id', 'gps_link'
],
),
IncludeLaunchDescription(
PythonLaunchDescriptionSource(
Expand Down
44 changes: 40 additions & 4 deletions nav2_system_tests/src/updown/test_updown_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -34,28 +34,64 @@ def generate_launch_description():
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=['0', '0', '0', '0', '0', '0', 'map', 'odom'],
arguments=[
'--x', '0',
'--y', '0',
'--z', '0',
'--roll', '0',
'--pitch', '0',
'--yaw', '0',
'--frame-id', 'map',
'--child-frame-id', 'odom'
],
)

start_tf_cmd_2 = Node(
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=['0', '0', '0', '0', '0', '0', 'odom', 'base_footprint'],
arguments=[
'--x', '0',
'--y', '0',
'--z', '0',
'--roll', '0',
'--pitch', '0',
'--yaw', '0',
'--frame-id', 'odom',
'--child-frame-id', 'base_footprint'
],
)

start_tf_cmd_3 = Node(
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=['0', '0', '0', '0', '0', '0', 'base_footprint', 'base_link'],
arguments=[
'--x', '0',
'--y', '0',
'--z', '0',
'--roll', '0',
'--pitch', '0',
'--yaw', '0',
'--frame-id', 'base_footprint',
'--child-frame-id', 'base_link'
],
)

start_tf_cmd_4 = Node(
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=['0', '0', '0', '0', '0', '0', 'base_link', 'base_scan'],
arguments=[
'--x', '0',
'--y', '0',
'--z', '0',
'--roll', '0',
'--pitch', '0',
'--yaw', '0',
'--frame-id', 'base_link',
'--child-frame-id', 'base_scan'
],
)

nav2_bringup = launch.actions.IncludeLaunchDescription(
Expand Down
22 changes: 20 additions & 2 deletions tools/planner_benchmarking/planning_benchmark_bringup.py
Original file line number Diff line number Diff line change
Expand Up @@ -53,13 +53,31 @@ def generate_launch_description():
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=['0', '0', '0', '0', '0', '0', 'base_link', 'map'],
arguments=[
'--x', '0',
'--y', '0',
'--z', '0',
'--roll', '0',
'--pitch', '0',
'--yaw', '0',
'--frame-id', 'base_link',
'--child-frame-id', 'map'
],
),
Node(
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=['0', '0', '0', '0', '0', '0', 'base_link', 'odom'],
arguments=[
'--x', '0',
'--y', '0',
'--z', '0',
'--roll', '0',
'--pitch', '0',
'--yaw', '0',
'--frame-id', 'base_link',
'--child-frame-id', 'odom'
],
),
Node(
package='nav2_lifecycle_manager',
Expand Down
22 changes: 20 additions & 2 deletions tools/smoother_benchmarking/smoother_benchmark_bringup.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,32 @@ def generate_launch_description():
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=['0', '0', '0', '0', '0', '0', 'base_link', 'map'],
arguments=[
'--x', '0',
'--y', '0',
'--z', '0',
'--roll', '0',
'--pitch', '0',
'--yaw', '0',
'--frame-id', 'base_link',
'--child-frame-id', 'map'
],
)

static_transform_two = Node(
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=['0', '0', '0', '0', '0', '0', 'base_link', 'odom'],
arguments=[
'--x', '0',
'--y', '0',
'--z', '0',
'--roll', '0',
'--pitch', '0',
'--yaw', '0',
'--frame-id', 'base_link',
'--child-frame-id', 'odom'
],
)

start_map_server_cmd = Node(
Expand Down

0 comments on commit 13aea93

Please sign in to comment.