Exercise 4.1 Unit 4 Path Planning Error

I tried following all the steps as instructed, however, when I launch my path planner launch file and then try to set a goal pose at rviz, I get the following error:

I had the localization system launched as well. May I ask what my error could be?

Hi @HusamArdah ,

Please post the complete error as a code-block. PLEASE DO NOT share terminal output as screenshots.

I would like to see the error from the beginning. Not from the middle. Reason being, when an error occurs, you need to have the full log of the working, so the error can be understood better for debugging.

So, from your output, it seems that your tolerance value of 0.50 seconds is insufficient. Change it to a higher value - try 1.0 or 2.5 or 5.0. You can find this parameter in planner.yaml file.

Also, please post your launch file which contains the bt_navigator (path planner) and its lifecycle_manager (again, as a code-block, not a screenshot).

Also, did you wait for the nav2_stack to initialize fully before providing the goal pose?

Regards,
Girish

Yes definitely, heres the codeblock of my terminal output:

source install/setup.bash
user:~/ros2_ws$ ros2 launch path_planner_server pathplanner.launch.py
[INFO] [launch]: All log files can be found below /home/user/.ros/log/2023-03-20-08-41-50-396395-3_xterm-2290
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [controller_server-1]: process started with pid [2292]
[INFO] [planner_server-2]: process started with pid [2294]
[INFO] [recoveries_server-3]: process started with pid [2296]
[INFO] [bt_navigator-4]: process started with pid [2298]
[INFO] [lifecycle_manager-5]: process started with pid [2300]
[planner_server-2] [INFO] [1679301710.979301976] [planner_server]:
[planner_server-2] planner_server lifecycle node launched.
[planner_server-2] Waiting on external lifecycle transitions to activate
[planner_server-2] See Managed nodes for more information.
[recoveries_server-3] [INFO] [1679301710.991343338] [recoveries_server]:
[recoveries_server-3] recoveries_server lifecycle node launched.
[recoveries_server-3] Waiting on external lifecycle transitions to activate
[recoveries_server-3] See Managed nodes for more information.
[lifecycle_manager-5] [INFO] [1679301711.060280058] [lifecycle_manager_pathplanner]: Creating
[planner_server-2] [INFO] [1679301711.065823205] [planner_server]: Creating
[controller_server-1] [INFO] [1679301711.076029309] [controller_server]:
[controller_server-1] controller_server lifecycle node launched.
[controller_server-1] Waiting on external lifecycle transitions to activate
[controller_server-1] See Managed nodes for more information.
[controller_server-1] [INFO] [1679301711.087000452] [controller_server]: Creating controller server
[lifecycle_manager-5] [INFO] [1679301711.152266364] [lifecycle_manager_pathplanner]: Creating and initializinglifecycle service clients
[bt_navigator-4] [INFO] [1679301711.161370884] [bt_navigator]:
[bt_navigator-4] bt_navigator lifecycle node launched.
[bt_navigator-4] Waiting on external lifecycle transitions to activate
[bt_navigator-4] See Managed nodes for more information.
[bt_navigator-4] [INFO] [1679301711.161511473] [bt_navigator]: Creating
[planner_server-2] [INFO] [1679301711.184902727] [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 Managed nodes for more information.
[planner_server-2] [INFO] [1679301711.196463779] [global_costmap.global_costmap]: Creating Costmap
[lifecycle_manager-5] [INFO] [1679301711.200463991] [lifecycle_manager_pathplanner]: Starting managed nodes bringup…
[lifecycle_manager-5] [INFO] [1679301711.200539092] [lifecycle_manager_pathplanner]: Configuring planner_server
[controller_server-1] [INFO] [1679301711.251164820] [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 Managed nodes for more information.
[controller_server-1] [INFO] [1679301711.252131275] [local_costmap.local_costmap]: Creating Costmap
[planner_server-2] [INFO] [1679301711.306892460] [planner_server]: Configuring
[planner_server-2] [INFO] [1679301711.308574941] [global_costmap.global_costmap]: Configuring
[planner_server-2] [INFO] [1679301711.350584461] [global_costmap.global_costmap]: Using plugin “static_layer”
[planner_server-2] [INFO] [1679301711.393394812] [global_costmap.global_costmap]: Subscribing to the map topic(/map) with transient local durability
[planner_server-2] [INFO] [1679301711.396406816] [global_costmap.global_costmap]: Initialized plugin “static_layer”
[planner_server-2] [INFO] [1679301711.396954886] [global_costmap.global_costmap]: Using plugin “obstacle_layer”
[planner_server-2] [INFO] [1679301711.400479857] [global_costmap.global_costmap]: StaticLayer: Resizing costmap to 187 X 240 at 0.050000 m/pix
[planner_server-2] [INFO] [1679301711.407458021] [global_costmap.global_costmap]: Subscribed to Topics:
[planner_server-2] [INFO] [1679301711.408433063] [global_costmap.global_costmap]: Initialized plugin “obstacle_layer”
[planner_server-2] [INFO] [1679301711.409119181] [global_costmap.global_costmap]: Using plugin “inflation_layer”
[planner_server-2] [INFO] [1679301711.412937864] [global_costmap.global_costmap]: Initialized plugin “inflation_layer”
[planner_server-2] [INFO] [1679301711.430283542] [planner_server]: Created global planner plugin GridBased of type nav2_navfn_planner/NavfnPlanner
[planner_server-2] [INFO] [1679301711.430364052] [planner_server]: Configuring plugin GridBased of type NavfnPlanner
[planner_server-2] [INFO] [1679301711.440124276] [planner_server]: Planner Server has GridBased planners available.
[lifecycle_manager-5] [INFO] [1679301711.478106299] [lifecycle_manager_pathplanner]: Configuring controller_server
[controller_server-1] [INFO] [1679301711.478503096] [controller_server]: Configuring controller interface
[controller_server-1] [INFO] [1679301711.478774289] [controller_server]: getting goal checker plugins…
[controller_server-1] [INFO] [1679301711.478922916] [controller_server]: Controller frequency set to 10.0000Hz
[controller_server-1] [INFO] [1679301711.478967650] [local_costmap.local_costmap]: Configuring
[controller_server-1] [INFO] [1679301711.488054468] [local_costmap.local_costmap]: Using plugin “static_layer”
[controller_server-1] [INFO] [1679301711.500918545] [local_costmap.local_costmap]: Subscribing to the map topic (/map) with transient local durability
[controller_server-1] [INFO] [1679301711.504089105] [local_costmap.local_costmap]: Initialized plugin “static_layer”
[controller_server-1] [INFO] [1679301711.504138047] [local_costmap.local_costmap]: Using plugin “obstacle_layer”
[controller_server-1] [INFO] [1679301711.508425257] [local_costmap.local_costmap]: Subscribed to Topics:
[controller_server-1] [INFO] [1679301711.508516004] [local_costmap.local_costmap]: Initialized plugin “obstacle_layer”
[controller_server-1] [INFO] [1679301711.508556658] [local_costmap.local_costmap]: Using plugin “inflation_layer”
[controller_server-1] [INFO] [1679301711.508519670] [local_costmap.local_costmap]: StaticLayer: Resizing costmap to 187 X 240 at 0.050000 m/pix
[controller_server-1] [INFO] [1679301711.513121747] [local_costmap.local_costmap]: Initialized plugin “inflation_layer”
[controller_server-1] [INFO] [1679301711.528655042] [controller_server]: Created progress_checker : progress_checker of type nav2_controller::SimpleProgressChecker
[controller_server-1] [INFO] [1679301711.557816037] [controller_server]: Created goal checker : general_goal_checker of type nav2_controller::SimpleGoalChecker
[controller_server-1] [INFO] [1679301711.574790099] [controller_server]: Controller Server has general_goal_checker goal checkers available.
[controller_server-1] [INFO] [1679301711.597340623] [controller_server]: Created controller : FollowPath of type dwb_core::DWBLocalPlanner
[controller_server-1] [INFO] [1679301711.606375272] [controller_server]: Setting transform_tolerance to 0.200000
[controller_server-1] [INFO] [1679301711.657224715] [controller_server]: Using critic “RotateToGoal” (dwb_critics::RotateToGoalCritic)
[controller_server-1] [INFO] [1679301711.660443946] [controller_server]: Critic plugin initialized
[controller_server-1] [INFO] [1679301711.661434877] [controller_server]: Using critic “Oscillation” (dwb_critics::OscillationCritic)
[controller_server-1] [INFO] [1679301711.664949729] [controller_server]: Critic plugin initialized
[controller_server-1] [INFO] [1679301711.665759166] [controller_server]: Using critic “BaseObstacle” (dwb_critics::BaseObstacleCritic)
[controller_server-1] [INFO] [1679301711.667559434] [controller_server]: Critic plugin initialized
[controller_server-1] [INFO] [1679301711.668288367] [controller_server]: Using critic “GoalAlign” (dwb_critics::GoalAlignCritic)
[controller_server-1] [INFO] [1679301711.672247553] [controller_server]: Critic plugin initialized
[controller_server-1] [INFO] [1679301711.672968427] [controller_server]: Using critic “PathAlign” (dwb_critics::PathAlignCritic)
[controller_server-1] [INFO] [1679301711.675930956] [controller_server]: Critic plugin initialized
[controller_server-1] [INFO] [1679301711.676497823] [controller_server]: Using critic “PathDist” (dwb_critics::PathDistCritic)
[controller_server-1] [INFO] [1679301711.677963371] [controller_server]: Critic plugin initialized
[controller_server-1] [INFO] [1679301711.678612535] [controller_server]: Using critic “GoalDist” (dwb_critics::GoalDistCritic)
[controller_server-1] [INFO] [1679301711.680355300] [controller_server]: Critic plugin initialized
[controller_server-1] [INFO] [1679301711.680394132] [controller_server]: Controller Server has FollowPath controllers available.
[lifecycle_manager-5] [INFO] [1679301711.698654061] [lifecycle_manager_pathplanner]: Configuring recoveries_server
[recoveries_server-3] [INFO] [1679301711.698985793] [recoveries_server]: Configuring
[recoveries_server-3] [INFO] [1679301711.714337867] [recoveries_server]: Creating recovery plugin spin of typenav2_recoveries/Spin
[recoveries_server-3] [INFO] [1679301711.726103194] [recoveries_server]: Configuring spin
[recoveries_server-3] [INFO] [1679301711.750879612] [recoveries_server]: Creating recovery plugin backup of type nav2_recoveries/BackUp
[recoveries_server-3] [INFO] [1679301711.762251725] [recoveries_server]: Configuring backup
[recoveries_server-3] [INFO] [1679301711.774485352] [recoveries_server]: Creating recovery plugin wait of typenav2_recoveries/Wait
[recoveries_server-3] [INFO] [1679301711.785986441] [recoveries_server]: Configuring wait
[lifecycle_manager-5] [INFO] [1679301711.799204945] [lifecycle_manager_pathplanner]: Configuring bt_navigator
[bt_navigator-4] [INFO] [1679301711.799550069] [bt_navigator]: Configuring
[lifecycle_manager-5] [INFO] [1679301712.024738589] [lifecycle_manager_pathplanner]: Activating planner_server
[planner_server-2] [INFO] [1679301712.025047420] [planner_server]: Activating
[planner_server-2] [INFO] [1679301712.025286712] [global_costmap.global_costmap]: Activating
[planner_server-2] [INFO] [1679301712.025321099] [global_costmap.global_costmap]: Checking transform
[planner_server-2] [INFO] [1679301712.025419332] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Lookup would require extrapolation into the past. Requested time 674.526000 but the earliest data is at time 674.942000, when looking up transform from frame [base_link] to frame [map]
[planner_server-2] [INFO] [1679301712.525604799] [global_costmap.global_costmap]: start
[planner_server-2] [INFO] [1679301712.575825815] [planner_server]: Activating plugin GridBased of type NavfnPlanner
[planner_server-2] [INFO] [1679301712.575907915] [planner_server]: Creating bond (planner_server) to lifecyclemanager.
[lifecycle_manager-5] [INFO] [1679301712.678703313] [lifecycle_manager_pathplanner]: Server planner_server connected with bond.
[lifecycle_manager-5] [INFO] [1679301712.678791962] [lifecycle_manager_pathplanner]: Activating controller_server
[controller_server-1] [INFO] [1679301712.679486243] [controller_server]: Activating
[controller_server-1] [INFO] [1679301712.679532834] [local_costmap.local_costmap]: Activating
[controller_server-1] [INFO] [1679301712.679558130] [local_costmap.local_costmap]: Checking transform
[controller_server-1] [INFO] [1679301712.679670924] [local_costmap.local_costmap]: start
[controller_server-1] [INFO] [1679301712.729938194] [controller_server]: Creating bond (controller_server) to lifecycle manager.
[lifecycle_manager-5] [INFO] [1679301712.835547374] [lifecycle_manager_pathplanner]: Server controller_server connected with bond.
[lifecycle_manager-5] [INFO] [1679301712.835640616] [lifecycle_manager_pathplanner]: Activating recoveries_server
[recoveries_server-3] [INFO] [1679301712.836007586] [recoveries_server]: Activating
[recoveries_server-3] [INFO] [1679301712.836045364] [recoveries_server]: Activating spin
[recoveries_server-3] [INFO] [1679301712.836067564] [recoveries_server]: Activating backup
[recoveries_server-3] [INFO] [1679301712.836089183] [recoveries_server]: Activating wait
[recoveries_server-3] [INFO] [1679301712.836110961] [recoveries_server]: Creating bond (recoveries_server) to lifecycle manager.
[lifecycle_manager-5] [INFO] [1679301712.939527845] [lifecycle_manager_pathplanner]: Server recoveries_server connected with bond.
[lifecycle_manager-5] [INFO] [1679301712.939605433] [lifecycle_manager_pathplanner]: Activating bt_navigator
[bt_navigator-4] [INFO] [1679301712.939953712] [bt_navigator]: Activating
[bt_navigator-4] [PublisherZMQ] Publisher quitting.
[bt_navigator-4] [PublisherZMQ] just died. Exeption Context was terminated
[bt_navigator-4] [INFO] [1679301713.030534457] [bt_navigator]: Creating bond (bt_navigator) to lifecycle manager.
[lifecycle_manager-5] [INFO] [1679301713.136654242] [lifecycle_manager_pathplanner]: Server bt_navigator connected with bond.
[lifecycle_manager-5] [INFO] [1679301713.136720857] [lifecycle_manager_pathplanner]: Managed nodes are active
[lifecycle_manager-5] [INFO] [1679301713.136741240] [lifecycle_manager_pathplanner]: Creating bond timer…

It seems to end on “creating bond timer” meaning my nav2_stack is not fully initializing.

Below also shows the content of my config folder that contains the following files:

My bt_navigator.yaml file:

bt_navigator:
ros__parameters:
use_sim_time: True
global_frame: map
robot_base_frame: base_link
odom_topic: /odom
bt_loop_duration: 10
default_server_timeout: 20
default_nav_to_pose_bt_xml: “/home/user/ros2_ws/src/path_planner_server/config/behavior.xml”
plugin_lib_names:
- nav2_compute_path_to_pose_action_bt_node
- nav2_compute_path_through_poses_action_bt_node
- nav2_follow_path_action_bt_node
- nav2_back_up_action_bt_node
- nav2_spin_action_bt_node
- nav2_wait_action_bt_node
- nav2_clear_costmap_service_bt_node
- nav2_is_stuck_condition_bt_node
- nav2_goal_reached_condition_bt_node
- nav2_goal_updated_condition_bt_node
- nav2_initial_pose_received_condition_bt_node
- nav2_reinitialize_global_localization_service_bt_node
- nav2_rate_controller_bt_node
- nav2_distance_controller_bt_node
- nav2_speed_controller_bt_node
- nav2_truncate_path_action_bt_node
- nav2_goal_updater_node_bt_node
- nav2_recovery_node_bt_node
- nav2_pipeline_sequence_bt_node
- nav2_round_robin_node_bt_node
- nav2_transform_available_condition_bt_node
- nav2_time_expired_condition_bt_node
- nav2_distance_traveled_condition_bt_node
- nav2_single_trigger_bt_node
- nav2_is_battery_low_condition_bt_node
- nav2_navigate_through_poses_action_bt_node
- nav2_navigate_to_pose_action_bt_node
- nav2_remove_passed_goals_action_bt_node

My controller.yaml 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

My planner_server.yaml file:

planner_server:
ros__parameters:
expected_planner_frequency: 10.0
use_sim_time: True
planner_plugins: [“GridBased”]
GridBased:
plugin: “nav2_navfn_planner/NavfnPlanner”
tolerance: 0.5
use_astar: false
allow_unknown: true

My recovery.yaml file:

recoveries_server:
ros__parameters:
costmap_topic: local_costmap/costmap_raw
footprint_topic: local_costmap/published_footprint
cycle_frequency: 10.0
recovery_plugins: [“spin”, “backup”, “wait”]
spin:
plugin: “nav2_recoveries/Spin”
backup:
plugin: “nav2_recoveries/BackUp”
wait:
plugin: “nav2_recoveries/Wait”
global_frame: odom
robot_base_frame: base_link
transform_timeout: 0.1
use_sim_time: true
simulate_ahead_time: 2.0
max_rotational_vel: 1.0
min_rotational_vel: 0.4
rotational_acc_lim: 3.2

My behavior.xml file:

And below contains the following launch file from the launch folder:

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('path_planner_server'), 'config', 'controller.yaml')
bt_navigator_yaml = os.path.join(get_package_share_directory('path_planner_server'), 'config', 'bt_navigator.yaml')
planner_yaml = os.path.join(get_package_share_directory('path_planner_server'), 'config', 'planner_server.yaml')
recovery_yaml = os.path.join(get_package_share_directory('path_planner_server'), 'config', 'recovery.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']}])
])

All of these files above were copied as provided from the notebook. The image below also shows the setup of my files:

image

I hope what I provided is sufficient. Please let me know if I am missing anything.

My behavior.xml file:

HI @HusamArdah ,

I just tried the same exercise. Here is my output:

user:~/ros2_ws$ source install/setup.bash
user:~/ros2_ws$ ros2 launch path_planner_server pathplanner.launch.py
[INFO] [launch]: All log files can be found below /home/user/.ros/log/2023-03-20-10-46-53-844521-1_xterm-1287
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [map_server-1]: process started with pid [1289]
[INFO] [amcl-2]: process started with pid [1291]
[INFO] [lifecycle_manager-3]: process started with pid [1293]
[INFO] [planner_server-4]: process started with pid [1295]
[INFO] [controller_server-5]: process started with pid [1297]
[INFO] [recoveries_server-6]: process started with pid [1299]
[INFO] [bt_navigator-7]: process started with pid [1301]
[INFO] [lifecycle_manager-8]: process started with pid [1303]
[lifecycle_manager-3] [INFO] [1679309214.601449189] [lifecycle_manager_localization]: Creating
[lifecycle_manager-8] [INFO] [1679309214.601753254] [lifecycle_manager_pathplanning]: Creating
[lifecycle_manager-3] [INFO] [1679309214.657537864] [lifecycle_manager_localization]: Creating and initializing lifecycle service clients
[lifecycle_manager-8] [INFO] [1679309214.657977113] [lifecycle_manager_pathplanning]: Creating and initializing lifecycle service clients
[lifecycle_manager-3] [INFO] [1679309214.673853349] [lifecycle_manager_localization]: Starting managed nodes bringup...
[lifecycle_manager-8] [INFO] [1679309214.675122851] [lifecycle_manager_pathplanning]: Starting managed nodes bringup...
[lifecycle_manager-8] [INFO] [1679309214.675199508] [lifecycle_manager_pathplanning]: Configuring planner_server
[lifecycle_manager-3] [INFO] [1679309214.676237490] [lifecycle_manager_localization]: Configuring map_server
[amcl-2] [INFO] [1679309214.681432919] [amcl]:
[amcl-2]        amcl lifecycle node launched.
[amcl-2]        Waiting on external lifecycle transitions to activate
[amcl-2]        See https://design.ros2.org/articles/node_lifecycle.html for more information.
[amcl-2] [INFO] [1679309214.681576367] [amcl]: Creating
[bt_navigator-7] [INFO] [1679309214.711303378] [bt_navigator]:
[bt_navigator-7]        bt_navigator lifecycle node launched.
[bt_navigator-7]        Waiting on external lifecycle transitions to activate
[bt_navigator-7]        See https://design.ros2.org/articles/node_lifecycle.html for more information.
[bt_navigator-7] [INFO] [1679309214.711457521] [bt_navigator]: Creating
[recoveries_server-6] [INFO] [1679309214.724015292] [recoveries_server]:
[recoveries_server-6]   recoveries_server lifecycle node launched.
[recoveries_server-6]   Waiting on external lifecycle transitions to activate
[recoveries_server-6]   See https://design.ros2.org/articles/node_lifecycle.html for more information.
[planner_server-4] [INFO] [1679309214.795665035] [planner_server]:
[planner_server-4]      planner_server lifecycle node launched.
[planner_server-4]      Waiting on external lifecycle transitions to activate
[planner_server-4]      See https://design.ros2.org/articles/node_lifecycle.html for more information.
[controller_server-5] [INFO] [1679309214.801617239] [controller_server]:
[controller_server-5]   controller_server lifecycle node launched.
[controller_server-5]   Waiting on external lifecycle transitions to activate
[controller_server-5]   See https://design.ros2.org/articles/node_lifecycle.html for more information.
[planner_server-4] [INFO] [1679309214.815429846] [planner_server]: Creating
[controller_server-5] [INFO] [1679309214.816454485] [controller_server]: Creating controller server
[planner_server-4] [INFO] [1679309214.846989261] [global_costmap.global_costmap]:
[planner_server-4]      global_costmap lifecycle node launched.
[planner_server-4]      Waiting on external lifecycle transitions to activate
[planner_server-4]      See https://design.ros2.org/articles/node_lifecycle.html for more information.
[controller_server-5] [INFO] [1679309214.849026445] [local_costmap.local_costmap]:
[controller_server-5]   local_costmap lifecycle node launched.
[controller_server-5]   Waiting on external lifecycle transitions to activate
[controller_server-5]   See https://design.ros2.org/articles/node_lifecycle.html for more information.
[planner_server-4] [INFO] [1679309214.897885449] [global_costmap.global_costmap]: Creating Costmap
[controller_server-5] [INFO] [1679309214.898444073] [local_costmap.local_costmap]: Creating Costmap
[planner_server-4] [INFO] [1679309214.922775739] [planner_server]: Configuring
[planner_server-4] [INFO] [1679309214.922841664] [global_costmap.global_costmap]: Configuring
[planner_server-4] [INFO] [1679309214.930594419] [global_costmap.global_costmap]: Using plugin "static_layer"
[map_server-1] [INFO] [1679309214.999902917] [map_server]:
[map_server-1]  map_server lifecycle node launched.
[map_server-1]  Waiting on external lifecycle transitions to activate
[map_server-1]  See https://design.ros2.org/articles/node_lifecycle.html for more information.
[map_server-1] [INFO] [1679309215.000073171] [map_server]: Creating
[map_server-1] [INFO] [1679309215.001239813] [map_server]: Configuring
[map_server-1] [INFO] [map_io]: Loading yaml file: /home/user/ros2_ws/install/map_server/share/map_server/config/turtlebot_area.yaml
[map_server-1] [DEBUG] [map_io]: resolution: 0.05
[map_server-1] [DEBUG] [map_io]: origin[0]: -3.54
[map_server-1] [DEBUG] [map_io]: origin[1]: -1.92
[map_server-1] [DEBUG] [map_io]: origin[2]: 0
[map_server-1] [DEBUG] [map_io]: free_thresh: 0.25
[map_server-1] [DEBUG] [map_io]: occupied_thresh: 0.65
[map_server-1] [DEBUG] [map_io]: mode: trinary
[map_server-1] [DEBUG] [map_io]: negate: 0
[planner_server-4] [INFO] [1679309215.032574783] [global_costmap.global_costmap]: Subscribing to the map topic (/map) with transient local durability
[planner_server-4] [INFO] [1679309215.033784891] [global_costmap.global_costmap]: Initialized plugin "static_layer"
[planner_server-4] [INFO] [1679309215.033823086] [global_costmap.global_costmap]: Using plugin "obstacle_layer"
[planner_server-4] [INFO] [1679309215.036367183] [global_costmap.global_costmap]: Subscribed to Topics: scan
[planner_server-4] [INFO] [1679309215.046618214] [global_costmap.global_costmap]: Initialized plugin "obstacle_layer"
[planner_server-4] [INFO] [1679309215.046680598] [global_costmap.global_costmap]: Using plugin "inflation_layer"
[planner_server-4] [INFO] [1679309215.049443827] [global_costmap.global_costmap]: Initialized plugin "inflation_layer"
[planner_server-4] [INFO] [1679309215.068198133] [planner_server]: Created global planner plugin GridBased of type nav2_navfn_planner/NavfnPlanner
[planner_server-4] [INFO] [1679309215.068259247] [planner_server]: Configuring plugin GridBased of type NavfnPlanner
[planner_server-4] [INFO] [1679309215.073819090] [planner_server]: Planner Server has GridBased  planners available.
[lifecycle_manager-8] [INFO] [1679309215.086822059] [lifecycle_manager_pathplanning]: Configuring controller_server
[controller_server-5] [INFO] [1679309215.087858309] [controller_server]: Configuring controller interface
[controller_server-5] [INFO] [1679309215.088296616] [controller_server]: getting goal checker plugins..
[controller_server-5] [INFO] [1679309215.088727273] [controller_server]: Controller frequency set to 10.0000Hz
[controller_server-5] [INFO] [1679309215.088791630] [local_costmap.local_costmap]: Configuring
[controller_server-5] [INFO] [1679309215.094183851] [local_costmap.local_costmap]: Using plugin "voxel_layer"
[controller_server-5] [INFO] [1679309215.099678593] [local_costmap.local_costmap]: Subscribed to Topics: scan
[controller_server-5] [INFO] [1679309215.113725744] [local_costmap.local_costmap]: Initialized plugin "voxel_layer"
[controller_server-5] [INFO] [1679309215.113796119] [local_costmap.local_costmap]: Using plugin "inflation_layer"
[controller_server-5] [INFO] [1679309215.116292684] [local_costmap.local_costmap]: Initialized plugin "inflation_layer"
[controller_server-5] [INFO] [1679309215.199814376] [controller_server]: Created progress_checker : progress_checker of type nav2_controller::SimpleProgressChecker
[controller_server-5] [INFO] [1679309215.223717392] [controller_server]: Created goal checker : general_goal_checker of type nav2_controller::SimpleGoalChecker
[controller_server-5] [INFO] [1679309215.230916649] [controller_server]: Controller Server has general_goal_checker  goal checkers available.
[map_server-1] [INFO] [map_io]: Loading image_file: /home/user/ros2_ws/install/map_server/share/map_server/config/turtlebot_area.pgm
[map_server-1] [DEBUG] [map_io]: Read map /home/user/ros2_ws/install/map_server/share/map_server/config/turtlebot_area.pgm: 147 X 144 map @ 0.05 m/cell
[lifecycle_manager-3] [INFO] [1679309215.248069605] [lifecycle_manager_localization]: Configuring amcl
[amcl-2] [INFO] [1679309215.248406775] [amcl]: Configuring
[amcl-2] [INFO] [1679309215.248571565] [amcl]: initTransforms
[amcl-2] [INFO] [1679309215.258437540] [amcl]: initPubSub
[controller_server-5] [INFO] [1679309215.258712794] [controller_server]: Created controller : FollowPath of type dwb_core::DWBLocalPlanner
[controller_server-5] [INFO] [1679309215.263086023] [controller_server]: Setting transform_tolerance to 0.200000
[amcl-2] [INFO] [1679309215.263695220] [amcl]: Subscribed to map topic.
[lifecycle_manager-3] [INFO] [1679309215.266883498] [lifecycle_manager_localization]: Activating map_server
[map_server-1] [INFO] [1679309215.267120385] [map_server]: Activating
[planner_server-4] [INFO] [1679309215.267909004] [global_costmap.global_costmap]: StaticLayer: Resizing costmap to 147 X 144 at 0.050000 m/pix
[map_server-1] [INFO] [1679309215.268590521] [map_server]: Creating bond (map_server) to lifecycle manager.
[controller_server-5] [INFO] [1679309215.300889621] [controller_server]: Using critic "RotateToGoal" (dwb_critics::RotateToGoalCritic)
[controller_server-5] [INFO] [1679309215.301976783] [controller_server]: Critic plugin initialized
[controller_server-5] [INFO] [1679309215.302229531] [controller_server]: Using critic "Oscillation" (dwb_critics::OscillationCritic)
[controller_server-5] [INFO] [1679309215.304039945] [controller_server]: Critic plugin initialized
[controller_server-5] [INFO] [1679309215.304745847] [controller_server]: Using critic "ObstacleFootprint" (dwb_critics::ObstacleFootprintCritic)
[controller_server-5] [INFO] [1679309215.305953038] [controller_server]: Critic plugin initialized
[controller_server-5] [INFO] [1679309215.306687534] [controller_server]: Using critic "GoalAlign" (dwb_critics::GoalAlignCritic)
[controller_server-5] [INFO] [1679309215.308319358] [controller_server]: Critic plugin initialized
[controller_server-5] [INFO] [1679309215.308997180] [controller_server]: Using critic "PathAlign" (dwb_critics::PathAlignCritic)
[controller_server-5] [INFO] [1679309215.310476578] [controller_server]: Critic plugin initialized
[controller_server-5] [INFO] [1679309215.311151682] [controller_server]: Using critic "PathDist" (dwb_critics::PathDistCritic)
[controller_server-5] [INFO] [1679309215.312074774] [controller_server]: Critic plugin initialized
[controller_server-5] [INFO] [1679309215.312546719] [controller_server]: Using critic "GoalDist" (dwb_critics::GoalDistCritic)
[controller_server-5] [INFO] [1679309215.313389628] [controller_server]: Critic plugin initialized
[controller_server-5] [INFO] [1679309215.313442793] [controller_server]: Controller Server has FollowPath  controllers available.
[lifecycle_manager-8] [INFO] [1679309215.319965249] [lifecycle_manager_pathplanning]: Configuring recoveries_server
[recoveries_server-6] [INFO] [1679309215.320305443] [recoveries_server]: Configuring
[recoveries_server-6] [INFO] [1679309215.325994066] [recoveries_server]: Creating recovery plugin spin of type nav2_recoveries/Spin
[lifecycle_manager-3] [INFO] [1679309215.373640334] [lifecycle_manager_localization]: Server map_server connected with bond.
[lifecycle_manager-3] [INFO] [1679309215.373711767] [lifecycle_manager_localization]: Activating amcl
[amcl-2] [INFO] [1679309215.374172592] [amcl]: Activating
[amcl-2] [INFO] [1679309215.374273151] [amcl]: initialPoseReceived
[amcl-2] [INFO] [1679309215.374345172] [amcl]: Setting pose (247.816000): 0.000 -0.000 -1.571
[amcl-2] [INFO] [1679309215.377226610] [amcl]: Creating bond (amcl) to lifecycle manager.
[recoveries_server-6] [INFO] [1679309215.394390851] [recoveries_server]: Configuring spin
[recoveries_server-6] [INFO] [1679309215.398898261] [recoveries_server]: Creating recovery plugin backup of type nav2_recoveries/BackUp
[recoveries_server-6] [INFO] [1679309215.405379154] [recoveries_server]: Configuring backup
[recoveries_server-6] [INFO] [1679309215.408623084] [recoveries_server]: Creating recovery plugin wait of type nav2_recoveries/Wait
[recoveries_server-6] [INFO] [1679309215.414558753] [recoveries_server]: Configuring wait
[lifecycle_manager-8] [INFO] [1679309215.418224799] [lifecycle_manager_pathplanning]: Configuring bt_navigator
[bt_navigator-7] [INFO] [1679309215.418539509] [bt_navigator]: Configuring
[lifecycle_manager-3] [INFO] [1679309215.480274790] [lifecycle_manager_localization]: Server amcl connected with bond.
[lifecycle_manager-3] [INFO] [1679309215.480351488] [lifecycle_manager_localization]: Managed nodes are active
[lifecycle_manager-3] [INFO] [1679309215.480395043] [lifecycle_manager_localization]: Creating bond timer...
[amcl-2] [INFO] [1679309215.565551261] [amcl]: Received a 147 X 144 map @ 0.050 m/pix
[amcl-2] [INFO] [1679309215.738544230] [amcl]: createLaserObject
[lifecycle_manager-8] [INFO] [1679309215.931034665] [lifecycle_manager_pathplanning]: Activating planner_server
[planner_server-4] [INFO] [1679309215.931392940] [planner_server]: Activating
[planner_server-4] [INFO] [1679309215.931468966] [global_costmap.global_costmap]: Activating
[planner_server-4] [INFO] [1679309215.931511375] [global_costmap.global_costmap]: Checking transform
[planner_server-4] [INFO] [1679309215.931650335] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Lookup would require extrapolation into the past.  Requested time 248.438000 but theearliest data is at time 249.237000, when looking up transform from frame [base_link] to frame [map]
[planner_server-4] [INFO] [1679309216.431759323] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Lookup would require extrapolation into the past.  Requested time 248.948000 but theearliest data is at time 249.237000, when looking up transform from frame [base_link] to frame [map]
[planner_server-4] [INFO] [1679309216.931739400] [global_costmap.global_costmap]: start
[planner_server-4] [INFO] [1679309216.982635931] [planner_server]: Activating plugin GridBased of type NavfnPlanner
[planner_server-4] [INFO] [1679309216.982705909] [planner_server]: Creating bond (planner_server) to lifecycle manager.
[lifecycle_manager-8] [INFO] [1679309217.086322795] [lifecycle_manager_pathplanning]: Server planner_server connected with bond.
[lifecycle_manager-8] [INFO] [1679309217.086391981] [lifecycle_manager_pathplanning]: Activating controller_server
[controller_server-5] [INFO] [1679309217.086744673] [controller_server]: Activating
[controller_server-5] [INFO] [1679309217.086823342] [local_costmap.local_costmap]: Activating
[controller_server-5] [INFO] [1679309217.086866349] [local_costmap.local_costmap]: Checking transform
[controller_server-5] [INFO] [1679309217.086976032] [local_costmap.local_costmap]: start
[controller_server-5] [INFO] [1679309217.087560782] [controller_server]: Creating bond (controller_server) to lifecycle manager.
[lifecycle_manager-8] [INFO] [1679309217.190379354] [lifecycle_manager_pathplanning]: Server controller_server connected withbond.
[lifecycle_manager-8] [INFO] [1679309217.190448062] [lifecycle_manager_pathplanning]: Activating recoveries_server
[recoveries_server-6] [INFO] [1679309217.190998697] [recoveries_server]: Activating
[recoveries_server-6] [INFO] [1679309217.191053501] [recoveries_server]: Activating spin
[recoveries_server-6] [INFO] [1679309217.191086580] [recoveries_server]: Activating backup
[recoveries_server-6] [INFO] [1679309217.191115344] [recoveries_server]: Activating wait
[recoveries_server-6] [INFO] [1679309217.191144546] [recoveries_server]: Creating bond (recoveries_server) to lifecycle manager.
[lifecycle_manager-8] [INFO] [1679309217.294162090] [lifecycle_manager_pathplanning]: Server recoveries_server connected withbond.
[lifecycle_manager-8] [INFO] [1679309217.294239282] [lifecycle_manager_pathplanning]: Activating bt_navigator
[bt_navigator-7] [INFO] [1679309217.294570336] [bt_navigator]: Activating
[bt_navigator-7] [PublisherZMQ] Server quitting.
[bt_navigator-7] [PublisherZMQ] just died. Exeption Context was terminated
[bt_navigator-7] [PublisherZMQ] Publisher quitting.
[bt_navigator-7] [PublisherZMQ] just died. Exeption Context was terminated
[bt_navigator-7] [INFO] [1679309217.336243628] [bt_navigator]: Creating bond (bt_navigator) to lifecycle manager.
[lifecycle_manager-8] [INFO] [1679309217.440170149] [lifecycle_manager_pathplanning]: Server bt_navigator connected with bond.
[lifecycle_manager-8] [INFO] [1679309217.440236920] [lifecycle_manager_pathplanning]: Managed nodes are active
[lifecycle_manager-8] [INFO] [1679309217.440277147] [lifecycle_manager_pathplanning]: Creating bond timer...

As you can see from the above output, once the nav2_stack is ready, it will stop at “Creating bond timer…”

Then you must first localize the robot on the map in Rviz2 and then only you can provide a goal pose. This way the goal pose will work better.

The below output shows localization + goal pose.

[amcl-2] [WARN] [1679309270.147935315] [amcl]: New subscription discovered on topic '/particle_cloud', requesting incompatible QoS. No messages will be sent to it. Last incompatible policy: RELIABILITY_QOS_POLICY
[amcl-2] [WARN] [1679309270.153044997] [amcl]: New subscription discovered on topic '/particle_cloud', requesting incompatible QoS. No messages will be sent to it. Last incompatible policy: RELIABILITY_QOS_POLICY
[amcl-2] [INFO] [1679309281.748988298] [amcl]: initialPoseReceived
[amcl-2] [WARN] [1679309281.749201566] [amcl]: Failed to transform initial pose in time (Lookup would require extrapolation into the future.  Requested time 314.030000 but the latest data is at time 314.024000, when looking up transform from frame [base_footprint] to frame [odom])
[amcl-2] [INFO] [1679309281.749269168] [amcl]: Setting pose (314.030000): 0.010 -0.023 -0.012
[bt_navigator-7] [INFO] [1679309302.454247958] [bt_navigator]: Begin navigating from current location to (0.49, 0.93)
[controller_server-5] [INFO] [1679309302.477985524] [controller_server]: Received a goal, begin computing control effort.
[controller_server-5] [WARN] [1679309302.481241898] [controller_server]: No goal checker was specified in parameter 'current_goal_checker'. Server will use only plugin loaded general_goal_checker . This warning will appear once.
[controller_server-5] [INFO] [1679309303.583941446] [controller_server]: Passing new path to controller.
[controller_server-5] [INFO] [1679309304.583926217] [controller_server]: Passing new path to controller.
[controller_server-5] [INFO] [1679309305.583917272] [controller_server]: Passing new path to controller.
[controller_server-5] [INFO] [1679309306.583899670] [controller_server]: Passing new path to controller.
[controller_server-5] [INFO] [1679309307.683902081] [controller_server]: Passing new path to controller.
[controller_server-5] [INFO] [1679309308.683993672] [controller_server]: Passing new path to controller.
[controller_server-5] [INFO] [1679309309.683896884] [controller_server]: Passing new path to controller.
[controller_server-5] [INFO] [1679309310.090890405] [controller_server]: Reached the goal!
[bt_navigator-7] [INFO] [1679309310.124480059] [bt_navigator]: Goal succeeded

Even if you do not localize your robot before giving goal pose, you should not have much problem reaching the goal spot.

Otherwise, I have checked every line of all the documents that you have shared in your post, they look the same as what I have and same as what is provided in the course notes.

Try rebuilding your workspace and sourcing your workspace before launching the path planner launch file. That might fix your issue.

Let me know if you still have this issue.

Regards,
Girish

Unfortunately it still does not work for me, even after localizing the robot and rebuilding + sourcing my workspace. I get the following error on my terminal once i set a goalpose on my rviz:

It is the full error display when I set a goal pose.

Would showing my rviz configuration perhaps help with this situation?

Hi @HusamArdah ,

Rviz2 Configuration does not cause this issue. The problem is something with your path planner configuration files or your launch file. But since you have copy-pasted the provided code contents as-is from the notes, I am not sure how to help you.

I have the same file contents and it works fine for me. I will tag the admins here so they can assist you further. They can go through your documents and check for any issues. I can’t do that.

Hi @albertoezquerro / @roalgoal ,
Sorry to tag you here directly, but I am not able to diagnose what is causing this problem for him.
If one of you can solve this issue, that would be great! Thanks.

Regards,
Girish

Thank you very much for your assistance.

This seems like a strange error. Maybe you will need to delete the build and install folders in your workspace, because as Girish says, There was no issue reproducing the course environment:

cd ~/ros2_ws
rm -rf build/ install/
colcon build

Also, make sure you restart all your terminals.

What does rviz2 look like? It looks like your nav2 setup is running, can you see it there?

Thank you now it worked after deleting the build and install folders.

1 Like

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