MROS-RobMoSys-ITP / Pilot-URJC

7 stars 4 forks source link

Error loading library `nav2_compute_path_to_pose_action_bt_node` #24

Closed marioney closed 4 years ago

marioney commented 4 years ago

When trying to launching the pilot using simulated tb3 I get this error.

[lifecycle_manager-11] [INFO] [lifecycle_manager]: Configuring bt_navigator
[bt_modes_navigator-8] [INFO] [bt_navigator]: Configuring
[amcl-3] [INFO] [amcl]: createLaserObject
[planner_server-6] [WARN] [rcl_lifecycle]: No transition matching 1 found for current state inactive
[planner_server-6] [ERROR] []: Unable to start transition 1 from current state inactive: Transition is not registered., at /tmp/binarydeb/ros-eloquent-rcl-lifecycle-0.8.4/src/rcl_lifecycle.c:327
[lifecycle_manager-10] [INFO] [lifecycle_manager_navigation]: Configuring recoveries_server
[recoveries_server-7] [WARN] [rcl_lifecycle]: No transition matching 1 found for current state inactive
[recoveries_server-7] [ERROR] []: Unable to start transition 1 from current state inactive: Transition is not registered., at /tmp/binarydeb/ros-eloquent-rcl-lifecycle-0.8.4/src/rcl_lifecycle.c:327
[lifecycle_manager-10] [INFO] [lifecycle_manager_navigation]: Configuring bt_navigator
[bt_modes_navigator-8] [ERROR] []: Caught exception in callback for transition 10
[bt_modes_navigator-8] [ERROR] []: Original error: Could not load library: /home/mario/ros/eloquent_ws/install/nav2_behavior_tree/lib/libnav2_compute_path_to_pose_action_bt_node.so: undefined symbol: _ZN2BT8PortInfo14setDescriptionEN6nonstd7sv_lite17basic_string_viewIcSt11char_traitsIcEEE
[bt_modes_navigator-8] [WARN] []: Error occurred while doing error handling.
[bt_modes_navigator-8] [FATAL] [bt_navigator]: Lifecycle node entered error state
[bt_modes_navigator-8] [INFO] [bt_navigator]: Configuring
[bt_modes_navigator-8] [WARN] [rcl.logging_rosout]: Publisher already registered for provided node name. If this is due to multiple nodes with the same name then all logs for that logger name will go out over the existing publisher. As soon as any node with that name is destructed it will unregister the publisher, preventing any further logs for that name from being published on the rosout topic.
[bt_modes_navigator-8] [ERROR] []: Caught exception in callback for transition 10
[bt_modes_navigator-8] [ERROR] []: Original error: Could not load library: /home/mario/ros/eloquent_ws/install/nav2_behavior_tree/lib/libnav2_compute_path_to_pose_action_bt_node.so: undefined symbol: _ZN2BT8PortInfo14setDescriptionEN6nonstd7sv_lite17basic_string_viewIcSt11char_traitsIcEEE
[bt_modes_navigator-8] [WARN] []: Error occurred while doing error handling.
[bt_modes_navigator-8] [FATAL] [bt_navigator]: Lifecycle node entered error state
[lifecycle_manager-11] [ERROR] [lifecycle_manager]: Failed to change state for node: bt_navigator
[lifecycle_manager-11] [ERROR] [lifecycle_manager]: Failed to bring up nodes: aborting bringup
[lifecycle_manager-10] [ERROR] [lifecycle_manager_navigation]: Failed to change state for node: bt_navigator
[lifecycle_manager-10] [ERROR] [lifecycle_manager_navigation]: Failed to bring up nodes: aborting bringup

The map is loaded in gazebo, and I can set the initial position, but if I send a goal I get an error message:

[rviz2-1] [ERROR] [_]: Goal was rejected by server

I've created a branch mario-tests and I'm working with the pilot-urjc branch of the the mros navigation2 and the 0ab3895 version of the BehaviorTree.CPP

Steps to reproduce:

  1. Clone the mario-tests branch and all the repositories.
  2. ros2 launch turtlebot3_gazebo turtlebot3_world.launch.py
  3. ros2 launch pilot_urjc_bringup nav2_turtlebot3_launch.py
marioney commented 4 years ago

SOLVED:

The issue was in order to compile nav2 it is required to compile its dependencies on a separate ws. (See https://navigation.ros.org/build_instructions/index.html#build) In this case only the BehaviorTree.CPP is needed on that ws.

I've created different .repos files and updated the instructions on https://github.com/MROS-RobMoSys-ITP/Pilot-URJC/commit/cfa69cfd658387a93ad4da2a74d57ba118e1d484

After creating two separate ws it builds and runs OK.