fishbot 机器人导航出错,无法初始化位置
-
@小鱼 在 fishbot 机器人导航出错,无法初始化位置 中说:
@liusiyu_alex_nuaa 驱动雷达有报什么错误吗?网络结构是什么样子的
网络结构只有小车,雷达和电脑,电脑和路由器是有线连接的
雷达的延迟也很低
lsy@lsy:~$ ping 192.168.1.103
PING 192.168.1.103 (192.168.1.103) 56(84) bytes of data.
64 bytes from 192.168.1.103: icmp_seq=1 ttl=255 time=2.37 ms
64 bytes from 192.168.1.103: icmp_seq=2 ttl=255 time=11.9 ms
64 bytes from 192.168.1.103: icmp_seq=3 ttl=255 time=8.16 ms
64 bytes from 192.168.1.103: icmp_seq=4 ttl=255 time=15.1 ms
64 bytes from 192.168.1.103: icmp_seq=5 ttl=255 time=5.87 ms
64 bytes from 192.168.1.103: icmp_seq=6 ttl=255 time=12.6 ms
64 bytes from 192.168.1.103: icmp_seq=7 ttl=255 time=2.17 ms
64 bytes from 192.168.1.103: icmp_seq=8 ttl=255 time=9.49 ms
64 bytes from 192.168.1.103: icmp_seq=9 ttl=255 time=3.09 m -
@liusiyu_alex_nuaa 提供下上下文,系统环境之类的,这已经不是雷达问题了
-
@liusiyu_alex_nuaa 大概率是nav2配置问题,^_^
-
开启agent
lsy@lsy:~$ sudo docker run -it --rm -v /dev:/dev -v /dev/shm:/dev/shm --privileged --net=host registry.cn-hangzhou.aliyuncs.com/fishros/micro-ros-agent:humble udp4 --port 8888 -v4 [sudo] lsy 的密码: [1736163361.709806] info | UDPv4AgentLinux.cpp | init | running... | port: 8888 [1736163361.709977] info | Root.cpp | set_verbose_level | logger setup | verbose_level: 4 [1736163384.696595] info | Root.cpp | create_client | create | client_key: 0x2ECC0419, session_id: 0x81 [1736163384.696630] info | SessionManager.hpp | establish_session | session established | client_key: 0x2ECC0419, address: 192.168.1.104:47138 [1736163384.715286] info | ProxyClient.cpp | create_participant | participant created | client_key: 0x2ECC0419, participant_id: 0x000(1) [1736163384.725819] info | ProxyClient.cpp | create_topic | topic created | client_key: 0x2ECC0419, topic_id: 0x000(2), participant_id: 0x000(1) [1736163384.731738] info | ProxyClient.cpp | create_publisher | publisher created | client_key: 0x2ECC0419, publisher_id: 0x000(3), participant_id: 0x000(1) [1736163384.743196] info | ProxyClient.cpp | create_datawriter | datawriter created | client_key: 0x2ECC0419, datawriter_id: 0x000(5), publisher_id: 0x000(3) [1736163384.749224] info | ProxyClient.cpp | create_topic | topic created | client_key: 0x2ECC0419, topic_id: 0x001(2), participant_id: 0x000(1) [1736163384.759035] info | ProxyClient.cpp | create_publisher | publisher created | client_key: 0x2ECC0419, publisher_id: 0x001(3), participant_id: 0x000(1) [1736163384.765969] info | ProxyClient.cpp | create_datawriter | datawriter created | client_key: 0x2ECC0419, datawriter_id: 0x001(5), publisher_id: 0x001(3) [1736163384.772329] info | ProxyClient.cpp | create_topic | topic created | client_key: 0x2ECC0419, topic_id: 0x002(2), participant_id: 0x000(1) [1736163384.793973] info | ProxyClient.cpp | create_subscriber | subscriber created | client_key: 0x2ECC0419, subscriber_id: 0x000(4), participant_id: 0x000(1) [1736163384.804326] info | ProxyClient.cpp | create_datareader | datareader created | client_key: 0x2ECC0419, datareader_id: 0x000(6), subscriber_id: 0x000(4) [1736163384.812383] info | ProxyClient.cpp | create_replier | replier created | client_key: 0x2ECC0419, requester_id: 0x000(7), participant_id: 0x000(1)
开启雷达驱动
#? 2 [INFO] [launch]: All log files can be found below /root/.ros/log/2025-01-06-11-54-55-712924-67ecc32961a1-2091 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [tcp_server-1]: process started with pid [2092] [tcp_server-1] [INFO] [1736164495.809238794] [tcp_socket_server_node]: TCP端口:8888,已映射到串口设备:/tmp/tty_laser [tcp_server-1] [INFO] [1736164495.809391416] [tcp_socket_server_node]: 等待接受连接.. [tcp_server-1] [INFO] [1736164495.937869045] [tcp_socket_server_node]: 来自('192.168.1.103', 49176)的连接已建立 [INFO] [ydlidar_node-2]: process started with pid [2115] [ydlidar_node-2] [INFO] [1736164498.787244687] [ydlidar_node]: [YDLIDAR INFO] Current ROS Driver Version: 1.0.1 [ydlidar_node-2] [ydlidar_node-2] [2025-01-06 11:54:58][info] SDK initializing [ydlidar_node-2] [2025-01-06 11:54:58][info] SDK has been initialized [ydlidar_node-2] [2025-01-06 11:54:58][info] SDK Version: 1.2.9 [ydlidar_node-2] [2025-01-06 11:54:58][info] Connect elapsed time 0 ms [ydlidar_node-2] [2025-01-06 11:54:58][info] Lidar successfully connected [/tmp/tty_laser:115200] [ydlidar_node-2] [2025-01-06 11:54:58][info] Lidar running correctly! The health status good [ydlidar_node-2] [2025-01-06 11:54:58][info] Current Lidar Model Code 12 [ydlidar_node-2] [2025-01-06 11:54:58][info] Check status, Elapsed time 0 ms [ydlidar_node-2] [2025-01-06 11:54:58][info] Lidar init success, Elapsed time [0]ms [ydlidar_node-2] [2025-01-06 11:54:59][info] Start to getting intensity flag [ydlidar_node-2] [2025-01-06 11:54:59][info] Auto set intensity 0 [ydlidar_node-2] [2025-01-06 11:54:59][info] [YDLIDAR] End to getting intensity flag [ydlidar_node-2] [2025-01-06 11:54:59][info] [YDLIDAR] Create thread 0x30A00640 [ydlidar_node-2] [2025-01-06 11:55:00][info] Successed to start scan mode, Elapsed time 1609 ms [ydlidar_node-2] [2025-01-06 11:55:00][info] Scan Frequency: 5.00Hz [ydlidar_node-2] [2025-01-06 11:55:00][info] Fixed Size: 720 [ydlidar_node-2] [2025-01-06 11:55:00][info] Sample Rate: 3.00K [ydlidar_node-2] [2025-01-06 11:55:00][info] Scan Frequency: 5.00Hz [ydlidar_node-2] [2025-01-06 11:55:00][info] Fixed Size: 720 [ydlidar_node-2] [2025-01-06 11:55:00][info] Sample Rate: 3.00K [ydlidar_node-2] [2025-01-06 11:55:00][info] Scan Frequency: 5.00Hz [ydlidar_node-2] [2025-01-06 11:55:00][info] Fixed Size: 720 [ydlidar_node-2] [2025-01-06 11:55:00][info] Sample Rate: 3.00K [ydlidar_node-2] [2025-01-06 11:55:00][info] Scan Frequency: 5.00Hz [ydlidar_node-2] [2025-01-06 11:55:00][info] Fixed Size: 720 [ydlidar_node-2] [2025-01-06 11:55:00][info] Sample Rate: 3.00K [ydlidar_node-2] [2025-01-06 11:55:00][info] Scan Frequency: 5.00Hz [ydlidar_node-2] [2025-01-06 11:55:00][info] Fixed Size: 720 [ydlidar_node-2] [2025-01-06 11:55:00][info] Sample Rate: 3.00K [ydlidar_node-2] [2025-01-06 11:55:00][info] Single Fixed Size: 370 [ydlidar_node-2] [2025-01-06 11:55:00][info] Sample Rate: 3.00K [ydlidar_node-2] [2025-01-06 11:55:00][info] Successed to check the lidar, Elapsed time 463 ms [ydlidar_node-2] [2025-01-06 11:55:00][info] Now lidar is scanning... [ydlidar_node-2] [WARN] [1736164502.708964649] [ydlidar_node]: New subscription discovered on topic '/scan', requesting incompatible QoS. No messages will be sent to it. Last incompatible policy: RELIABILITY_QOS_POLICY [ydlidar_node-2] [WARN] [1736164526.186517265] [ydlidar_node]: New subscription discovered on topic '/scan', requesting incompatible QoS. No messages will be sent to it. Last incompatible policy: RELIABILITY_QOS_POLICY
开启机器人bring up程序
lsy@lsy:~/fishbot_nav$ ros2 launch fishbot_bringup bringup_quick.launch.py [INFO] [launch]: All log files can be found below /home/lsy/.ros/log/2025-01-06-20-08-54-558741-lsy-9690 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [joint_state_publisher-1]: process started with pid [9692] [INFO] [robot_state_publisher-2]: process started with pid [9694] [INFO] [odom2tf-3]: process started with pid [9696] [robot_state_publisher-2] [INFO] [1736165334.604491879] [robot_state_publisher]: got segment base_footprint [robot_state_publisher-2] [INFO] [1736165334.604542648] [robot_state_publisher]: got segment base_link [robot_state_publisher-2] [INFO] [1736165334.604547788] [robot_state_publisher]: got segment laser_frame [robot_state_publisher-2] [INFO] [1736165334.604550229] [robot_state_publisher]: got segment laser_link [joint_state_publisher-1] [INFO] [1736165334.966211311] [joint_state_publisher]: Waiting for robot_description to be published on the robot_description topic...
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', 'fishbot_map.yaml')) nav2_param_path = launch.substitutions.LaunchConfiguration( 'params_file', default=os.path.join(fishbot_navigation2_dir, 'config', 'nav2_params.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'), ])
-
开启导航程序
lsy@lsy:~/fishbot_nav$ source install/setup.bash ros2 launch fishbot_navigation2 navigation2.launch.py use_sim_time:=False [INFO] [launch]: All log files can be found below /home/lsy/.ros/log/2025-01-06-20-12-05-479988-lsy-10026 [INFO] [launch]: Default logging verbosity is set to INFO [INFO] [component_container_isolated-1]: process started with pid [10039] [INFO] [rviz2-2]: process started with pid [10041] [component_container_isolated-1] [INFO] [1736165525.912177449] [nav2_container]: Load Library: /opt/ros/humble/lib/libmap_server_core.so [component_container_isolated-1] [INFO] [1736165525.917138493] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_map_server::CostmapFilterInfoServer> [component_container_isolated-1] [INFO] [1736165525.917153078] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_map_server::MapSaver> [component_container_isolated-1] [INFO] [1736165525.917155788] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_map_server::MapServer> [component_container_isolated-1] [INFO] [1736165525.917158799] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_map_server::MapServer> [component_container_isolated-1] [INFO] [1736165525.921442975] [map_server]: [component_container_isolated-1] map_server lifecycle node launched. [component_container_isolated-1] Waiting on external lifecycle transitions to activate [component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information. [component_container_isolated-1] [INFO] [1736165525.921478834] [map_server]: Creating [INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/map_server' in container '/nav2_container' [component_container_isolated-1] [INFO] [1736165525.922961218] [nav2_container]: Load Library: /opt/ros/humble/lib/libamcl_core.so [component_container_isolated-1] [INFO] [1736165525.925016980] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_amcl::AmclNode> [component_container_isolated-1] [INFO] [1736165525.925035113] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_amcl::AmclNode> [component_container_isolated-1] [INFO] [1736165525.928725288] [amcl]: [component_container_isolated-1] amcl lifecycle node launched. [component_container_isolated-1] Waiting on external lifecycle transitions to activate [component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information. [component_container_isolated-1] [INFO] [1736165525.928897319] [amcl]: Creating [INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/amcl' in container '/nav2_container' [component_container_isolated-1] [INFO] [1736165525.930066832] [nav2_container]: Load Library: /opt/ros/humble/lib/libnav2_lifecycle_manager_core.so [component_container_isolated-1] [INFO] [1736165525.930342146] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_lifecycle_manager::LifecycleManager> [component_container_isolated-1] [INFO] [1736165525.930348936] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_lifecycle_manager::LifecycleManager> [component_container_isolated-1] [INFO] [1736165525.933359858] [lifecycle_manager_localization]: Creating [component_container_isolated-1] [INFO] [1736165525.934306745] [lifecycle_manager_localization]: Creating and initializing lifecycle service clients [INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/lifecycle_manager_localization' in container '/nav2_container' [component_container_isolated-1] [INFO] [1736165525.936201479] [lifecycle_manager_localization]: Starting managed nodes bringup... [component_container_isolated-1] [INFO] [1736165525.936226987] [lifecycle_manager_localization]: Configuring map_server [component_container_isolated-1] [INFO] [1736165525.936305100] [map_server]: Configuring [component_container_isolated-1] [INFO] [1736165525.936337746] [map_io]: Loading yaml file: /home/lsy/fishbot_nav/install/fishbot_navigation2/share/fishbot_navigation2/maps/fishbot_map.yaml [component_container_isolated-1] [INFO] [1736165525.936448814] [map_io]: resolution: 0.05 [component_container_isolated-1] [INFO] [1736165525.936451781] [map_io]: origin[0]: -4 [component_container_isolated-1] [INFO] [1736165525.936453699] [map_io]: origin[1]: -1.55 [component_container_isolated-1] [INFO] [1736165525.936455409] [map_io]: origin[2]: 0 [component_container_isolated-1] [INFO] [1736165525.936457248] [map_io]: free_thresh: 0.25 [component_container_isolated-1] [INFO] [1736165525.936458981] [map_io]: occupied_thresh: 0.65 [component_container_isolated-1] [INFO] [1736165525.936461041] [map_io]: mode: trinary [component_container_isolated-1] [INFO] [1736165525.936463155] [map_io]: negate: 0 [component_container_isolated-1] [INFO] [1736165525.936547457] [map_io]: Loading image_file: /home/lsy/fishbot_nav/install/fishbot_navigation2/share/fishbot_navigation2/maps/fishbot_map.pgm [component_container_isolated-1] [INFO] [1736165525.937786805] [map_io]: Read map /home/lsy/fishbot_nav/install/fishbot_navigation2/share/fishbot_navigation2/maps/fishbot_map.pgm: 194 X 142 map @ 0.05 m/cell [component_container_isolated-1] [INFO] [1736165525.938922537] [lifecycle_manager_localization]: Configuring amcl [component_container_isolated-1] [INFO] [1736165525.938980421] [amcl]: Configuring [component_container_isolated-1] [INFO] [1736165525.939036257] [amcl]: initTransforms [component_container_isolated-1] [INFO] [1736165525.944107718] [amcl]: initPubSub [component_container_isolated-1] [INFO] [1736165525.945817082] [amcl]: Subscribed to map topic. [component_container_isolated-1] [INFO] [1736165525.946986840] [lifecycle_manager_localization]: Activating map_server [component_container_isolated-1] [INFO] [1736165525.947029528] [map_server]: Activating [component_container_isolated-1] [INFO] [1736165525.947081968] [map_server]: Creating bond (map_server) to lifecycle manager. [component_container_isolated-1] [INFO] [1736165525.947109751] [amcl]: Received a 194 X 142 map @ 0.050 m/pix [component_container_isolated-1] [INFO] [1736165526.040265512] [nav2_container]: Load Library: /opt/ros/humble/lib/libcontroller_server_core.so [component_container_isolated-1] [INFO] [1736165526.041604574] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_controller::ControllerServer> [component_container_isolated-1] [INFO] [1736165526.041636712] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_controller::ControllerServer> [component_container_isolated-1] [INFO] [1736165526.045048787] [controller_server]: [component_container_isolated-1] controller_server lifecycle node launched. [component_container_isolated-1] Waiting on external lifecycle transitions to activate [component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information. [component_container_isolated-1] [INFO] [1736165526.046656219] [controller_server]: Creating controller server [component_container_isolated-1] [INFO] [1736165526.048238024] [lifecycle_manager_localization]: Server map_server connected with bond. [component_container_isolated-1] [INFO] [1736165526.048260862] [lifecycle_manager_localization]: Activating amcl [component_container_isolated-1] [INFO] [1736165526.048318951] [amcl]: Activating [component_container_isolated-1] [INFO] [1736165526.048334193] [amcl]: Creating bond (amcl) to lifecycle manager. [rviz2-2] [INFO] [1736165526.048991529] [rviz2]: Stereo is NOT SUPPORTED [rviz2-2] [INFO] [1736165526.049069126] [rviz2]: OpenGl version: 4.6 (GLSL 4.6) [component_container_isolated-1] [INFO] [1736165526.052556579] [local_costmap.local_costmap]: [component_container_isolated-1] local_costmap lifecycle node launched. [component_container_isolated-1] Waiting on external lifecycle transitions to activate [component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information. [component_container_isolated-1] [INFO] [1736165526.052788682] [local_costmap.local_costmap]: Creating Costmap [INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/controller_server' in container '/nav2_container' [component_container_isolated-1] [INFO] [1736165526.054151352] [nav2_container]: Load Library: /opt/ros/humble/lib/libsmoother_server_core.so [component_container_isolated-1] [INFO] [1736165526.054813122] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_smoother::SmootherServer> [component_container_isolated-1] [INFO] [1736165526.054821365] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_smoother::SmootherServer> [component_container_isolated-1] [INFO] [1736165526.060887734] [smoother_server]: [component_container_isolated-1] smoother_server lifecycle node launched. [component_container_isolated-1] Waiting on external lifecycle transitions to activate [component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information. [component_container_isolated-1] [INFO] [1736165526.062042238] [smoother_server]: Creating smoother server [INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/smoother_server' in container '/nav2_container' [component_container_isolated-1] [INFO] [1736165526.062980461] [nav2_container]: Load Library: /opt/ros/humble/lib/libplanner_server_core.so [component_container_isolated-1] [INFO] [1736165526.063581784] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_planner::PlannerServer> [component_container_isolated-1] [INFO] [1736165526.063594961] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_planner::PlannerServer> [component_container_isolated-1] [INFO] [1736165526.067913204] [planner_server]: [component_container_isolated-1] planner_server lifecycle node launched. [component_container_isolated-1] Waiting on external lifecycle transitions to activate [component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information. [component_container_isolated-1] [INFO] [1736165526.068636672] [planner_server]: Creating [component_container_isolated-1] [INFO] [1736165526.072326157] [global_costmap.global_costmap]: [component_container_isolated-1] global_costmap lifecycle node launched. [component_container_isolated-1] Waiting on external lifecycle transitions to activate [component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information. [component_container_isolated-1] [INFO] [1736165526.072503205] [global_costmap.global_costmap]: Creating Costmap [INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/planner_server' in container '/nav2_container' [component_container_isolated-1] [INFO] [1736165526.074006990] [nav2_container]: Load Library: /opt/ros/humble/lib/libbehavior_server_core.so [component_container_isolated-1] [INFO] [1736165526.075243026] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<behavior_server::BehaviorServer> [component_container_isolated-1] [INFO] [1736165526.075253826] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<behavior_server::BehaviorServer> [component_container_isolated-1] [INFO] [1736165526.079034730] [behavior_server]: [component_container_isolated-1] behavior_server lifecycle node launched. [component_container_isolated-1] Waiting on external lifecycle transitions to activate [component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information. [rviz2-2] [INFO] [1736165526.080033040] [rviz2]: Stereo is NOT SUPPORTED [INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/behavior_server' in container '/nav2_container' [component_container_isolated-1] [INFO] [1736165526.080930356] [nav2_container]: Load Library: /opt/ros/humble/lib/libbt_navigator_core.so [component_container_isolated-1] [INFO] [1736165526.081689809] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_bt_navigator::BtNavigator> [component_container_isolated-1] [INFO] [1736165526.081697957] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_bt_navigator::BtNavigator> [component_container_isolated-1] [INFO] [1736165526.086106307] [bt_navigator]: [component_container_isolated-1] bt_navigator lifecycle node launched. [component_container_isolated-1] Waiting on external lifecycle transitions to activate [component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information. [component_container_isolated-1] [INFO] [1736165526.086131802] [bt_navigator]: Creating [INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/bt_navigator' in container '/nav2_container' [component_container_isolated-1] [INFO] [1736165526.087227724] [nav2_container]: Load Library: /opt/ros/humble/lib/libwaypoint_follower_core.so [component_container_isolated-1] [INFO] [1736165526.087521208] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_waypoint_follower::WaypointFollower> [component_container_isolated-1] [INFO] [1736165526.087527961] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_waypoint_follower::WaypointFollower> [component_container_isolated-1] [INFO] [1736165526.091714054] [waypoint_follower]: [component_container_isolated-1] waypoint_follower lifecycle node launched. [component_container_isolated-1] Waiting on external lifecycle transitions to activate [component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information. [component_container_isolated-1] [INFO] [1736165526.092058436] [waypoint_follower]: Creating [INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/waypoint_follower' in container '/nav2_container' [component_container_isolated-1] [INFO] [1736165526.093178791] [nav2_container]: Load Library: /opt/ros/humble/lib/libvelocity_smoother_core.so [component_container_isolated-1] [INFO] [1736165526.093522349] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_velocity_smoother::VelocitySmoother> [component_container_isolated-1] [INFO] [1736165526.093528566] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_velocity_smoother::VelocitySmoother> [component_container_isolated-1] [INFO] [1736165526.097814398] [velocity_smoother]: [component_container_isolated-1] velocity_smoother lifecycle node launched. [INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/velocity_smoother' in container '/nav2_container' [component_container_isolated-1] Waiting on external lifecycle transitions to activate [component_container_isolated-1] See https://design.ros2.org/articles/node_lifecycle.html for more information. [component_container_isolated-1] [INFO] [1736165526.098787361] [nav2_container]: Found class: rclcpp_components::NodeFactoryTemplate<nav2_lifecycle_manager::LifecycleManager> [component_container_isolated-1] [INFO] [1736165526.098804780] [nav2_container]: Instantiate class: rclcpp_components::NodeFactoryTemplate<nav2_lifecycle_manager::LifecycleManager> [component_container_isolated-1] [INFO] [1736165526.102342063] [lifecycle_manager_navigation]: Creating [INFO] [launch_ros.actions.load_composable_nodes]: Loaded node '/lifecycle_manager_navigation' in container '/nav2_container' [component_container_isolated-1] [INFO] [1736165526.103203303] [lifecycle_manager_navigation]: Creating and initializing lifecycle service clients [component_container_isolated-1] [INFO] [1736165526.110831644] [lifecycle_manager_navigation]: Starting managed nodes bringup... [component_container_isolated-1] [INFO] [1736165526.110854515] [lifecycle_manager_navigation]: Configuring controller_server [component_container_isolated-1] [INFO] [1736165526.110919628] [controller_server]: Configuring controller interface [component_container_isolated-1] [INFO] [1736165526.111033561] [controller_server]: getting goal checker plugins.. [component_container_isolated-1] [INFO] [1736165526.111085975] [controller_server]: Controller frequency set to 20.0000Hz [component_container_isolated-1] [INFO] [1736165526.111102279] [local_costmap.local_costmap]: Configuring [component_container_isolated-1] [INFO] [1736165526.112681222] [local_costmap.local_costmap]: Using plugin "voxel_layer" [component_container_isolated-1] [INFO] [1736165526.114063194] [local_costmap.local_costmap]: Subscribed to Topics: scan [component_container_isolated-1] [INFO] [1736165526.116397648] [local_costmap.local_costmap]: Initialized plugin "voxel_layer" [component_container_isolated-1] [INFO] [1736165526.116411831] [local_costmap.local_costmap]: Using plugin "inflation_layer" [component_container_isolated-1] [INFO] [1736165526.116741469] [local_costmap.local_costmap]: Initialized plugin "inflation_layer" [component_container_isolated-1] [INFO] [1736165526.119832482] [controller_server]: Created progress_checker : progress_checker of type nav2_controller::SimpleProgressChecker [component_container_isolated-1] [INFO] [1736165526.120337215] [controller_server]: Created goal checker : general_goal_checker of type nav2_controller::SimpleGoalChecker [component_container_isolated-1] [INFO] [1736165526.120655514] [controller_server]: Controller Server has general_goal_checker goal checkers available. [component_container_isolated-1] [INFO] [1736165526.121454793] [controller_server]: Created controller : FollowPath of type dwb_core::DWBLocalPlanner [component_container_isolated-1] [INFO] [1736165526.122236125] [controller_server]: Setting transform_tolerance to 0.200000 [component_container_isolated-1] [INFO] [1736165526.127303965] [controller_server]: Using critic "RotateToGoal" (dwb_critics::RotateToGoalCritic) [component_container_isolated-1] [INFO] [1736165526.127558306] [controller_server]: Critic plugin initialized [component_container_isolated-1] [INFO] [1736165526.127610890] [controller_server]: Using critic "Oscillation" (dwb_critics::OscillationCritic) [component_container_isolated-1] [INFO] [1736165526.127870959] [controller_server]: Critic plugin initialized [component_container_isolated-1] [INFO] [1736165526.128001651] [controller_server]: Using critic "BaseObstacle" (dwb_critics::BaseObstacleCritic) [component_container_isolated-1] [INFO] [1736165526.128180062] [controller_server]: Critic plugin initialized [component_container_isolated-1] [INFO] [1736165526.128281202] [controller_server]: Using critic "GoalAlign" (dwb_critics::GoalAlignCritic) [component_container_isolated-1] [INFO] [1736165526.128584908] [controller_server]: Critic plugin initialized [component_container_isolated-1] [INFO] [1736165526.128694741] [controller_server]: Using critic "PathAlign" (dwb_critics::PathAlignCritic) [component_container_isolated-1] [INFO] [1736165526.129081396] [controller_server]: Critic plugin initialized [component_container_isolated-1] [INFO] [1736165526.129173143] [controller_server]: Using critic "PathDist" (dwb_critics::PathDistCritic) [component_container_isolated-1] [INFO] [1736165526.129304721] [controller_server]: Critic plugin initialized [component_container_isolated-1] [INFO] [1736165526.129364325] [controller_server]: Using critic "GoalDist" (dwb_critics::GoalDistCritic) [component_container_isolated-1] [INFO] [1736165526.129466876] [controller_server]: Critic plugin initialized [component_container_isolated-1] [INFO] [1736165526.129474779] [controller_server]: Controller Server has FollowPath controllers available. [component_container_isolated-1] [INFO] [1736165526.134081910] [lifecycle_manager_navigation]: Configuring smoother_server [component_container_isolated-1] [INFO] [1736165526.134144749] [smoother_server]: Configuring smoother server [component_container_isolated-1] [INFO] [1736165526.136860117] [smoother_server]: Created smoother : simple_smoother of type nav2_smoother::SimpleSmoother [component_container_isolated-1] [INFO] [1736165526.137235675] [smoother_server]: Smoother Server has simple_smoother smoothers available. [component_container_isolated-1] [INFO] [1736165526.139122775] [lifecycle_manager_navigation]: Configuring planner_server [component_container_isolated-1] [INFO] [1736165526.139173382] [planner_server]: Configuring [component_container_isolated-1] [INFO] [1736165526.139197077] [global_costmap.global_costmap]: Configuring [component_container_isolated-1] [WARN] [1736165526.139383760] [amcl]: New subscription discovered on topic '/particle_cloud', requesting incompatible QoS. No messages will be sent to it. Last incompatible policy: RELIABILITY_QOS_POLICY [component_container_isolated-1] [INFO] [1736165526.141244541] [global_costmap.global_costmap]: Using plugin "static_layer" [component_container_isolated-1] [INFO] [1736165526.141752206] [global_costmap.global_costmap]: Subscribing to the map topic (/map) with transient local durability [component_container_isolated-1] [INFO] [1736165526.142176625] [global_costmap.global_costmap]: Initialized plugin "static_layer" [component_container_isolated-1] [INFO] [1736165526.142193470] [global_costmap.global_costmap]: Using plugin "obstacle_layer" [component_container_isolated-1] [INFO] [1736165526.142830741] [global_costmap.global_costmap]: Subscribed to Topics: scan [component_container_isolated-1] [INFO] [1736165526.145291798] [global_costmap.global_costmap]: Initialized plugin "obstacle_layer" [component_container_isolated-1] [INFO] [1736165526.145314737] [global_costmap.global_costmap]: Using plugin "inflation_layer" [component_container_isolated-1] [INFO] [1736165526.146095161] [global_costmap.global_costmap]: Initialized plugin "inflation_layer" [component_container_isolated-1] [INFO] [1736165526.150609911] [lifecycle_manager_localization]: Server amcl connected with bond. [component_container_isolated-1] [INFO] [1736165526.150631920] [lifecycle_manager_localization]: Managed nodes are active [component_container_isolated-1] [INFO] [1736165526.150637972] [lifecycle_manager_localization]: Creating bond timer... [component_container_isolated-1] [INFO] [1736165526.150703562] [planner_server]: Created global planner plugin GridBased of type nav2_navfn_planner/NavfnPlanner [component_container_isolated-1] [INFO] [1736165526.150718931] [planner_server]: Configuring plugin GridBased of type NavfnPlanner [component_container_isolated-1] [INFO] [1736165526.150980175] [planner_server]: Planner Server has GridBased planners available. [component_container_isolated-1] [INFO] [1736165526.155926548] [lifecycle_manager_navigation]: Configuring behavior_server [component_container_isolated-1] [INFO] [1736165526.155990808] [behavior_server]: Configuring [component_container_isolated-1] [INFO] [1736165526.159366231] [behavior_server]: Creating behavior plugin spin of type nav2_behaviors/Spin [component_container_isolated-1] [INFO] [1736165526.160021416] [behavior_server]: Configuring spin [component_container_isolated-1] [INFO] [1736165526.163080438] [behavior_server]: Creating behavior plugin backup of type nav2_behaviors/BackUp [component_container_isolated-1] [INFO] [1736165526.163475008] [behavior_server]: Configuring backup [component_container_isolated-1] [INFO] [1736165526.165744606] [behavior_server]: Creating behavior plugin drive_on_heading of type nav2_behaviors/DriveOnHeading [component_container_isolated-1] [INFO] [1736165526.166364731] [behavior_server]: Configuring drive_on_heading [component_container_isolated-1] [INFO] [1736165526.169293159] [behavior_server]: Creating behavior plugin assisted_teleop of type nav2_behaviors/AssistedTeleop [component_container_isolated-1] [INFO] [1736165526.170015375] [behavior_server]: Configuring assisted_teleop [component_container_isolated-1] [INFO] [1736165526.174198357] [behavior_server]: Creating behavior plugin wait of type nav2_behaviors/Wait [component_container_isolated-1] [INFO] [1736165526.174576700] [behavior_server]: Configuring wait [component_container_isolated-1] [INFO] [1736165526.177096902] [lifecycle_manager_navigation]: Configuring bt_navigator [component_container_isolated-1] [INFO] [1736165526.177156115] [bt_navigator]: Configuring [component_container_isolated-1] [INFO] [1736165526.196164715] [amcl]: createLaserObject [rviz2-2] [INFO] [1736165526.210291827] [rviz2]: Trying to create a map of size 194 x 142 using 1 swatches [component_container_isolated-1] [INFO] [1736165526.210521296] [lifecycle_manager_navigation]: Configuring waypoint_follower [component_container_isolated-1] [INFO] [1736165526.210571665] [waypoint_follower]: Configuring [component_container_isolated-1] [INFO] [1736165526.212095044] [global_costmap.global_costmap]: StaticLayer: Resizing costmap to 194 X 142 at 0.050000 m/pix [component_container_isolated-1] [INFO] [1736165526.215522723] [waypoint_follower]: Created waypoint_task_executor : wait_at_waypoint of type nav2_waypoint_follower::WaitAtWaypoint [component_container_isolated-1] [INFO] [1736165526.215833340] [lifecycle_manager_navigation]: Configuring velocity_smoother [component_container_isolated-1] [INFO] [1736165526.215905475] [velocity_smoother]: Configuring velocity smoother [component_container_isolated-1] [INFO] [1736165526.218132737] [lifecycle_manager_navigation]: Activating controller_server [component_container_isolated-1] [INFO] [1736165526.218184472] [controller_server]: Activating [component_container_isolated-1] [INFO] [1736165526.218201437] [local_costmap.local_costmap]: Activating [component_container_isolated-1] [INFO] [1736165526.218207618] [local_costmap.local_costmap]: Checking transform [component_container_isolated-1] [INFO] [1736165526.218257537] [local_costmap.local_costmap]: start [component_container_isolated-1] [INFO] [1736165526.468671355] [controller_server]: Creating bond (controller_server) to lifecycle manager. [component_container_isolated-1] [INFO] [1736165526.570545667] [lifecycle_manager_navigation]: Server controller_server connected with bond. [component_container_isolated-1] [INFO] [1736165526.570567917] [lifecycle_manager_navigation]: Activating smoother_server [component_container_isolated-1] [INFO] [1736165526.570688258] [smoother_server]: Activating [component_container_isolated-1] [INFO] [1736165526.570707246] [smoother_server]: Creating bond (smoother_server) to lifecycle manager. [component_container_isolated-1] [INFO] [1736165526.672567314] [lifecycle_manager_navigation]: Server smoother_server connected with bond. [component_container_isolated-1] [INFO] [1736165526.672592003] [lifecycle_manager_navigation]: Activating planner_server [component_container_isolated-1] [INFO] [1736165526.672758423] [planner_server]: Activating [component_container_isolated-1] [INFO] [1736165526.672871822] [global_costmap.global_costmap]: Activating [component_container_isolated-1] [INFO] [1736165526.672884287] [global_costmap.global_costmap]: Checking transform [component_container_isolated-1] [INFO] [1736165526.672888472] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist [component_container_isolated-1] [INFO] [1736165527.172989469] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist [component_container_isolated-1] [ERROR] [1736165527.198757538] [amcl]: Couldn't transform from laser_frame to base_footprint, even though the message notifier is in use: (Could not find a connection between 'base_footprint' and 'laser_frame' because they are not part of the same tree.Tf has two or more unconnected trees.) [component_container_isolated-1] [INFO] [1736165527.198839246] [amcl]: Message Filter dropping message: frame 'laser_frame' at time 1736165525.825 for reason 'the timestamp on the message is earlier than all the data in the transform cache' [component_container_isolated-1] [INFO] [1736165527.198861696] [amcl]: Message Filter dropping message: frame 'laser_frame' at time 1736165525.949 for reason 'the timestamp on the message is earlier than all the data in the transform cache' [component_container_isolated-1] [INFO] [1736165527.198893029] [amcl]: createLaserObject [rviz2-2] [INFO] [1736165527.413713513] [rviz2]: Message Filter dropping message: frame 'laser_frame' at time 1736165526.068 for reason 'discarding message because the queue is full' [rviz2-2] [INFO] [1736165527.541350810] [rviz2]: Message Filter dropping message: frame 'laser_frame' at time 1736165526.196 for reason 'discarding message because the queue is full' [rviz2-2] [INFO] [1736165527.669900293] [rviz2]: Message Filter dropping message: frame 'laser_frame' at time 1736165526.321 for reason 'discarding message because the queue is full' [component_container_isolated-1] [INFO] [1736165527.672985186] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist [rviz2-2] [INFO] [1736165527.861174277] [rviz2]: Message Filter dropping message: frame 'laser_frame' at time 1736165526.432 for reason 'discarding message because the queue is full' [rviz2-2] [INFO] [1736165527.925488046] [rviz2]: Message Filter dropping message: frame 'laser_frame' at time 1736165526.558 for reason 'discarding message because the queue is full' [rviz2-2] [INFO] [1736165528.053612196] [rviz2]: Message Filter dropping message: frame 'laser_frame' at time 1736165526.690 for reason 'discarding message because the queue is full' [component_container_isolated-1] [INFO] [1736165528.172944087] [global_costmap.global_costmap]: Timed out waiting for transform from base_link to map to become available, tf error: Invalid frame ID "map" passed to canTransform argument target_frame - frame does not exist [rviz2-2] [INFO] [1736165528.181670689] [rviz2]: Message Filter dropping message: frame 'laser_frame' at time 1736165526.806 for reason 'discarding message because the queue is full' [component_container_isolated-1] [ERROR] [1736165528.210180786] [amcl]: Couldn't transform from laser_frame to base_footprint, even though the message notifier is in use: (Could not find a connection between 'base_footprint' and 'laser_frame' because they are not part of the same tree.Tf has two or more unconnected trees.) [component_container_isolated-1] [INFO] [1736165528.210261831] [amcl]: createLaserObject [rviz2-2] [INFO] [1736165528.277591852] [rviz2]: Message Filter dropping message: frame 'laser_frame' at time 1736165526.920 for reason 'discarding message because the queue is full' [rviz2-2] [INFO] [1736165528.405278718] [rviz2]: Message Filter dropping message: frame 'laser_frame' at time 1736165527.051 for reason 'discarding message because the queue is full' [rviz2-2] [INFO] [1736165528.437762437] [rviz2]: Message Filter dropping message: frame 'odom' at time 1736165526.369 for reason 'discarding message because the queue is full'
-
@liusiyu_alex_nuaa 你的操作系统版本和ROS2的版本?
-
@小鱼 开启导航后再给我看看 rqt_tf_tree的样子
-
@小鱼 对的,ROS2 humble Ubuntu22.04 前面一直跟着教程做的
-
@小鱼 在 fishbot 机器人导航出错,无法初始化位置 中说:
启导航后再给我看看 rqt_tf_tree的样子
-
-
@liusiyu_alex_nuaa 这个urdf模型在哪里
-
@小鱼 是你的例程
~/fishbot_nav/src/fishbot_description/urdf
-
-
<?xml version="1.0"?> <robot name="fishbot"> <link name="base_footprint" /> <!-- base link --> <link name="base_link"> <visual> <origin xyz="0 0 0.0" rpy="0 0 0" /> <geometry> <cylinder length="0.12" radius="0.10" /> </geometry> <material name="blue"> <color rgba="0.1 0.1 1.0 0.5" /> </material> </visual> </link> <joint name="base_joint" type="fixed"> <parent link="base_footprint" /> <child link="base_link" /> <origin xyz="0.0 0.0 0.076" rpy="0 0 0" /> </joint> <!-- laser link --> <link name="laser_link"> <visual> <origin xyz="0 0 0" rpy="0 0 0" /> <geometry> <cylinder length="0.02" radius="0.02" /> </geometry> <material name="black"> <color rgba="0.0 0.0 0.0 0.5" /> </material> </visual> </link> <joint name="laser_joint" type="fixed"> <parent link="base_link" /> <child link="laser_link" /> <origin xyz="0 0 0.075" rpy="0 0 0" /> </joint> <!-- laser link --> <link name="laser_frame"> <visual> <origin xyz="0 0 0" rpy="0 0 0" /> <geometry> <cylinder length="0.02" radius="0.02" /> </geometry> <material name="black"> <color rgba="0.0 0.0 0.0 0.5" /> </material> </visual> </link> <joint name="laser_frame_joint" type="fixed"> <parent link="base_link" /> <child link="laser_frame" /> <origin xyz="0 0 0.075" rpy="0 0 0" /> </joint> </robot>
-
@liusiyu_alex_nuaa 使用的是哪个分支的文件
-
@小鱼 用这个代码从github上下载的
git clone https://github.com/fishros/fishbot_nav.git --depth=1
-
@liusiyu_alex_nuaa 小车的固件版本是?
-
@小鱼
电机驱动版本https://fishros.org.cn/forum/assets/uploads/files/1732182619815-fishbot_motion_control_v1.7.0.beta.241121.bin
雷达驱动版本
https://fishros.org.cn/forum/assets/uploads/files/1732182619815-fishbot_motion_control_v1.7.0.beta.241121.bin
都是配置工具默认的
-
@liusiyu_alex_nuaa 在 fishbot 机器人导航出错,无法初始化位置 中说:
ot_motion_contro
雷达的驱动写错了https://fishros.org.cn/forum/assets/uploads/files/1735192057607-fishbot_laser_control_v1.3.0.alpha.241226.bin
-
@liusiyu_alex_nuaa 看主控板的