How to load parameter file for global_costmap node started by nav2_planner?
Hi!
I want to use only the path planning feature in ROS2 Navigation2. My problem is, that when I'm launching the nav2_planner, it starts the global_costmap node automatically. I have a parameter file, which contains only parameters for the global costmap.
How do I provide the parameter file successfully for the global_costmap to load it? (by not launching myself another instance of global_costmap?) Below is the launch file I'm using.
import launch
from launch.substitutions import Command, LaunchConfiguration
import launch_ros
import os
def generate_launch_description():
lifecycle_nodes = ['map_server',
'amcl',
'planner_server']
return launch.LaunchDescription([
launch_ros.actions.Node(
package='nav2_map_server',
executable='map_server',
name='map_server',
output='screen',
parameters=[{'yaml_filename':'~/map.yaml'}]),
launch_ros.actions.Node(
package='nav2_amcl',
executable='amcl',
name='amcl',
output='screen'),
#parameters=[{''}]),
launch_ros.actions.Node(
package='nav2_planner',
executable='planner_server',
name='planner_server',
output='screen'),
#parameters=[{'params_file':'~/path_planner_params.yaml'}]),
launch_ros.actions.Node(
package='nav2_lifecycle_manager',
executable='lifecycle_manager',
name='lifecycle_manager_planning',
output='screen',
parameters=[{'use_sim_time':False},
{'autostart': True},
{'node_names': lifecycle_nodes},
#{'params_file':'~/path_planner_params.yaml'}]),
])