小鱼 ROS 2 新书上线!点击链接查看, 新书配套视频点击链接查看。
提问前必看的发帖注意事项—— 提问前必看!不符合要求的问题拒绝回答!!
社区使用指南—如何添加标签修改密码
NAV2 设置单导航点失败,小车不移动
-
版本为20 foxy
使用 bringup 里的文件修改 ,加载地图后 ,设置 单导航点时 报错, 错误为:
[bt_navigator-7] [INFO] [1668857731.744059850] [bt_navigator]: Begin navigating from current location to (0.84, 1.21)
[bt_navigator-7] [ERROR] [1668857731.744219084] [bt_navigator]: Action server failed while executing action callback: "One of the children of a DecoratorNode or ControlNode is nullptr"
[bt_navigator-7] [WARN] [1668857731.744248940] [bt_navigator]: [navigate_to_pose] [ActionServer] Aborting handle.我看 Wiki 里面有人与我的问题一致,似乎它是通过修改 plugin_lib_names 来解决的 ,但是我不知道我这是缺少啥。
还有一点很奇怪,就是在加载地图时,我必须先打开 rviz2 ,设置好 map和 订阅话题,最后打开 导航包,这样才能 加载地图,否则无法加载地图。截图如下:
望各位大佬指点 -
-
@1157354382 ```
- 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
这是我的 plugin_lib_names
- nav2_compute_path_to_pose_action_bt_node
-
@1157354382 第一个问题估计是没加载上控制器,可能是参数配置的问题,这个需要进一步查找,最好把相关的都贴上。
第二个是qos问题,这个你打开后修改下qos可以解决。 -
@小鱼 非常感谢鱼总的解答。因为我是用的是 bringup 里的文件改写的,注意到官方里是使用 default_bt_xml_filename 来加载默认行为树,但是在 nav2 的文档里是使用 default_nav_to_pose_bt_xml 来加载。我查阅到似乎 default_bt_xml_filename 是 foxy 版本的加载方式。但是当我修改后,本来能正常运行的导航包 反而报错 ,这就很头大。报错内容为:
[bt_navigator-7] [INFO] [1669033140.299276707] [bt_navigator]: Configuring [bt_navigator-7] [bt_navigator-7] >>> [rcutils|error_handling.c:108] rcutils_set_error_state() [bt_navigator-7] This error state is being overwritten: [bt_navigator-7] [bt_navigator-7] 'invalid empty action name, at /tmp/binarydeb/ros-foxy-rcl-action-1.1.13/src/rcl_action/names.c:36' [bt_navigator-7] [bt_navigator-7] with this new error message: [bt_navigator-7] [bt_navigator-7] 'failed to get goal service name, at /tmp/binarydeb/ros-foxy-rcl-action-1.1.13/src/rcl_action/action_client.c:215' [bt_navigator-7] [bt_navigator-7] rcutils_reset_error() should be called after error handling to avoid this. [bt_navigator-7] <<< [bt_navigator-7] [ERROR] [1669033140.356554832] [bt_navigator_rclcpp_node.rclcpp_action]: Error in destruction of rcl action client handle: action client implementation is invalid, at /tmp/binarydeb/ros-foxy-rcl-action-1.1.13/src/rcl_action/action_client.c:470 [ERROR] [bt_navigator-7]: process has died [pid 6177, exit code -11, cmd '/opt/ros/foxy/lib/nav2_bt_navigator/bt_navigator --ros-args -r __node:=bt_navigator -r __node:=bt_navigator --params-file /tmp/tmpxsdf_anw -r /tf:=tf -r /tf_static:=tf_static'].
还望鱼总多多指教
-
@1157354382 另附上我的 bt_navigator
bt_navigator: ros__parameters: use_sim_time: false global_frame: map robot_base_frame: base_footprint odom_topic: /odom enable_groot_monitoring: True groot_zmq_publisher_port: 1666 groot_zmq_server_port: 1667 default_bt_xml_filename: "/home/zr/catkin_ws/src/wheeltec_robot_nav/param/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 - nav2_is_battery_low_condition_bt_node - nav2_navigate_to_pose_action_bt_node
-
@小鱼 你好 修改qos能说的具体些吗 打开那个文件修改qos 我在nav2的导航过程中也遇到了相同的问题(单点导航失败,小车不移动,但能够生成全局路径规划)
-
@1359092229 具体发个帖子,放下日志看看
-
@1157354382 哥,问下您这两个问题解决了吗,我也是相同的问题