Skip to content

Commit

Permalink
formmatting
Browse files Browse the repository at this point in the history
Signed-off-by: stevedan <[email protected]>
  • Loading branch information
stevedanomodolor committed Jun 13, 2024
1 parent de2c426 commit c810a47
Showing 1 changed file with 39 additions and 39 deletions.
78 changes: 39 additions & 39 deletions nav2_system_tests/src/localization/test_localization_launch.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,71 +28,71 @@


def main(argv=sys.argv[1:]):
testExecutable = os.getenv("TEST_EXECUTABLE")
sim_dir = get_package_share_directory("nav2_minimal_tb3_sim")
nav2_bringup_dir = get_package_share_directory("nav2_bringup")
ros_gz_sim_dir = get_package_share_directory("ros_gz_sim")
testExecutable = os.getenv('TEST_EXECUTABLE')
sim_dir = get_package_share_directory('nav2_minimal_tb3_sim')
nav2_bringup_dir = get_package_share_directory('nav2_bringup')
ros_gz_sim_dir = get_package_share_directory('ros_gz_sim')

world_sdf_xacro = os.path.join(sim_dir, "worlds", "tb3_sandbox.sdf.xacro")
robot_sdf = os.path.join(sim_dir, "urdf", "gz_waffle.sdf")
world_sdf_xacro = os.path.join(sim_dir, 'worlds', 'tb3_sandbox.sdf.xacro')
robot_sdf = os.path.join(sim_dir, 'urdf', 'gz_waffle.sdf')

map_yaml_file = os.path.join(nav2_bringup_dir, "maps", "tb3_sandbox.yaml")
map_yaml_file = os.path.join(nav2_bringup_dir, 'maps', 'tb3_sandbox.yaml')

set_env_vars_resources = AppendEnvironmentVariable(
"GZ_SIM_RESOURCE_PATH", os.path.join(sim_dir, "models")
'GZ_SIM_RESOURCE_PATH', os.path.join(sim_dir, 'models')
)

start_gazebo_server = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(ros_gz_sim_dir, "launch", "gz_sim.launch.py")
os.path.join(ros_gz_sim_dir, 'launch', 'gz_sim.launch.py')
),
launch_arguments={"gz_args": ["-r -s ", world_sdf_xacro]}.items(),
launch_arguments={'gz_args': ['-r -s ', world_sdf_xacro]}.items(),
)

spawn_robot = IncludeLaunchDescription(
PythonLaunchDescriptionSource(
os.path.join(sim_dir, "launch", "spawn_tb3.launch.py")
os.path.join(sim_dir, 'launch', 'spawn_tb3.launch.py')
),
launch_arguments={
"use_sim_time": "True",
"robot_sdf": robot_sdf,
"x_pose": "-2.0",
"y_pose": "-0.5",
"z_pose": "0.01",
"roll": "0.0",
"pitch": "0.0",
"yaw": "0.0",
'use_sim_time': 'True',
'robot_sdf': robot_sdf,
'x_pose': '-2.0',
'y_pose': '-0.5',
'z_pose': '0.01',
'roll': '0.0',
'pitch': '0.0',
'yaw': '0.0',
}.items(),
)

link_footprint = launch_ros.actions.Node(
package="tf2_ros",
executable="static_transform_publisher",
output="screen",
arguments=["0", "0", "0", "0", "0", "0", "base_footprint", "base_link"],
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=['0', '0', '0', '0', '0', '0', 'base_footprint', 'base_link'],
)
footprint_scan = launch_ros.actions.Node(
package="tf2_ros",
executable="static_transform_publisher",
output="screen",
arguments=["0", "0", "0", "0", "0", "0", "base_link", "base_scan"],
package='tf2_ros',
executable='static_transform_publisher',
output='screen',
arguments=['0', '0', '0', '0', '0', '0', 'base_link', 'base_scan'],
)
run_map_server = launch_ros.actions.Node(
package="nav2_map_server",
executable="map_server",
name="map_server",
output="screen",
parameters=[{"yaml_filename": map_yaml_file}],
package='nav2_map_server',
executable='map_server',
name='map_server',
output='screen',
parameters=[{'yaml_filename': map_yaml_file}],
)
run_amcl = launch_ros.actions.Node(
package="nav2_amcl", executable="amcl", output="screen"
)
run_lifecycle_manager = launch_ros.actions.Node(
package="nav2_lifecycle_manager",
executable="lifecycle_manager",
name="lifecycle_manager",
output="screen",
parameters=[{"node_names": ["map_server", "amcl"]}, {"autostart": True}],
package='nav2_lifecycle_manager',
executable='lifecycle_manager',
name='lifecycle_manager',
output='screen',
parameters=[{'node_names': ['map_server', 'amcl']}, {'autostart': True}],
)
ld = LaunchDescription(
[
Expand All @@ -108,7 +108,7 @@ def main(argv=sys.argv[1:]):
)

test1_action = ExecuteProcess(
cmd=[testExecutable], name="test_localization_node", output="screen"
cmd=[testExecutable], name='test_localization_node', output='screen'
)

lts = LaunchTestService()
Expand All @@ -118,5 +118,5 @@ def main(argv=sys.argv[1:]):
return lts.run(ls)


if __name__ == "__main__":
if __name__ == '__main__':
sys.exit(main())

0 comments on commit c810a47

Please sign in to comment.