[very long post] [a lot of questions and problems]
Hello there,
source /opt/ros/foxy/setup.bash
cd ~/ros2_ws
colcon build --packages-select project_localization
source ~/ros2_ws/install/setup.bash
ros2 launch project_localization localization.launch.py
localization.launch.py
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():
nav2_yaml = os.path.join(get_package_share_directory('project_localization'), 'config', 'amcl_config.yaml')
map_file = os.path.join(get_package_share_directory('project_mapping'), 'maps', 'turtlebot_area.yaml')
return LaunchDescription([
Node(
package='nav2_map_server',
executable='map_server',
name='map_server',
output='screen',
parameters=[{'use_sim_time': True},
{'yaml_filename':map_file}]
),
Node(
package='nav2_amcl',
executable='amcl',
name='amcl',
output='screen',
parameters=[nav2_yaml]
),
Node(
package='nav2_lifecycle_manager',
executable='lifecycle_manager',
name='lifecycle_manager_localization',
output='screen',
parameters=[{'use_sim_time': True},
{'autostart': True},
{'node_names': ['map_server', 'amcl']}]
)
])
I get
user:~/ros2_ws$ ros2 launch project_localization localization.launch.py
[INFO] [launch]: All log files can be found below /home/user/.ros/log/2023-09-27-12-34-06-015666-4_xterm-5230
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [map_server-1]: process started with pid [5255]
[INFO] [amcl-2]: process started with pid [5257]
[INFO] [lifecycle_manager-3]: process started with pid [5259]
[lifecycle_manager-3] [INFO] [1695818047.133908262] [lifecycle_manager_localization]: Creating
[lifecycle_manager-3] [INFO] [1695818047.320844877] [lifecycle_manager_localization]: Creating and initializing lifecycle service clients
[lifecycle_manager-3] [INFO] [1695818047.329914336] [lifecycle_manager_localization]: Starting managed nodes bringup...
[lifecycle_manager-3] [INFO] [1695818047.329964701] [lifecycle_manager_localization]: Configuring map_server
[amcl-2] [INFO] [1695818047.616186365] [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] [1695818047.616348102] [amcl]: Creating
[map_server-1] [INFO] [1695818048.135659223] [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] [1695818048.135825770] [map_server]: Creating
[map_server-1] [INFO] [1695818048.136092978] [map_server]: Configuring
[map_server-1] [INFO] [map_io]: Loading yaml file: /home/user/ros2_ws/install/project_mapping/share/project_mapping/maps/turtlebot_area.yaml
[map_server-1] [DEBUG] [map_io]: resolution: 0.05
[map_server-1] [DEBUG] [map_io]: origin[0]: -1.26
[map_server-1] [DEBUG] [map_io]: origin[1]: -1.84
[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
[map_server-1] [INFO] [map_io]: Loading image_file: /home/user/ros2_ws/install/project_mapping/share/project_mapping/maps/turtlebot_area.pgm
[map_server-1] [DEBUG] [map_io]: Read map /home/user/ros2_ws/install/project_mapping/share/project_mapping/maps/turtlebot_area.pgm: 55 X 50 map @ 0.05 m/cell
[lifecycle_manager-3] [INFO] [1695818048.717614246] [lifecycle_manager_localization]: Configuring amcl
[amcl-2] [INFO] [1695818048.718628685] [amcl]: Configuring
[amcl-2] [INFO] [1695818048.718741088] [amcl]: initTransforms
[amcl-2] [INFO] [1695818048.796532068] [amcl]: initPubSub
[amcl-2] [INFO] [1695818048.804674516] [amcl]: Subscribed to map topic.
[lifecycle_manager-3] [INFO] [1695818048.897780252] [lifecycle_manager_localization]: Activating map_server
[map_server-1] [INFO] [1695818048.898814067] [map_server]: Activating
[lifecycle_manager-3] [INFO] [1695818048.899875442] [lifecycle_manager_localization]: Activating amcl
[amcl-2] [INFO] [1695818048.901178731] [amcl]: Received a 55 X 50 map @ 0.050 m/pix
[amcl-2] [INFO] [1695818048.901764809] [amcl]: Activating
[amcl-2] [WARN] [1695818048.902753679] [amcl]: Publishing the particlecloud as geometry_msgs/PoseArray msg is deprecated, will be published as nav2_msgs/ParticleCloud in the future
[lifecycle_manager-3] [INFO] [1695818048.903968085] [lifecycle_manager_localization]: Managed nodes are active
[amcl-2] [INFO] [1695818049.010629955] [amcl]: createLaserObject
[amcl-2] [WARN] [1695818051.618533520] [amcl]: ACML cannot publish a pose or update the transform. Please set the initial pose...
[amcl-2] [WARN] [1695818054.596964995] [amcl]: ACML cannot publish a pose or update the transform. Please set the initial pose...
[amcl-2] [INFO] [1695818054.710959150] [amcl]: initialPoseReceived
[amcl-2] [WARN] [1695818054.711103009] [amcl]: Failed to transform initial pose in time (Lookup would require extrapolation into the future.Requested time 1695818054.710452 but the latest data is at time 189.783000, when looking up transform from frame [odom] to frame [base_footprint])
[amcl-2] [INFO] [1695818054.711146271] [amcl]: Setting pose (189.749000): -0.024 0.011 -0.030
Is it normal to have this?
[WARN] [1695818576.010740766] [amcl]: Failed to transform initial pose in time (Lookup would require extrapolation into the future.Requested time 1695818576.004997 but the latest data is at time 553.209000, when looking up transform from frame [odom] to frame [base_footprint])
When starting as expected the particles ar spead
when moving they concentrate
Is it normal that in straight line the points spead more again?
amcl_config.yaml
amcl:
ros__parameters:
use_sim_time: True
alpha1: 0.2
alpha2: 0.2
alpha3: 0.2
alpha4: 0.2
alpha5: 0.2
base_frame_id: "base_footprint"
beam_skip_distance: 0.5
beam_skip_error_threshold: 0.9
beam_skip_threshold: 0.3
do_beamskip: false
global_frame_id: "map"
lambda_short: 0.1
laser_likelihood_max_dist: 2.0
laser_max_range: 3.5
laser_min_range: 0.1
laser_model_type: "likelihood_field"
max_beams: 60
max_particles: 10000
min_particles: 1000
odom_frame_id: "odom"
pf_err: 0.05
pf_z: 0.99
recovery_alpha_fast: 0.0
recovery_alpha_slow: 0.0
resample_interval: 1
robot_model_type: "differential"
save_pose_rate: 0.5
sigma_hit: 0.2
tf_broadcast: true
transform_tolerance: 0.5
update_min_a: 0.05
update_min_d: 0.1
z_hit: 0.5
z_max: 0.05
z_rand: 0.5
z_short: 0.05
except from this the localization seems to work pretty well and doesn’t have problem with the fact to stop it (ctrl-C) and restart it.
The problems come with the path planning package
source /opt/ros/foxy/setup.bash
cd ~/ros2_ws
colcon build --packages-select project_path_planning
source ~/ros2_ws/install/setup.bash
ros2 launch project_path_planning pathplanner.launch.py
pathplanner.launch.py
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.yaml')
bt_navigator_yaml = os.path.join(get_package_share_directory('project_path_planning'), 'config', 'bt_navigator.yaml')
planner_yaml = os.path.join(get_package_share_directory('project_path_planning'), 'config', 'planner_server.yaml')
recovery_yaml = os.path.join(get_package_share_directory('project_path_planning'), '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']}])
])
I get the following launching, giving in rviz a goal and then when finished a second one
user:~/ros2_ws$ ros2 launch project_path_planning pathplanner.launch.py[INFO] [launch]: All log files can be found below /home/user/.ros/log/2023-09-27-12-59-37-567429-4_xterm-12034
[INFO] [launch]: Default logging verbosity is set to INFO
[INFO] [controller_server-1]: process started with pid [12059]
[INFO] [planner_server-2]: process started with pid [12061]
[INFO] [recoveries_server-3]: process started with pid [12063]
[INFO] [bt_navigator-4]: process started with pid [12065]
[INFO] [lifecycle_manager-5]: process started with pid [12067]
[lifecycle_manager-5] [INFO] [1695819578.639631503] [lifecycle_manager_pathplanner]: Creating
[lifecycle_manager-5] [INFO] [1695819578.727039032] [lifecycle_manager_pathplanner]: Creating and initializing lifecycle service clients
[lifecycle_manager-5] [INFO] [1695819578.773307518] [lifecycle_manager_pathplanner]: Starting managed nodes bringup...
[lifecycle_manager-5] [INFO] [1695819578.774254045] [lifecycle_manager_pathplanner]: Configuring planner_server
[controller_server-1] [INFO] [1695819579.363613371] [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.
[recoveries_server-3] [INFO] [1695819579.437622052] [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.
[bt_navigator-4] [INFO] [1695819579.443781076] [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.
[controller_server-1] [INFO] [1695819579.450222121] [controller_server]: Creating controller server
[bt_navigator-4] [INFO] [1695819579.447080356] [bt_navigator]: Creating
[planner_server-2] [INFO] [1695819579.510251556] [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.
[planner_server-2] [INFO] [1695819579.570956245] [planner_server]: Creating
[planner_server-2] [INFO] [1695819579.769121459] [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] [1695819579.788147715] [global_costmap.global_costmap]: Creating Costmap
[controller_server-1] [INFO] [1695819579.883466538] [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] [1695819579.893751613] [local_costmap.local_costmap]: Creating Costmap
[planner_server-2] [INFO] [1695819579.977713979] [planner_server]: Configuring
[planner_server-2] [INFO] [1695819579.977769794] [global_costmap.global_costmap]: Configuring
[planner_server-2] [INFO] [1695819580.003653469] [global_costmap.global_costmap]: Using plugin "static_layer"
[planner_server-2] [INFO] [1695819580.426172710] [global_costmap.global_costmap]: Subscribing to the map topic (/map) with transient local durability
[planner_server-2] [INFO] [1695819580.437577433] [global_costmap.global_costmap]: Initialized plugin "static_layer"
[planner_server-2] [INFO] [1695819580.437650730] [global_costmap.global_costmap]: Using plugin "obstacle_layer"
[planner_server-2] [INFO] [1695819580.442824386] [global_costmap.global_costmap]: Subscribed to Topics:
[planner_server-2] [INFO] [1695819580.442895836] [global_costmap.global_costmap]: Initialized plugin "obstacle_layer"
[planner_server-2] [INFO] [1695819580.442922623] [global_costmap.global_costmap]: Using plugin "inflation_layer"
[planner_server-2] [INFO] [1695819580.443234291] [global_costmap.global_costmap]: Initialized plugin "inflation_layer"
[planner_server-2] [INFO] [1695819580.666167874] [planner_server]: Created global planner plugin GridBased of type nav2_navfn_planner/NavfnPlanner
[planner_server-2] [INFO] [1695819580.666260276] [planner_server]: Configuring plugin GridBased of type NavfnPlanner
[planner_server-2] [INFO] [1695819580.995970706] [planner_server]: Planner Server has GridBased planners available.
[lifecycle_manager-5] [INFO] [1695819581.038478946] [lifecycle_manager_pathplanner]: Configuring controller_server
[controller_server-1] [INFO] [1695819581.039473804] [controller_server]: Configuring controller interface
[controller_server-1] [INFO] [1695819581.039626955] [controller_server]: Controller frequency set to 5.0000Hz
[controller_server-1] [INFO] [1695819581.039661681] [local_costmap.local_costmap]: Configuring
[controller_server-1] [INFO] [1695819581.054866198] [local_costmap.local_costmap]: Using plugin "static_layer"
[controller_server-1] [INFO] [1695819581.099859251] [local_costmap.local_costmap]: Subscribing to the map topic (/map) with transient local durability
[controller_server-1] [INFO] [1695819581.107947986] [local_costmap.local_costmap]: Initialized plugin "static_layer"
[controller_server-1] [INFO] [1695819581.107998253] [local_costmap.local_costmap]: Using plugin "obstacle_layer"
[controller_server-1] [INFO] [1695819581.108169929] [local_costmap.local_costmap]: Subscribed to Topics:
[controller_server-1] [INFO] [1695819581.108232340] [local_costmap.local_costmap]: Initialized plugin "obstacle_layer"
[controller_server-1] [INFO] [1695819581.108248017] [local_costmap.local_costmap]: Using plugin "inflation_layer"
[controller_server-1] [INFO] [1695819581.108540332] [local_costmap.local_costmap]: Initialized plugin "inflation_layer"
[planner_server-2] [INFO] [1695819581.122888437] [global_costmap.global_costmap]: StaticLayer: Resizing costmap to 55 X 50 at 0.050000 m/pix
[controller_server-1] [INFO] [1695819581.122921974] [local_costmap.local_costmap]: StaticLayer: Resizing costmap to 55 X 50 at 0.050000 m/pix
[controller_server-1] [INFO] [1695819581.301456471] [controller_server]: Created progress_checker : progress_checker of type nav2_controller::SimpleProgressChecker
[controller_server-1] [INFO] [1695819581.308265674] [controller_server]: Created goal_checker : goal_checker of type nav2_controller::SimpleGoalChecker
[controller_server-1] [INFO] [1695819581.617071973] [controller_server]: Created controller : FollowPath of type dwb_core::DWBLocalPlanner
[controller_server-1] [INFO] [1695819581.617374758] [controller_server]: Setting transform_tolerance to 0.200000
[controller_server-1] [INFO] [1695819582.167502549] [controller_server]: Using critic "RotateToGoal" (dwb_critics::RotateToGoalCritic)
[controller_server-1] [INFO] [1695819582.179993933] [controller_server]: Critic plugin initialized
[controller_server-1] [INFO] [1695819582.195718109] [controller_server]: Using critic "Oscillation" (dwb_critics::OscillationCritic)
[controller_server-1] [INFO] [1695819582.203753140] [controller_server]: Critic plugin initialized
[controller_server-1] [INFO] [1695819582.204985826] [controller_server]: Using critic "BaseObstacle" (dwb_critics::BaseObstacleCritic)
[controller_server-1] [INFO] [1695819582.214933220] [controller_server]: Critic plugin initialized
[controller_server-1] [INFO] [1695819582.222937446] [controller_server]: Using critic "GoalAlign" (dwb_critics::GoalAlignCritic)
[controller_server-1] [INFO] [1695819582.243359485] [controller_server]: Critic plugin initialized
[controller_server-1] [INFO] [1695819582.255268704] [controller_server]: Using critic "PathAlign" (dwb_critics::PathAlignCritic)
[controller_server-1] [INFO] [1695819582.268452940] [controller_server]: Critic plugin initialized
[controller_server-1] [INFO] [1695819582.273345961] [controller_server]: Using critic "PathDist" (dwb_critics::PathDistCritic)
[controller_server-1] [INFO] [1695819582.285736215] [controller_server]: Critic plugin initialized
[controller_server-1] [INFO] [1695819582.291096512] [controller_server]: Using critic "GoalDist" (dwb_critics::GoalDistCritic)
[controller_server-1] [INFO] [1695819582.296165467] [controller_server]: Critic plugin initialized
[controller_server-1] [INFO] [1695819582.296231600] [controller_server]: Controller Server has FollowPath controllers available.
[lifecycle_manager-5] [INFO] [1695819582.397046039] [lifecycle_manager_pathplanner]: Configuring recoveries_server
[recoveries_server-3] [INFO] [1695819582.397510759] [recoveries_server]: Configuring
[recoveries_server-3] [INFO] [1695819582.437351125] [recoveries_server]: Creating recovery plugin spin of type nav2_recoveries/Spin
[recoveries_server-3] [INFO] [1695819582.546638473] [recoveries_server]: Configuring spin
[recoveries_server-3] [INFO] [1695819582.555868906] [recoveries_server]: Creating recovery plugin backup of type nav2_recoveries/BackUp
[recoveries_server-3] [INFO] [1695819582.821622502] [recoveries_server]: Configuring backup
[recoveries_server-3] [INFO] [1695819582.848021049] [recoveries_server]: Creating recovery plugin wait of type nav2_recoveries/Wait
[recoveries_server-3] [INFO] [1695819582.998001527] [recoveries_server]: Configuring wait
[lifecycle_manager-5] [INFO] [1695819583.021042693] [lifecycle_manager_pathplanner]: Configuring bt_navigator
[bt_navigator-4] [INFO] [1695819583.021538671] [bt_navigator]: Configuring
[bt_navigator-4] [INFO] [1695819584.073187443] [bt_navigator_rclcpp_node]: Waiting for "compute_path_to_pose" action server
[bt_navigator-4] [INFO] [1695819584.095292687] [bt_navigator_rclcpp_node]: "ComputePathToPose" BtActionNode initialized
[bt_navigator-4] [INFO] [1695819584.115711059] [bt_navigator_rclcpp_node]: Waiting for "global_costmap/clear_entirely_global_costmap" service
[bt_navigator-4] [INFO] [1695819584.119039746] [bt_navigator_rclcpp_node]: "ClearGlobalCostmap-Context" BtServiceNode initialized
[bt_navigator-4] [INFO] [1695819584.171289209] [bt_navigator_rclcpp_node]: Waiting for "follow_path" action server
[bt_navigator-4] [INFO] [1695819584.175312259] [bt_navigator_rclcpp_node]: "FollowPath" BtActionNode initialized
[bt_navigator-4] [INFO] [1695819584.186917001] [bt_navigator_rclcpp_node]: Waiting for "local_costmap/clear_entirely_local_costmap" service
[bt_navigator-4] [INFO] [1695819584.197435235] [bt_navigator_rclcpp_node]: "ClearLocalCostmap-Context" BtServiceNode initialized
[bt_navigator-4] [INFO] [1695819584.219540799] [bt_navigator_rclcpp_node]: Waiting for "local_costmap/clear_entirely_local_costmap" service
[bt_navigator-4] [INFO] [1695819584.223358278] [bt_navigator_rclcpp_node]: "ClearLocalCostmap-Subtree" BtServiceNode initialized
[bt_navigator-4] [INFO] [1695819584.239954899] [bt_navigator_rclcpp_node]: Waiting for "global_costmap/clear_entirely_global_costmap" service
[bt_navigator-4] [INFO] [1695819584.240911411] [bt_navigator_rclcpp_node]: "ClearGlobalCostmap-Subtree" BtServiceNode initialized
[bt_navigator-4] [INFO] [1695819584.304143406] [bt_navigator_rclcpp_node]: Waiting for "spin" action server
[bt_navigator-4] [INFO] [1695819584.305188798] [bt_navigator_rclcpp_node]: "Spin" BtActionNode initialized
[bt_navigator-4] [INFO] [1695819584.419414957] [bt_navigator_rclcpp_node]: Waiting for "wait" action server
[bt_navigator-4] [INFO] [1695819584.420381044] [bt_navigator_rclcpp_node]: "Wait" BtActionNode initialized
[lifecycle_manager-5] [INFO] [1695819584.430855538] [lifecycle_manager_pathplanner]: Activating planner_server
[planner_server-2] [INFO] [1695819584.431856858] [planner_server]: Activating
[planner_server-2] [INFO] [1695819584.431905778] [global_costmap.global_costmap]: Activating
[planner_server-2] [INFO] [1695819584.431929881] [global_costmap.global_costmap]: Checking transform
[planner_server-2] [INFO] [1695819584.432029496] [global_costmap.global_costmap]: start
[planner_server-2] [INFO] [1695819584.483759106] [planner_server]: Activating plugin GridBased of type NavfnPlanner
[lifecycle_manager-5] [INFO] [1695819584.493933214] [lifecycle_manager_pathplanner]: Activating controller_server
[controller_server-1] [INFO] [1695819584.494676947] [controller_server]: Activating
[controller_server-1] [INFO] [1695819584.494743044] [local_costmap.local_costmap]: Activating
[controller_server-1] [INFO] [1695819584.494768978] [local_costmap.local_costmap]: Checking transform
[controller_server-1] [INFO] [1695819584.494903670] [local_costmap.local_costmap]: start
[lifecycle_manager-5] [INFO] [1695819584.547954012] [lifecycle_manager_pathplanner]: Activating recoveries_server
[recoveries_server-3] [INFO] [1695819584.550521668] [recoveries_server]: Activating
[recoveries_server-3] [INFO] [1695819584.550560222] [recoveries_server]: Activating spin
[recoveries_server-3] [INFO] [1695819584.550584745] [recoveries_server]: Activating backup
[recoveries_server-3] [INFO] [1695819584.550599707] [recoveries_server]: Activating wait
[lifecycle_manager-5] [INFO] [1695819584.556497739] [lifecycle_manager_pathplanner]: Activating bt_navigator
[lifecycle_manager-5] [INFO] [1695819584.559320322] [lifecycle_manager_pathplanner]: Managed nodes are active
[bt_navigator-4] [INFO] [1695819584.557614291] [bt_navigator]: Activating
[bt_navigator-4] [INFO] [1695819711.067383936] [bt_navigator]: Begin navigating from current location to (0.87, -1.00)
[bt_navigator-4] [ERROR] [1695819711.112090088] [bt_navigator]: Actionserver failed while executing action callback: "send_goal failed"
[controller_server-1] [INFO] [1695819711.116510070] [controller_server]: Received a goal, begin computing control effort.
[bt_navigator-4] [WARN] [1695819711.116761738] [bt_navigator]: [navigate_to_pose] [ActionServer] Aborting handle.
[controller_server-1] [INFO] [1695819726.133269484] [controller_server]: Reached the goal!
Is this error nomal?
[bt_navigator-4] [ERROR] [1695819711.112090088] [bt_navigator]: Actionserver failed while executing action callback: “send_goal failed”
after the second one i get an error and nothing happens exept the path in rviz.
[bt_navigator-4] [INFO] [1695819825.259601650] [bt_navigator]: Begin navigating from current location to (-0.02, -1.05)
[ERROR] [bt_navigator-4]: process has died [pid 12065, exit code -11, cmd '/opt/ros/foxy/lib/nav2_bt_navigator/bt_navigator --ros-args -r __node:=bt_navigator --params-file /home/user/ros2_ws/install/project_path_planning/share/project_path_planning/config/bt_navigator.yaml'].
It doesn’t always do this because just after for example just launching again I was able to do it more than 15 times even if some time it doesn’t move and tells me it moved like the following
[bt_navigator-4] [INFO] [1695820341.180784958] [bt_navigator]: Begin navigating from current location to (-0.09, -1.06)
[bt_navigator-4] [INFO] [1695820341.252795107] [bt_navigator]: Navigation succeeded
after having the following error it stopped moving
[bt_navigator-4] [INFO] [1695820596.072455459] [bt_navigator]: Begin navigating from current location to (0.43, -1.15)
[bt_navigator-4] [ERROR] [1695820596.095409652] [bt_navigator]: Actionserver failed while executing action callback: "send_goal failed"
[bt_navigator-4] [WARN] [1695820596.159450482] [bt_navigator]: [navigate_to_pose] [ActionServer] Aborting handle.
[bt_navigator-4] [INFO] [1695820634.607902262] [bt_navigator]: Begin navigating from current location to (-0.20, -1.10)
[bt_navigator-4] [INFO] [1695820644.135158051] [bt_navigator]: Received goal preemption request
[bt_navigator-4] [INFO] [1695820644.135261802] [bt_navigator]: Begin navigating from current location to (-0.09, -1.09)
[bt_navigator-4] [INFO] [1695820652.614209121] [bt_navigator]: Received goal preemption request
[bt_navigator-4] [INFO] [1695820652.614307884] [bt_navigator]: Begin navigating from current location to (-0.20, -1.09)
[bt_navigator-4] [INFO] [1695820670.016338304] [bt_navigator]: Received goal preemption request
[bt_navigator-4] [INFO] [1695820670.016469814] [bt_navigator]: Begin navigating from current location to (-0.23, -1.12)
After CTRL-C I get that shows againg that there is a probleme with BT_navigator
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[lifecycle_manager-5] [INFO] [1695820834.870707846] [rclcpp]: signal_handler(signal_value=2)
[INFO] [planner_server-2]: process has finished cleanly [pid 14518]
[recoveries_server-3] [INFO] [1695820834.870758029] [rclcpp]: signal_handler(signal_value=2)
[controller_server-1] [INFO] [1695820834.870793874] [rclcpp]: signal_handler(signal_value=2)
[planner_server-2] [INFO] [1695820834.870813910] [rclcpp]: signal_handler(signal_value=2)
[bt_navigator-4] [INFO] [1695820834.874832189] [rclcpp]: signal_handler(signal_value=2)
[bt_navigator-4] [ERROR] [1695820834.877860412] [bt_navigator]: Actionserver failed while executing action callback: "Failed to create interrupt guard condition in Executor constructor: the given context is not valid, either rcl_init() was not called or rcl_shutdown() was called., at /tmp/binarydeb/ros-foxy-rcl-1.1.11/src/rcl/guard_condition.c:67"
[bt_navigator-4] [WARN] [1695820834.877875962] [bt_navigator]: [navigate_to_pose] [ActionServer] Aborting handle.
[bt_navigator-4] [INFO] [1695820834.879979693] [bt_navigator]: Destroying
[bt_navigator-4] terminate called after throwing an instance of 'rclcpp::exceptions::RCLError'
[bt_navigator-4] what(): Failed to create interrupt guard conditionin Executor constructor: the given context is not valid, either rcl_init() was not called or rcl_shutdown() was called., at /tmp/binarydeb/ros-foxy-rcl-1.1.11/src/rcl/guard_condition.c:67
[lifecycle_manager-5] [INFO] [1695820834.882125908] [lifecycle_manager_pathplanner]: Destroying
[bt_navigator-4] [PublisherZMQ] Server quitting.
[bt_navigator-4] [PublisherZMQ] just died. Exeption Context was terminated
[bt_navigator-4] [PublisherZMQ] Publisher quitting.
[bt_navigator-4] [PublisherZMQ] just died. Exeption Context was terminated
[INFO] [recoveries_server-3]: process has finished cleanly [pid 14520]
[INFO] [lifecycle_manager-5]: process has finished cleanly [pid 14525]
[INFO] [controller_server-1]: process has finished cleanly [pid 14516]
[ERROR] [bt_navigator-4]: process has died [pid 14522, exit code -6, cmd '/opt/ros/foxy/lib/nav2_bt_navigator/bt_navigator --ros-args -r __node:=bt_navigator --params-file /home/user/ros2_ws/install/project_path_planning/share/project_path_planning/config/bt_navigator.yaml'].
This time When I launch pathplanner again It doesn’t work
^C[WARNING] [launch]: user interrupted with ctrl-c (SIGINT)
[lifecycle_manager-5] [INFO] [1695820834.870707846] [rclcpp]: signal_handler(signal_value=2)
[INFO] [planner_server-2]: process has finished cleanly [pid 14518]
[recoveries_server-3] [INFO] [1695820834.870758029] [rclcpp]: signal_handler(signal_value=2)
[controller_server-1] [INFO] [1695820834.870793874] [rclcpp]: signal_handler(signal_value=2)
[planner_server-2] [INFO] [1695820834.870813910] [rclcpp]: signal_handler(signal_value=2)
[bt_navigator-4] [INFO] [1695820834.874832189] [rclcpp]: signal_handler(signal_value=2)
[bt_navigator-4] [ERROR] [1695820834.877860412] [bt_navigator]: Actionserver failed while executing action callback: "Failed to create interrupt guard condition in Executor constructor: the given context is not valid, either rcl_init() was not called or rcl_shutdown() was called., at /tmp/binarydeb/ros-foxy-rcl-1.1.11/src/rcl/guard_condition.c:67"
[bt_navigator-4] [WARN] [1695820834.877875962] [bt_navigator]: [navigate_to_pose] [ActionServer] Aborting handle.
[bt_navigator-4] [INFO] [1695820834.879979693] [bt_navigator]: Destroying
[bt_navigator-4] terminate called after throwing an instance of 'rclcpp::exceptions::RCLError'
[bt_navigator-4] what(): Failed to create interrupt guard conditionin Executor constructor: the given context is not valid, either rcl_init() was not called or rcl_shutdown() was called., at /tmp/binarydeb/ros-foxy-rcl-1.1.11/src/rcl/guard_condition.c:67
[lifecycle_manager-5] [INFO] [1695820834.882125908] [lifecycle_manager_pathplanner]: Destroying
[bt_navigator-4] [PublisherZMQ] Server quitting.
[bt_navigator-4] [PublisherZMQ] just died. Exeption Context was terminated
[bt_navigator-4] [PublisherZMQ] Publisher quitting.
[bt_navigator-4] [PublisherZMQ] just died. Exeption Context was terminated
[INFO] [recoveries_server-3]: process has finished cleanly [pid 14520]
[INFO] [lifecycle_manager-5]: process has finished cleanly [pid 14525]
[INFO] [controller_server-1]: process has finished cleanly [pid 14516]
[ERROR] [bt_navigator-4]: process has died [pid 14522, exit code -6, cmd '/opt/ros/foxy/lib/nav2_bt_navigator/bt_navigator --ros-args -r __node:=bt_navigator --params-file /home/user/ros2_ws/install/project_path_planning/share/project_path_planning/config/bt_navigator.yaml'].
relaunching the localization and then the path planner it restarts working like before.
It seems that my problems come frome the bt-navigator