ros-navigation / navigation2

ROS 2 Navigation Framework and System
https://nav2.org/
Other
2.58k stars 1.3k forks source link

Error while developing robot footprint using ros2 nav2 #3061

Closed rafism1997 closed 2 years ago

rafism1997 commented 2 years ago

Bug report

Required Info:

Steps to reproduce issue

Expected behavior

The robot footprint should be available after deploying the parameters file

ERROR

[INFO] [launch]: All log files can be found below /home/ubuntu/.ros/log/2022-07-06-06-22-54-564770-63384ab5841b-3672 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [controller_server-1]: process started with pid [3676] [INFO] [planner_server-2]: process started with pid [3678] [INFO] [recoveries_server-3]: process started with pid [3680] [INFO] [bt_navigator-4]: process started with pid [3682] [INFO] [waypoint_follower-5]: process started with pid [3684] [INFO] [lifecycle_manager-6]: process started with pid [3686] [waypoint_follower-5] [INFO] [1657088574.921531558] [waypoint_follower]: [waypoint_follower-5] waypoint_follower lifecycle node launched. [waypoint_follower-5] Waiting on external lifecycle transitions to activate [waypoint_follower-5] See https://design.ros2.org/articles/node_lifecycle.html for more information.

[bt_navigator-4] [INFO] [1657088574.931056279] [bt_navigator]:

[bt_navigator-4] bt_navigator lifecycle node launched. [bt_navigator-4] Waiting on external lifecycle transitions to activate [controller_server-1] [INFO] [1657088574.932477012] [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. [bt_navigator-4] See https://design.ros2.org/articles/node_lifecycle.html for more information.

[controller_server-1] [INFO] [1657088574.934428753] [controller_server]: Creating controller server [recoveries_server-3] [INFO] [1657088574.935132150] [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] [1657088574.940171519] [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.

[lifecycle_manager-6] [INFO] [1657088574.944718922] [lifecycle_manager_navigation]: Creating and initializing lifecycle service clients [lifecycle_manager-6] [INFO] [1657088574.953852855] [lifecycle_manager_navigation]: Starting managed nodes bringup... [lifecycle_manager-6] [INFO] [1657088574.953895873] [lifecycle_manager_navigation]: Configuring controller_server [controller_server-1] [INFO] [1657088574.954774714] [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] [1657088574.955069254] [local_costmap.local_costmap]: Creating Costmap [planner_server-2] [INFO] [1657088574.961793289] [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] [1657088574.962117442] [global_costmap.global_costmap]: Creating Costmap [controller_server-1] [INFO] [1657088574.962561518] [controller_server]: Configuring controller interface [controller_server-1] [INFO] [1657088574.962617566] [controller_server]: Controller frequency set to 20.0000Hz

[controller_server-1] [INFO] [1657088574.966076726] [local_costmap.local_costmap]: Using plugin "voxel_layer" [controller_server-1] [INFO] [1657088574.969000372] [local_costmap.local_costmap]: Subscribed to Topics: scan [controller_server-1] [INFO] [1657088574.973750799] [local_costmap.local_costmap]: Initialized plugin "voxel_layer" [controller_server-1] [INFO] [1657088574.973828423] [local_costmap.local_costmap]: Using plugin "inflation_layer" [controller_server-1] [INFO] [1657088574.975184306] [local_costmap.local_costmap]: Initialized plugin "inflation_layer" [controller_server-1] [INFO] [1657088574.980323837] [controller_server]: Created progress_checker : progress_checker of type nav2_controller::SimpleProgressChecker [controller_server-1] [INFO] [1657088574.980620708] [controller_server]: Created goal_checker : goal_checker of type nav2_controller::SimpleGoalChecker [controller_server-1] [INFO] [1657088574.981910448] [controller_server]: Created controller : FollowPath of type dwb_core::DWBLocalPlanner [controller_server-1] [INFO] [1657088574.983559660] [controller_server]: Setting transform_tolerance to 0.200000 [controller_server-1] [INFO] [1657088574.997864831] [controller_server]: Using critic "RotateToGoal" (dwb_critics::RotateToGoalCritic) [controller_server-1] [INFO] [1657088574.997987005] [controller_server]: Critic plugin initialized [controller_server-1] [INFO] [1657088574.998021164] [controller_server]: Using critic "Oscillation" (dwb_critics::OscillationCritic) [controller_server-1] [INFO] [1657088574.998344492] [controller_server]: Critic plugin initialized [controller_server-1] [INFO] [1657088574.998811857] [controller_server]: Using critic "BaseObstacle" (dwb_critics::BaseObstacleCritic) [controller_server-1] [INFO] [1657088574.999071054] [controller_server]: Critic plugin initialized [controller_server-1] [INFO] [1657088574.999107142] [controller_server]: Using critic "GoalAlign" (dwb_critics::GoalAlignCritic) [controller_server-1] [INFO] [1657088574.999189090] [controller_server]: Critic plugin initialized [controller_server-1] [INFO] [1657088574.999212712] [controller_server]: Using critic "PathAlign" (dwb_critics::PathAlignCritic) [controller_server-1] [INFO] [1657088574.999261374] [controller_server]: Critic plugin initialized [controller_server-1] [INFO] [1657088574.999279646] [controller_server]: Using critic "PathDist" (dwb_critics::PathDistCritic) [controller_server-1] [INFO] [1657088574.999316107] [controller_server]: Critic plugin initialized [controller_server-1] [INFO] [1657088574.999329611] [controller_server]: Using critic "GoalDist" (dwb_critics::GoalDistCritic) [controller_server-1] [INFO] [1657088574.999358272] [controller_server]: Critic plugin initialized [controller_server-1] [INFO] [1657088574.999363853] [controller_server]: Controller Server has FollowPath controllers available. [lifecycle_manager-6] [INFO] [1657088575.005078608] [lifecycle_manager_navigation]: Configuring planner_server

[planner_server-2] [INFO] [1657088575.009299575] [global_costmap.global_costmap]: Using plugin "static_layer" [planner_server-2] [INFO] [1657088575.012224527] [global_costmap.global_costmap]: Subscribing to the map topic (/map) with volatile durability [planner_server-2] [INFO] [1657088575.013000143] [global_costmap.global_costmap]: Initialized plugin "static_layer" [planner_server-2] [INFO] [1657088575.013031870] [global_costmap.global_costmap]: Using plugin "obstacle_layer" [planner_server-2] [INFO] [1657088575.013740528] [global_costmap.global_costmap]: Subscribed to Topics: scan [planner_server-2] [INFO] [1657088575.015719501] [global_costmap.global_costmap]: Initialized plugin "obstacle_layer" [planner_server-2] [INFO] [1657088575.015757638] [global_costmap.global_costmap]: Using plugin "inflation_layer" [planner_server-2] [INFO] [1657088575.016438735] [global_costmap.global_costmap]: Initialized plugin "inflation_layer" [planner_server-2] [INFO] [1657088575.022993121] [planner_server]: Created global planner plugin GridBased of type nav2_navfn_planner/NavfnPlanner [planner_server-2] [INFO] [1657088575.023044827] [planner_server]: Configuring plugin GridBased of type NavfnPlanner [planner_server-2] [INFO] [1657088575.029137939] [planner_server]: Planner Server has GridBased planners available. [lifecycle_manager-6] [INFO] [1657088575.034251453] [lifecycle_manager_navigation]: Configuring recoveries_server

[recoveries_server-3] [INFO] [1657088575.038113719] [recoveries_server]: Creating recovery plugin spin of type nav2_recoveries/Spin [recoveries_server-3] [INFO] [1657088575.038955923] [recoveries_server]: Configuring spin [recoveries_server-3] [INFO] [1657088575.042458830] [recoveries_server]: Creating recovery plugin backup of type nav2_recoveries/BackUp [recoveries_server-3] [INFO] [1657088575.043366305] [recoveries_server]: Configuring backup [recoveries_server-3] [INFO] [1657088575.046657172] [recoveries_server]: Creating recovery plugin wait of type nav2_recoveries/Wait [recoveries_server-3] [INFO] [1657088575.047252438] [recoveries_server]: Configuring wait [lifecycle_manager-6] [INFO] [1657088575.050751073] [lifecycle_manager_navigation]: Configuring bt_navigator

[bt_navigator-4] [ERROR] [1657088575.065807326] []: Caught exception in callback for transition 10 [bt_navigator-4] [ERROR] [1657088575.065840103] []: Original error: Could not load library: libnav2_compute_path_through_poses_action_bt_node.so: cannot open shared object file: No such file or directory [bt_navigator-4] [WARN] [1657088575.065858199] []: Error occurred while doing error handling. [bt_navigator-4] [FATAL] [1657088575.065863808] [bt_navigator]: Lifecycle node bt_navigator does not have error state implemented [lifecycle_manager-6] [ERROR] [1657088575.066362202] [lifecycle_manager_navigation]: Failed to change state for node: bt_navigator [lifecycle_manager-6] [ERROR] [1657088575.066391545] [lifecycle_manager_navigation]: Failed to bring up all requested nodes. Aborting bringup. [WARNING] [launch]: user interrupted with ctrl-c (SIGINT)

[INFO] [recoveries_server-3]: process has finished cleanly [pid 3680]

[INFO] [controller_server-1]: process has finished cleanly [pid 3676]

[INFO] [planner_server-2]: process has finished cleanly [pid 3678] [INFO] [waypoint_follower-5]: process has finished cleanly [pid 3684] [INFO] [lifecycle_manager-6]: process has finished cleanly [pid 3686] [INFO] [bt_navigator-4]: process has finished cleanly [pid 3682]

@dheena2k2

padhupradheep commented 2 years ago

Original error: Could not load library: libnav2_compute_path_through_poses_action_bt_node.so: cannot open shared object file: No such file or directory

This is the error actually!

I guess, this is a configuration issue, that needs to be posted on ROS Answers.

rafism1997 commented 2 years ago

Thanks @padhupradheep for replying quickly. Can you please guide me with how we can setup the plugin files.

Ya is there any issue with the params file?...

SteveMacenski commented 2 years ago

Start with the yaml file in the foxy branch, not the main branch. There are dozens of new things that are not available in Foxy in Main. Your main issue is that its looking for things in modern Nav2 that dont exist in Foxy

rafism1997 commented 2 years ago

Thanks @SteveMacenski , but I have done the binary installation for the bringup and navigation package. Also, we tried cloning the repo from the foxy-devel branch, but the error still persists.

padhupradheep commented 2 years ago

did you follow the steps shown here https://navigation.ros.org/getting_started/index.html ? and also used TB3 simulation as explained in the same page?

rafism1997 commented 2 years ago

@padhupradheep , we have developed a custom robot package by following this official link of ros2 nav2 :

https://navigation.ros.org/setup_guides/footprint/setup_footprint.html

Please do reopen the issue @SteveMacenski . We still have not figured what the problem is.

rafism1997 commented 2 years ago

@dheena2k2 , please see this issue for reference

padhupradheep commented 2 years ago

custom robot package by following this official link of ros2 nav2 :

could you maybe post the yaml ?

As Steve said, a lot of things has changed since foxy that also includes the documentation.

SteveMacenski commented 2 years ago

That cannot be true, because compute path through poses does not exist in https://github.com/ros-planning/navigation2/blob/foxy-devel/nav2_bt_navigator/src/bt_navigator.cpp#L41 or https://github.com/ros-planning/navigation2/blob/foxy-devel/nav2_bringup/bringup/params/nav2_params.yaml#L60. You've taken a parameter file or building Nav2 from a non-Foxy source that contains advanced features from more recent distributions.

Its been about a year since we've done a Foxy sync so I don't see how it is possible that you build from binaries, using the Foxy provided configuration files as a base, and got the error you report. I think you've taken main, Galactic, or Humble branch parameters, at the very least.

This error has nothing to do with footprints, please start from the base getting started example and I'm sure you'll find it works and you can see where your configuration errors have occurred. I think you'll quickly see what I mean.

rafism1997 commented 2 years ago

Hi @SteveMacenski , I understand that this problem has nothing to do with footprints. Once we completed implementing the slam-toolbox functionality and after setting up the sensors, we moved on to develop the robot footprint where we added the yaml file .

@padhupradheep , the yaml file that we used is this : https://github.com/ros-planning/navigation2_tutorials/blob/master/sam_bot_description/config/nav2_params.yaml .

rafism1997 commented 2 years ago

We even tried with the official sam-bot description which was having the same issues (when we added a custom navigation parameter file).

padhupradheep commented 2 years ago

https://github.com/ros-planning/navigation2/blob/foxy-devel/nav2_bringup/bringup/params/nav2_params.yaml

please see these params from the foxy-devel and adjust it to your needs!

dheena2k2 commented 2 years ago

We get the same error after using the parameter files from https://github.com/ros-planning/navigation2/blob/foxy-devel/nav2_bringup/bringup/params/nav2_params.yaml

Original error: Could not load library: libnav2_compute_path_through_poses_action_bt_node.so: cannot open shared object file: No such file or directory

As the error shows, I noticed that the library libnav2_compute_path_through_poses_action_bt_node.so is the exact same as mentioned in the https://github.com/ros-planning/navigation2/blob/foxy-devel/nav2_bringup/bringup/params/nav2_params.yaml#L61, nav2_compute_path_to_pose_action_bt_node just with a prefix lib.

padhupradheep commented 2 years ago

libnav2_compute_path_through_poses_action_bt_node

This bt node is not included in the https://github.com/ros-planning/navigation2/blob/60043d4067b9dbff73be65291f5df6aaa286cc61/nav2_bringup/bringup/params/nav2_params.yaml#L60

Are you sure that you are updating the params in the right yaml file ?

Note that, you need to rebuild your packages after changing the yaml files, if you have not used colcon build --symlink-install for building it.

Also please see that, nav2_compute_path_through_poses_action_bt_node is different than that of the nav2_compute_path_to_poses_action_bt_node

dheena2k2 commented 2 years ago

Yes, the error was with the yaml file. The file provided in the official ROS2 navigation 2 tutorial, https://github.com/ros-planning/navigation2_tutorials/blob/master/sam_bot_description/config/nav2_params.yaml, is old until this date. Using the yaml file from https://github.com/ros-planning/navigation2/blob/foxy-devel/nav2_bringup/bringup/params/nav2_params.yaml and editing it to suit our needs resolved the error.