鱼香ROS社区
    • 版块
    • 最新
    • 未解决
    • 已解决
    • 群组
    • 注册
    • 登录
    紧急通知:禁止一切关于政治&VPN翻墙等话题,发现相关帖子会立马删除封号
    提问前必看的发帖注意事项: 社区问答规则(小鱼个人)更新 | 高质量帖子发布指南

    机器人在单点导航时不规划路径

    已定时 已固定 已锁定 已移动
    Nav2
    nav2 导航 ros2
    3
    13
    579
    正在加载更多帖子
    • 从旧到新
    • 从新到旧
    • 最多赞同
    回复
    • 在新帖中回复
    登录后回复
    此主题已被删除。只有拥有主题管理权限的用户可以查看。
    • 1
      1814638019
      最后由 编辑

      背景(可选):

      ubuntu22.04 ros2humble nav2 里程计使用laser_scan_matcher
      实现小车导航,用的是小鱼教程里面的nav2。
      tf树frames.png

      在navigation2.launch.py中的代码如下

            import os
              import launch
              import launch_ros
              from ament_index_python.packages import get_package_share_directory
              from launch.launch_description_sources import PythonLaunchDescriptionSource
              
              
              def generate_launch_description():
                  # 获取与拼接默认路径
                  fishbot_navigation2_dir = get_package_share_directory(
                      'fishbot_navigation2')
                  nav2_bringup_dir = get_package_share_directory('nav2_bringup')
                  rviz_config_dir = os.path.join(
                      nav2_bringup_dir, 'rviz', 'nav2_default_view.rviz')
                  
                  # 创建 Launch 配置
                  use_sim_time = launch.substitutions.LaunchConfiguration(
                      'use_sim_time', default='false')
                  map_yaml_path = launch.substitutions.LaunchConfiguration(
                      'map', default=os.path.join(fishbot_navigation2_dir, 'maps', 'imu_map.yaml'))
                  nav2_param_path = launch.substitutions.LaunchConfiguration(
                      'params_file', default=os.path.join(fishbot_navigation2_dir, 'param', 'fishbot_nav2.yaml'))
              
                  return launch.LaunchDescription(
                      [
                      # 声明新的 Launch 参数
                      launch.actions.DeclareLaunchArgument('use_sim_time', default_value=use_sim_time,
                                                           description='Use simulation (Gazebo) clock if true'),
                      launch.actions.DeclareLaunchArgument('map', default_value=map_yaml_path,
                                                           description='Full path to map file to load'),
                      launch.actions.DeclareLaunchArgument('params_file', default_value=nav2_param_path,
                                                           description='Full path to param file to load'),
              
                      launch.actions.IncludeLaunchDescription(
                          PythonLaunchDescriptionSource(
                              [nav2_bringup_dir, '/launch', '/bringup_launch.py']),
                          # 使用 Launch 参数替换原有参数
                          launch_arguments={
                              'map': map_yaml_path,
                              'use_sim_time': use_sim_time,
                              'params_file': nav2_param_path}.items(),
                      ),
                      launch_ros.actions.Node(
                          package='rviz2',
                          executable='rviz2',
                          name='rviz2',
                          arguments=['-d', rviz_config_dir],
                          parameters=[{'use_sim_time': use_sim_time}],
                          output='screen'),
                      launch_ros.actions.Node(
                      package='nav2_map_server',
                      executable='map_server',
                      name='map_server',
                      output='screen',
                      parameters=[{'use_sim_time': False}, 
                                  {'yaml_filename':map_yaml_path}],
                  ),
                      launch_ros.actions.Node(
                      package='nav2_lifecycle_manager',
                      executable='lifecycle_manager',
                      name='lifecycle_manager_mapper',
                      output='screen',
                      parameters=[{'use_sim_time': False},
                                  {'autostart': True},
                                  {'node_names': ['map_server']}],  
                  ),
                 
              launch_ros.actions.Node(
                      package='nav2_amcl',
                      executable='amcl',
                      name='amcl',
                      output='screen',
                     
                  ),
              # 生命循环节点也同样需要启动
              launch_ros.actions.Node(
                      package='nav2_lifecycle_manager',
                      executable='lifecycle_manager',
                      name='lifecycle_manager_mapper',
                      output='screen',
                      parameters=[{'use_sim_time': False},
                                  {'autostart': True},
                                  {'node_names': ['amcl']}]  ,
                  ),
              
              
                          
                          
                      ]
                      ) 
      

      加了amcl和mapserver
      如果没有写上面的mapserver,不会在rviz中显示地图

      问题描述:

      小车无法进行单点导航

      具体细节和上下文:

      这是终端内的报错,有三点

      [component_container_isolated-1] [INFO] [1722307497.353478349] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722307497.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
      
      [amcl-5] [INFO] [1722307497.986480663] [amcl]: Message Filter dropping message: frame 'laser_link' at time 1722307496.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
      [rviz2-2] [INFO] [1722310347.323473487] [rviz2]: NavigateToPose will be called using the BT Navigator's default behavior tree.
      [rviz2-2] [ERROR] [1722310347.323740453] [rviz2]: Goal was rejected by server
      
      

      rviz:2024-07-30_11-45.png
      其中一个planner下的组件显示没有接受到地图,nav和location显示inactive

      小鱼小 1 条回复 最后回复 回复 引用 0
      • 小伊小
        机器人小伊
        最后由 编辑

        根据您提供的信息和错误日志,我们可以分析并尝试解决小车在单点导航时遇到的问题。以下是一些可能的原因和解决方案:

        1. 时间戳问题

        错误日志中的 Message Filter dropping message 指出接收到的时间戳早于当前变换缓存中的时间戳。这通常是由于传感器数据(如激光扫描数据)或地图服务器发送的数据时间戳与ROS系统时间不同步或延迟过大导致的。

        解决方案:

        • 确保所有节点的 use_sim_time 参数设置正确。如果您的系统是基于物理的(非仿真),确保 use_sim_time 设置为 false。
        • 检查并优化系统的网络延迟和处理器负载,确保传感器数据能够及时处理。
        • 检查并校准传感器的时间戳生成逻辑,确保它们与ROS系统时间同步。

        2. AMCL 节点问题

        AMCL(自适应蒙特卡洛定位)节点也报告了时间戳问题,这可能是因为它依赖的激光扫描或其他定位数据没有及时更新。

        解决方案:

        • 确保 AMCL 节点能够接收到有效的激光扫描数据和其他必要的定位信息。
        • 检查 AMCL 的配置文件,确保所有必要的参数都已正确设置。

        3. 地图服务器和变换问题

        如果 RViz 显示“planner下的组件显示没有接受到地图”,这通常意味着地图数据没有正确加载或变换(TF)没有正确设置。

        解决方案:

        • 确保地图文件 (imu_map.yaml) 正确无误,并且地图服务器 (map_server) 正在运行且能正确加载地图。
        • 检查 TF 树,确保所有必要的变换(如从 base_link 到 map 的变换)都已正确设置并发布。
        • 在 RViz 中使用 TF 插件来可视化 TF 树,检查是否有缺失的变换或错误的连接。

        4. 导航配置和状态

        如果 nav 和 location 显示为 inactive,这可能是因为导航堆栈的某些部分没有正确启动或配置。

        解决方案:

        • 检查 fishbot_nav2.yaml 文件中的配置,确保所有必要的导航参数都已正确设置。
        • 使用 ros2 service call /liftcycle_manager_mapper/get_state lifecycle_msgs/srv/GetState 命令来检查 AMCL 和其他导航相关节点的状态。
        • 确保 lifecycle_manager 正在管理所有相关的导航节点,并且它们都处于激活状态。

        5. RViz 配置

        确保 RViz 的配置正确,特别是与导航相关的插件(如目标设置、路径规划显示等)已正确配置。

        总结:
        您的问题可能涉及多个方面,包括时间戳同步、地图加载、TF 设置、导航配置以及 RViz 配置。建议逐一检查这些方面,并根据上述建议进行调整。如果问题仍然存在,可能需要更详细地检查系统日志或增加调试输出来进一步诊断问题。


        以上为生成回答,仅供参考~

        我是小伊,已接入ChatGpt,所有回复,仅供参考~

        1 条回复 最后回复 回复 引用 0
        • 小鱼小
          小鱼 技术大佬 @1814638019
          最后由 编辑

          @1814638019 在 机器人在单点导航时不规划路径 中说:

          [rviz2-2] [INFO] [1722310347.323473487] [rviz2]: NavigateToPose will be called using the BT Navigator's default behavior tree.
          [rviz2-2] [ERROR] [1722310347.323740453] [rviz2]: Goal was rejected by server

          应该还有更进一步的日志信息

          新书配套视频:https://www.bilibili.com/video/BV1GW42197Ck/

          1 2 条回复 最后回复 回复 引用 0
          • 1
            1814638019 @小鱼
            最后由 编辑

            @小鱼 终端内的能截取到的全部代码

            [component_container_isolated-1] [INFO] [1722328690.796172177] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328690.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328690.796172158] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328690.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328690.862376438] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328690.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328690.862376512] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328690.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328690.929077694] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328690.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328690.929077741] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328690.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328692.926502540] [lifecycle_manager_navigation]: Server behavior_server connected with bond.
            [component_container_isolated-1] [INFO] [1722328692.926562950] [lifecycle_manager_navigation]: Activating bt_navigator
            [component_container_isolated-1] [INFO] [1722328692.926919164] [bt_navigator]: Activating
            [component_container_isolated-1] [ERROR] [1722328692.927391217] [bt_navigator]: Caught exception in callback for transition 13
            [component_container_isolated-1] [ERROR] [1722328692.927425842] [bt_navigator]: Original error: Error at line 12: -> Node not recognized: RemovePassedGoals
            [component_container_isolated-1] [WARN] [1722328692.927490205] [bt_navigator]: Error occurred while doing error handling.
            [component_container_isolated-1] [FATAL] [1722328692.927522578] [bt_navigator]: Lifecycle node bt_navigator does not have error state implemented
            [component_container_isolated-1] [ERROR] [1722328692.927960623] [lifecycle_manager_navigation]: Failed to change state for node: bt_navigator
            [component_container_isolated-1] [ERROR] [1722328692.927993540] [lifecycle_manager_navigation]: Failed to bring up all requested nodes. Aborting bringup.
            [component_container_isolated-1] [INFO] [1722328693.261125604] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328692.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328693.261125486] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328692.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328693.328029683] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328693.328058336] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328693.394960022] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328693.395025228] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328693.461230244] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328693.461284224] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328693.528123912] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328693.528132964] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328693.595115140] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328693.595178439] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328693.661358248] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328693.661360080] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328693.728752758] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328693.728786474] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328693.795139915] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328693.795190506] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328693.862338103] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328693.862341684] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328693.929241307] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328693.929241211] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328693.996267304] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328693.996277213] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.062965045] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.063067200] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.129994316] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.130068307] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.196350259] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.196350253] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.263199813] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.263200010] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328693.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.329758524] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.329758713] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.396765256] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.396819624] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.462762505] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.462789260] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.529939233] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.530058021] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.596301286] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.596302698] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.663413611] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.663413718] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.730333632] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.730535289] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.796904071] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.796904433] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.863666504] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.863701495] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.929720717] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.929762923] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.996976483] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328694.996983951] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328695.063808607] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328695.063808565] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328695.130950916] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328695.131014258] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328695.197405303] [global_costmap.global_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [component_container_isolated-1] [INFO] [1722328695.197411902] [local_costmap.local_costmap]: Message Filter dropping message: frame 'laser_link' at time 1722328694.000 for reason 'the timestamp on the message is earlier than all the data in the transform cache'
            [rviz2-2] Start navigation
            [rviz2-2] [INFO] [1722328746.600351549] [rviz2]: NavigateToPose will be called using the BT Navigator's default behavior tree.
            [rviz2-2] [ERROR] [1722328746.602093016] [rviz2]: Goal was rejected by server
            
            
            小鱼小 1 条回复 最后回复 回复 引用 0
            • 1
              1814638019 @小鱼
              最后由 编辑

              @小鱼 感谢您的回复

              1 条回复 最后回复 回复 引用 0
              • 小鱼小
                小鱼 技术大佬 @1814638019
                最后由 编辑

                @1814638019 在 机器人在单点导航时不规划路径 中说:

                [component_container_isolated-1] [ERROR] [1722328692.927425842] [bt_navigator]: Original error: Error at line 12: -> Node not recognized: RemovePassedGoals

                问题应该出在这里,你有修改行为树吗

                新书配套视频:https://www.bilibili.com/video/BV1GW42197Ck/

                1 3 条回复 最后回复 回复 引用 0
                • 1
                  1814638019 @小鱼
                  最后由 编辑

                  @小鱼 没修改过

                  1 条回复 最后回复 回复 引用 0
                  • 1
                    1814638019 @小鱼
                    最后由 编辑

                    @小鱼 从学ros2 那里下载的源码 只修改了fishbot文件夹里面launch和params部分

                    1 条回复 最后回复 回复 引用 0
                    • 1
                      1814638019 @小鱼
                      最后由 编辑

                      @小鱼 是这里的代码吗?

                      navigation2/nav2_bt_navigator/behavior_trees navigate_to_pose_w_replanning_goal_patience_and_recovery.xml
                        
                      <!--
                        This Behavior Tree replans the global path periodically at 1 Hz through an array of poses continuously
                         and it also has recovery actions specific to planning / control as well as general system issues.
                      -->
                      <root main_tree_to_execute="MainTree">
                        <BehaviorTree ID="MainTree">
                          <RecoveryNode number_of_retries="6" name="NavigateRecovery">
                            <PipelineSequence name="NavigateWithReplanning">
                              <RateController hz="0.333">
                                <RecoveryNode number_of_retries="1" name="ComputePathThroughPoses">
                                  <ReactiveSequence>
                                    <RemovePassedGoals input_goals="{goals}" output_goals="{goals}" radius="0.7"/>
                                    <ComputePathThroughPoses goals="{goals}" path="{path}" planner_id="GridBased"/>
                                  </ReactiveSequence>
                                  <ClearEntireCostmap name="ClearGlobalCostmap-Context" service_name="global_costmap/clear_entirely_global_costmap"/>
                                </RecoveryNode>
                              </RateController>
                              <RecoveryNode number_of_retries="1" name="FollowPath">
                                <FollowPath path="{path}" controller_id="FollowPath"/>
                                <ClearEntireCostmap name="ClearLocalCostmap-Context" service_name="local_costmap/clear_entirely_local_costmap"/>
                              </RecoveryNode>
                            </PipelineSequence>
                            <ReactiveFallback name="RecoveryFallback">
                              <GoalUpdated/>
                              <RoundRobin name="RecoveryActions">
                                <Sequence name="ClearingActions">
                                  <ClearEntireCostmap name="ClearLocalCostmap-Subtree" service_name="local_costmap/clear_entirely_local_costmap"/>
                                  <ClearEntireCostmap name="ClearGlobalCostmap-Subtree" service_name="global_costmap/clear_entirely_global_costmap"/>
                                </Sequence>
                                <Spin spin_dist="1.57"/>
                                <Wait wait_duration="5"/>
                                <BackUp backup_dist="0.30" backup_speed="0.05"/>
                              </RoundRobin>
                            </ReactiveFallback>
                          </RecoveryNode>
                        </BehaviorTree>
                      </root>
                      
                      
                      小鱼小 1 条回复 最后回复 回复 引用 0
                      • 小鱼小
                        小鱼 技术大佬 @1814638019
                        最后由 编辑

                        @1814638019 你下载的是哪个版本的

                        新书配套视频:https://www.bilibili.com/video/BV1GW42197Ck/

                        1 2 条回复 最后回复 回复 引用 0
                        • 1
                          1814638019 @小鱼
                          最后由 编辑

                          此回复已被删除!
                          1 条回复 最后回复 回复 引用 0
                          • 1
                            1814638019 @小鱼
                            最后由 编辑

                            @小鱼 e98c878f-2500-4b80-a9ac-2cc574e16076-image.png
                            大佬,我直接用的你的工作空间😏

                            小鱼小 1 条回复 最后回复 回复 引用 0
                            • 小鱼小
                              小鱼 技术大佬 @1814638019
                              最后由 编辑

                              @1814638019 这个版本我还真不确定能不能用,主要是参数比较老了,nav2在更新,建议手动的按照教程配一遍参数,推荐下新书里的导航配置过程:书籍&社区铭牌购买链接:https://item.taobao.com/item.htm?id=819899547761

                              新书配套视频:https://www.bilibili.com/video/BV1GW42197Ck/

                              1 条回复 最后回复 回复 引用 0
                              • 第一个帖子
                                最后一个帖子
                              皖ICP备16016415号-7
                              Powered by NodeBB | 鱼香ROS