ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
1

Nav2 missing Libary when changing namespace

asked 2022-04-16 07:36:24 -0500

isiko gravatar image

I'm trying to use the Nav2 Stack with my robot, and as everything else in my code uses the /robot namespace, I'd like Nav2 to also do so. I've tried this via two ways: First, I used GroupActions, and now I discovered that they also seem to have a launch parameter for that (here), so I tried that. Both methods gave me the same error:

[bt_navigator-4] [INFO] [1650111718.166634112] [bt_navigator]: Configuring
[bt_navigator-4] [ERROR] [1650111718.419839279] []: Caught exception in callback for transition 10
[bt_navigator-4] [ERROR] [1650111718.420100268] []: Original error: Could not load library: libnav2_change_goal_node_bt_node.so: cannot open shared object file: No such file or directory
[bt_navigator-4] [WARN] [1650111718.420154572] []: Error occurred while doing error handling.
[bt_navigator-4] [FATAL] [1650111718.420166294] [bt_navigator]: Lifecycle node bt_navigator does not have error state implemented
[lifecycle_manager-6] [ERROR] [1650111718.426122540] [lifecycle_manager_navigation]: Failed to change state for node: bt_navigator
[lifecycle_manager-6] [ERROR] [1650111718.426223914] [lifecycle_manager_navigation]: Failed to bring up all requested nodes. Aborting bringup.

I can't find the library listed under the Plugins section of the BT_Navigator in my config file, also I had to comment some Libarys out, as they also weren't found by the navigator, If you have a tip on that, that would also be helpfull:

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
    enable_groot_monitoring: True
    groot_zmq_publisher_port: 1666
    groot_zmq_server_port: 1667
    default_bt_xml_filename:          /field_robot/dev_ws/src/field_robot/config/nav2_bt_config.xml
    default_nav_to_pose_bt_xml:       /field_robot/dev_ws/src/field_robot/config/nav2_bt_config.xml
    default_nav_through_poses_bt_xml: /field_robot/dev_ws/src/field_robot/config/nav2_bt_config.xml
    # 'default_nav_through_poses_bt_xml' and 'default_nav_to_pose_bt_xml' are use defaults:
    # nav2_bt_navigator/navigate_to_pose_w_replanning_and_recovery.xml
    # nav2_bt_navigator/navigate_through_poses_w_replanning_and_recovery.xml
    # They can be set here or via a RewrittenYaml remap from a parent launch file to Nav2.
    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
    # - nav2_planner_selector_bt_node
    # - nav2_controller_selector_bt_node
    # - nav2_goal_checker_selector_bt_node
edit retag flag offensive close merge delete

Comments

I think this is a relevant similar question with comments and an answer: https://answers.ros.org/question/3440...

ljaniec gravatar image ljaniec  ( 2022-04-19 08:12:08 -0500 )edit

It seems like a similar Problem, but sadly the suggested solution (adding the list of plugins in the parameters) doesn't seem to work :/

isiko gravatar image isiko  ( 2022-04-19 11:05:58 -0500 )edit

1 Answer

Sort by » oldest newest most voted
0

answered 2022-07-29 04:24:49 -0500

yyf202xz gravatar image

I had a same problem and solved it by change the bt_navigator:session inside the .yaml param file.

my old version:

bt_navigator:
  ros__parameters:
    use_sim_time: False
    bt_xml_filename: "navigate_w_replanning_and_recovery.xml"

new version:

bt_navigator:
  ros__parameters:
    use_sim_time: True
    global_frame: map
    robot_base_frame: base_link
    odom_topic: /odom
    enable_groot_monitoring: True
    groot_zmq_publisher_port: 1666
    groot_zmq_server_port: 1667
    default_bt_xml_filename: "navigate_w_replanning_and_recovery.xml"
    plugin_lib_names:
    - 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_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

BTW it's a shame that I solved it but don't konw why. Don't even remember where did I get this list...

edit flag offensive delete link more

Comments

I got this exact list from the nav2 apt package, but sadly it still does not work

Zeckurbo gravatar image Zeckurbo  ( 2022-08-24 04:51:04 -0500 )edit

Same problem for me. Without namespace that worked perfect. But bt_navigator was always looking for libnav2_change_goal_node_bt_node after adding namespace. There is no such library in my param file and in source of bt_navigator. sad :(

xxing gravatar image xxing  ( 2022-08-25 05:02:40 -0500 )edit

I tried to put nav2 into a namespace in a launch file

start_nav2 = GroupAction([
        PushRosNamespace(
            namespace=namespace),
        IncludeLaunchDescription(
            PythonLaunchDescriptionSource(os.path.join(s_nav2_path, 'launch', 'navigation_launch.py')),
            launch_arguments={
                'use_sim_time': use_sim_time,
                'namespace': namespace,
                'params_file': params_file,
                'default_bt_xml_filename': default_bt_xml_filename,
            }.items()
        )
    ])

and it seemed to do so, but now it does not find any input data nay more and I dont know what I have to remap/change to make it work :/ (I tried to make use of the nav2 bringup_launch.py, because they give the params yaml explicitly, and then the error seems to be gone...) I also searched for a long time, but there seem to be no real tutorials.

Zeckurbo gravatar image Zeckurbo  ( 2022-08-30 03:21:56 -0500 )edit

I found a solution to this issue. I compiled the workspace after downloading the nav2 package into it. There will be errors that the plugin does not exist during compilation. I removed these plugins from the bt_navigator.cpp code and it worked fine.

xxing gravatar image xxing  ( 2022-08-31 07:14:43 -0500 )edit

Question Tools

1 follower

Stats

Asked: 2022-04-16 07:36:24 -0500

Seen: 471 times

Last updated: Jul 29 '22