Controller server launching error

I am working on the course project and launching my path_planning launch file. It fails while configurating the controller server. This is my config file :

controller_server:
  ros__parameters:
    use_sim_time: True
    controller_frequency: 10.0
    min_x_velocity_threshold: 0.001
    min_y_velocity_threshold: 0.5
    min_theta_velocity_threshold: 0.001
    failure_tolerance: 0.3
    progress_checker_plugin: "progress_checker"
    goal_checker_plugins: ["general_goal_checker"] 
    controller_plugins: ["FollowPath"]

    # Progress checker parameters
    progress_checker:
      plugin: "nav2_controller::SimpleProgressChecker"
      required_movement_radius: 0.5
      movement_time_allowance: 10.0
    # Goal checker parameters
    general_goal_checker:
      stateful: True
      plugin: "nav2_controller::SimpleGoalChecker"
      xy_goal_tolerance: 0.25
      yaw_goal_tolerance: 0.25
    # DWB parameters
    FollowPath:
      plugin: "dwb_core::DWBLocalPlanner"
      debug_trajectory_details: True
      min_vel_x: 0.0
      min_vel_y: 0.0
      max_vel_x: 0.26
      max_vel_y: 0.0
      max_vel_theta: 1.0
      min_speed_xy: 0.0
      max_speed_xy: 0.26
      min_speed_theta: 0.0
      acc_lim_x: 2.5
      acc_lim_y: 0.0
      acc_lim_theta: 3.2
      decel_lim_x: -2.5
      decel_lim_y: 0.0
      decel_lim_theta: -3.2
      vx_samples: 20
      vy_samples: 5
      vtheta_samples: 20
      sim_time: 1.7
      linear_granularity: 0.05
      angular_granularity: 0.025
      transform_tolerance: 0.2
      xy_goal_tolerance: 0.25
      trans_stopped_velocity: 0.25
      short_circuit_trajectory_evaluation: True
      stateful: True
      critics: ["RotateToGoal", "Oscillation", "BaseObstacle", "GoalAlign", "PathAlign", "PathDist", "GoalDist"]
      BaseObstacle.scale: 0.02
      PathAlign.scale: 32.0
      PathAlign.forward_point_distance: 0.1
      GoalAlign.scale: 24.0
      GoalAlign.forward_point_distance: 0.1
      PathDist.scale: 32.0
      GoalDist.scale: 24.0
      RotateToGoal.scale: 32.0
      RotateToGoal.slowing_factor: 5.0
      RotateToGoal.lookahead_time: -1.0

local_costmap:
  ros__parameters:
    update_frequency: 5.0
    publish_frequency: 2.0
    global_frame: odom
    robot_base_frame: base_link
    use_sim_time: True
    rolling_window: true
    width: 1
    height: 1
    resolution: 0.05
    robot_radius: 0.15
    plugins: ["voxel_layer", "inflation_layer"]
    inflation_layer:
      plugin: "nav2_costmap_2d::InflationLayer"
      cost_scaling_factor: 3.0
      inflation_radius: 0.35
    voxel_layer:
      plugin: "nav2_costmap_2d::VoxelLayer"
      enabled: True
      publish_voxel_map: True
      origin_z: 0.0
      z_resolution: 0.05
      z_voxels: 16
      max_obstacle_height: 2.0
      mark_threshold: 0
      observation_sources: scan
      scan:
        topic: /scan
        max_obstacle_height: 2.0
        clearing: True
        marking: True
        data_type: "LaserScan"
        raytrace_max_range: 3.0
        raytrace_min_range: 0.0
        obstacle_max_range: 2.5
        obstacle_min_range

And this is my launch file :

import os
from ament_index_python.packages import get_package_share_directory
from launch import LaunchDescription
from launch_ros.actions import Node

def generate_launch_description():

    controller_yaml = os.path.join(get_package_share_directory('project_path_planning'), 'config', 'controller_config.yaml')
    bt_navigator_yaml = os.path.join(get_package_share_directory('project_path_planning'), 'config', 'navigator_config.yaml')
    planner_yaml = os.path.join(get_package_share_directory('project_path_planning'), 'config', 'planner_config.yaml')
    recovery_yaml = os.path.join(get_package_share_directory('project_path_planning'), 'config', 'recovery_config.yaml')

    
    return LaunchDescription([     
        Node(
            package='nav2_controller',
            executable='controller_server',
            name='controller_server',
            output='screen',
            parameters=[controller_yaml]),

        Node(
            package='nav2_planner',
            executable='planner_server',
            name='planner_server',
            output='screen',
            parameters=[planner_yaml]),
            
        Node(
            package='nav2_recoveries',
            executable='recoveries_server',
            name='recoveries_server',
            parameters=[recovery_yaml],
            output='screen'),

        Node(
            package='nav2_bt_navigator',
            executable='bt_navigator',
            name='bt_navigator',
            output='screen',
            parameters=[bt_navigator_yaml]),

        Node(
            package='nav2_lifecycle_manager',
            executable='lifecycle_manager',
            name='lifecycle_manager_pathplanner',
            output='screen',
            parameters=[{'autostart': True},
                        {'node_names': ['planner_server',
                                        'controller_server',
                                        'recoveries_server',
                                        'bt_navigator']}])
    ])

And this is the terminal output:

[INFO] [launch]: All log files can be found below /home/user/.ros/log/2023-07-27-14-04-54-910380-2_xterm-7652
[INFO] [launch]: Default logging verbosity is set to INFO
[WARNING] [launch_ros.actions.node]: Parameter file path is not a file: /home/user/ros2_ws/install/project_path_planning/share/project_path_planning/config/controller_config.yaml
[WARNING] [launch_ros.actions.node]: Parameter file path is not a file: /home/user/ros2_ws/install/project_path_planning/share/project_path_planning/config/planner_config.yaml
[WARNING] [launch_ros.actions.node]: Parameter file path is not a file: /home/user/ros2_ws/install/project_path_planning/share/project_path_planning/config/recovery_config.yaml
[WARNING] [launch_ros.actions.node]: Parameter file path is not a file: /home/user/ros2_ws/install/project_path_planning/share/project_path_planning/config/navigator_config.yaml
[INFO] [controller_server-1]: process started with pid [7673]
[INFO] [planner_server-2]: process started with pid [7675]
[INFO] [recoveries_server-3]: process started with pid [7677]
[INFO] [bt_navigator-4]: process started with pid [7679]
[INFO] [lifecycle_manager-5]: process started with pid [7681]
[planner_server-2] [INFO] [1690466697.494064696] [planner_server]:
[planner_server-2]      planner_server lifecycle node launched.
[planner_server-2]      Waiting on external lifecycle transitions to activate
[planner_server-2]      See https://design.ros2.org/articles/node_lifecycle.html for more information.
[controller_server-1] [INFO] [1690466697.499648433] [controller_server]:
[controller_server-1]   controller_server lifecycle node launched.
[controller_server-1]   Waiting on external lifecycle transitions to activate
[controller_server-1]   See https://design.ros2.org/articles/node_lifecycle.html for more information.
[planner_server-2] [INFO] [1690466697.508447382] [planner_server]: Creating
[recoveries_server-3] [INFO] [1690466697.588751122] [recoveries_server]:
[recoveries_server-3]   recoveries_server lifecycle node launched.
[recoveries_server-3]   Waiting on external lifecycle transitions to activate
[recoveries_server-3]   See https://design.ros2.org/articles/node_lifecycle.html for more information.
[planner_server-2] [INFO] [1690466697.597093236] [global_costmap.global_costmap]:
[planner_server-2]      global_costmap lifecycle node launched.
[planner_server-2]      Waiting on external lifecycle transitions to activate
[planner_server-2]      See https://design.ros2.org/articles/node_lifecycle.html for more information.
[planner_server-2] [INFO] [1690466697.599781334] [global_costmap.global_costmap]: Creating Costmap
[bt_navigator-4] [INFO] [1690466697.686782740] [bt_navigator]:
[bt_navigator-4]        bt_navigator lifecycle node launched.
[bt_navigator-4]        Waiting on external lifecycle transitions to activate
[bt_navigator-4]        See https://design.ros2.org/articles/node_lifecycle.html for more information.
[bt_navigator-4] [INFO] [1690466697.686951477] [bt_navigator]: Creating
[controller_server-1] [INFO] [1690466697.707173197] [controller_server]: Creating controller server
[controller_server-1] [INFO] [1690466697.799209898] [local_costmap.local_costmap]:
[controller_server-1]   local_costmap lifecycle node launched.
[controller_server-1]   Waiting on external lifecycle transitions to activate
[controller_server-1]   See https://design.ros2.org/articles/node_lifecycle.html for more information.
[controller_server-1] [INFO] [1690466697.802118475] [local_costmap.local_costmap]: Creating Costmap
[lifecycle_manager-5] [INFO] [1690466697.885652130] [lifecycle_manager_pathplanner]: Creating
[lifecycle_manager-5] [INFO] [1690466697.895596142] [lifecycle_manager_pathplanner]: Creating and initializing lifecycle service clients
[lifecycle_manager-5] [INFO] [1690466697.985044859] [lifecycle_manager_pathplanner]: Starting managed nodes bringup...
[lifecycle_manager-5] [INFO] [1690466697.985116246] [lifecycle_manager_pathplanner]: Configuring planner_server
[planner_server-2] [INFO] [1690466697.985484259] [planner_server]: Configuring
[planner_server-2] [INFO] [1690466697.985552821] [global_costmap.global_costmap]: Configuring
[planner_server-2] [INFO] [1690466697.990149944] [global_costmap.global_costmap]: Using plugin "static_layer"
[planner_server-2] [INFO] [1690466698.000978947] [global_costmap.global_costmap]: Subscribing to the map topic (/map) with transient local durability
[planner_server-2] [INFO] [1690466698.003789157] [global_costmap.global_costmap]: Initialized plugin "static_layer"
[planner_server-2] [INFO] [1690466698.003833674] [global_costmap.global_costmap]: Using plugin "obstacle_layer"
[planner_server-2] [INFO] [1690466698.006735550] [global_costmap.global_costmap]: Subscribed to Topics:
[planner_server-2] [INFO] [1690466698.006796598] [global_costmap.global_costmap]: Initialized plugin "obstacle_layer"
[planner_server-2] [INFO] [1690466698.006813060] [global_costmap.global_costmap]: Using plugin "inflation_layer"
[planner_server-2] [INFO] [1690466698.007205473] [global_costmap.global_costmap]: Initialized plugin "inflation_layer"
[planner_server-2] [INFO] [1690466698.088842695] [planner_server]: Created global planner plugin GridBased of type nav2_navfn_planner/NavfnPlanner
[planner_server-2] [INFO] [1690466698.088918203] [planner_server]: Configuring pluginGridBased of type NavfnPlanner
[planner_server-2] [INFO] [1690466698.094207033] [planner_server]: Planner Server hasGridBased  planners available.
[lifecycle_manager-5] [INFO] [1690466698.107198022] [lifecycle_manager_pathplanner]: Configuring controller_server
[controller_server-1] [INFO] [1690466698.107508660] [controller_server]: Configuring controller interface
[controller_server-1] [INFO] [1690466698.107745653] [controller_server]: getting goalchecker plugins..
[controller_server-1] [INFO] [1690466698.108052169] [controller_server]: Controller frequency set to 20.0000Hz
[controller_server-1] [INFO] [1690466698.108098256] [local_costmap.local_costmap]: Configuring
[controller_server-1] [INFO] [1690466698.186212540] [local_costmap.local_costmap]: Using plugin "static_layer"
[controller_server-1] [INFO] [1690466698.198100343] [local_costmap.local_costmap]: Subscribing to the map topic (/map) with transient local durability
[controller_server-1] [INFO] [1690466698.199660278] [local_costmap.local_costmap]: Initialized plugin "static_layer"
[controller_server-1] [INFO] [1690466698.199706469] [local_costmap.local_costmap]: Using plugin "obstacle_layer"
[controller_server-1] [INFO] [1690466698.202487047] [local_costmap.local_costmap]: Subscribed to Topics:
[controller_server-1] [INFO] [1690466698.202579186] [local_costmap.local_costmap]: Initialized plugin "obstacle_layer"
[controller_server-1] [INFO] [1690466698.202609102] [local_costmap.local_costmap]: Using plugin "inflation_layer"
[controller_server-1] [INFO] [1690466698.205661169] [local_costmap.local_costmap]: Initialized plugin "inflation_layer"
[controller_server-1] [INFO] [1690466698.283084695] [controller_server]: Created progress_checker : progress_checker of type nav2_controller::SimpleProgressChecker
[controller_server-1] [INFO] [1690466698.293894884] [controller_server]: Created goalchecker : goal_checker of type nav2_controller::SimpleGoalChecker
[controller_server-1] [INFO] [1690466698.303042142] [controller_server]: Controller Server has goal_checker  goal checkers available.
[controller_server-1] [INFO] [1690466698.310556066] [controller_server]: Created controller : FollowPath of type dwb_core::DWBLocalPlanner
[controller_server-1] [INFO] [1690466698.311189404] [controller_server]: Setting transform_tolerance to 0.100000
[controller_server-1] [ERROR] [1690466698.405826320] [controller_server]: Couldn't load critics! Caught exception: No critics defined for FollowPath
[controller_server-1] [ERROR] [1690466698.497434808] []: Caught exception in callbackfor transition 10
[controller_server-1] [ERROR] [1690466698.497478689] []: Original error: No critics defined for FollowPath
[controller_server-1] [WARN] [1690466698.497521291] []: Error occurred while doing error handling.
[controller_server-1] [FATAL] [1690466698.497535321] [controller_server]: Lifecycle node controller_server does not have error state implemented
[lifecycle_manager-5] [ERROR] [1690466698.498083229] [lifecycle_manager_pathplanner]:Failed to change state for node: controller_server
[lifecycle_manager-5] [ERROR] [1690466698.498130790] [lifecycle_manager_pathplanner]:Failed to bring up all requested nodes. Aborting bringup.

The error is related to the lack of follow_path critics.

Hi @Abboud ,

Your controller.yaml file seems to be incomplete for local_costmap:.
You need to replace robot_base_frame: base_link with robot_base_frame: base_footprint, since the turtlebot3 in rosject does not have base_link.
Make sure your controller frequency is greater than planner frequency.

Here is the complete local_costmap: paramters:

local_costmap:
  local_costmap:
    ros__parameters:
      update_frequency: 5.0
      publish_frequency: 2.0
      global_frame: odom
      robot_base_frame: base_footprint
      use_sim_time: True
      rolling_window: true
      width: 1
      height: 1
      resolution: 0.01
      robot_radius: 0.15
      plugins: ["voxel_layer", "inflation_layer"]
      voxel_layer:
        plugin: "nav2_costmap_2d::VoxelLayer"
        enabled: True
        publish_voxel_map: True
        origin_z: 0.0
        z_resolution: 0.05
        z_voxels: 16
        max_obstacle_height: 2.0
        mark_threshold: 0
        observation_sources: scan
        scan:
          topic: /scan
          max_obstacle_height: 2.0
          clearing: True
          marking: True
          data_type: "LaserScan"
          raytrace_max_range: 3.5
          raytrace_min_range: 0.0
          obstacle_max_range: 3.0
          obstacle_min_range: 0.0
      inflation_layer:
        plugin: "nav2_costmap_2d::InflationLayer"
        cost_scaling_factor: 3.0
        inflation_radius: 1.0
      static_layer:
        map_subscribe_transient_local: True
      always_send_full_costmap: True

Let me know if this solves your problem.

Regards,
Girish

hello again, I changed what was mentioned and the same error gets output.

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.