ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

nav2_bt_navigator exception in callback

asked 2020-02-13 09:33:20 -0500

lorenzo gravatar image

I'm trying to run bt_navigator but it is searching for a library that does not exist:

lorenzoteo@lorenzoteo-HP-ZBook-15v-G5:~$ ros2 run nav2_bt_navigator bt_navigator bt_navigator.xml
[INFO] [bt_navigator]: Creating
[INFO] [bt_navigator]: Configuring
[ERROR] []: Caught exception in callback for transition 10
[ERROR] []: Original error: Could not load library: cannot open shared object file: No such file or directory
[WARN] []: Error occurred while doing error handling.
[FATAL] [bt_navigator]: Lifecycle node entered error state
[WARN] [rcl_lifecycle]: No transition matching 3 found for current state unconfigured
[ERROR] []: Unable to start transition 3 from current state unconfigured: Transition is not registered., at /tmp/binarydeb/ros-eloquent-rcl-lifecycle-0.8.4/src/rcl_lifecycle.c:327

The node is triggered by:

lorenzoteo@lorenzoteo-HP-ZBook-15v-G5:~$ ros2 run nav2_util lifecycle_bringup bt_navigator

Both ROS2 and navigation2 are installed via debian packages.

edit retag flag offensive close merge delete


That library doesn't exist anymore. It has been replaced by a number of other libraries - one per node. I expect you have a mismatch between the version of the nav2_bt_navigator and the version of the nav2_behavior_tree package.

Can you provide the versions of the nav2 packages you have installed and your LD_LIBRARY_PATH?

For the versions, provide the output of:

dpkg -l | grep nav2

And for LD_LIBRARY_PATH, just


Carl D gravatar image Carl D  ( 2020-02-13 11:13:10 -0500 )edit


lorenzoteo@lorenzoteo-HP-ZBook-15v-G5:~$ dpkg -l | grep nav2
ii  ros-eloquent-nav2-bt-navigator                      0.3.2-1bionic.20200121.234559                   amd64        TODO


lorenzoteo@lorenzoteo-HP-ZBook-15v-G5:~$ echo $LD_LIBRARY_PATH
lorenzo gravatar image lorenzo  ( 2020-02-14 01:45:55 -0500 )edit

The library in the error message ( hasn't existed for a while. It shouldn't be possible to get that error message. Is it possible an older version of bt_navigator is actually running? After you run

> ros2 run nav2_bt_navigator bt_navigator bt_navigator.xml


> ps | grep bt_navigator

This should show the path to the executable. It should be somewhere under /opt/ros/eloquent.

Carl D gravatar image Carl D  ( 2020-02-14 03:27:23 -0500 )edit

Here the running processes:

lorenzoteo@lorenzoteo-HP-ZBook-15v-G5:~$ ps aux | grep bt_navigator
lorenzo+ 24228  0.1  0.3 278148 61364 pts/1    S+   10:51   0:00 /usr/bin/python3 /opt/ros/eloquent/bin/ros2 run nav2_bt_navigator bt_navigator bt_navigator.xml
lorenzo+ 24233  5.7  0.1 984248 24068 pts/1    Sl+  10:51   0:14 /opt/ros/eloquent/lib/nav2_bt_navigator/bt_navigator bt_navigator.xml
lorenzo+ 24765  0.0  0.0  22132  1000 pts/0    S+   10:55   0:00 grep --color=auto bt_navigator
lorenzo gravatar image lorenzo  ( 2020-02-14 03:57:16 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2020-02-14 03:50:50 -0500

Carl D gravatar image

updated 2020-02-14 10:26:23 -0500

I just remembered where I'd seen this before.

I think your problem is you aren't providing the plugin names as a parameter to bt_navigator. You need to set the plugin_lib_names parameter as is done here:

The simplest way to get this to work is to create a file (/tmp/bt_parms.yaml) that contains:

    bt_xml_filename: "navigate_w_replanning_and_recovery.xml"
    - nav2_compute_path_to_pose_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_initial_pose_received_condition_bt_node
    - nav2_reinitialize_global_localization_service_bt_node
    - nav2_rate_controller_bt_node
    - nav2_recovery_node_bt_node
    - nav2_pipeline_sequence_bt_node
    - nav2_round_robin_node_bt_node

And then run:

> ros2 run nav2_bt_navigator bt_navigator --ros-args --params-file /tmp/bt_params.yaml

I filed an issue against nav2 because this is pretty unwieldy for your use case, IMHO. The issue is

edit flag offensive delete link more



I followed exactly the instructions, but I got the same error.


ros2 run nav2_bt_navigator bt_navigator --ros-args --params-file /tmp/bt_params.yaml

It works.

lorenzo gravatar image lorenzo  ( 2020-02-14 05:40:17 -0500 )edit

Thanks. I fixed the command line above.

When you say "It works" do you mean your problem is solved now?

Carl D gravatar image Carl D  ( 2020-02-14 10:29:46 -0500 )edit

Yes Carl! With this command and configuration runs correctly.

lorenzo gravatar image lorenzo  ( 2020-02-17 02:00:07 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2020-02-13 09:33:20 -0500

Seen: 2,095 times

Last updated: Feb 14 '20