navigation2节点日志如下
[component_container_isolated-1] [INFO] [1768181321.569627624] [map_server]: Handling LoadMap request
[component_container_isolated-1] [INFO] [1768181321.569684828] [map_io]: Loading yaml file: buaahz_2_1.yaml
[component_container_isolated-1] [INFO] [1768181321.569653477] [amcl]: initialPoseReceived
[component_container_isolated-1] [ERROR] [1768181321.569736942] [map_io]: Failed processing YAML file buaahz_2_1.yaml at position (-1:-1) for reason: bad file: buaahz_2_1.yaml
[component_container_isolated-1] [WARN] [1768181321.569757384] [amcl]: Failed to transform initial pose in time (Lookup would require extrapolation into the future. Requested time 1768181321.569726 but the latest data is at time 1768181321.472442, when looking up transform from frame [base_link] to frame [odom])
[component_container_isolated-1] [INFO] [1768181321.570215075] [amcl]: Setting pose (1768181321.570215): 0.000 0.000 0.000
[component_container_isolated-1] [INFO] [1768181321.570413925] [bt_navigator]: Begin navigating from current location (0.00, 0.00) to (0.00, 0.00)
[component_container_isolated-1] [INFO] [1768181321.670761496] [controller_server]: Received a goal, begin computing control effort.
[component_container_isolated-1] [INFO] [1768181321.671932310] [controller_server]: Reached the goal!
[component_container_isolated-1] [INFO] [1768181321.870730031] [bt_navigator]: Goal succeeded
ros2 run wormhole_navigator wormhole_navigator_node 日志如下:
[INFO] [1768181199.166162972] [wormhole_navigator]: Loaded 2 wormholes
[INFO] [1768181231.546685324] [wormhole_navigator]: Received request to switch from buaahz_2_3.yaml -> buaahz_2_1.yaml
[INFO] [1768181231.546900549] [wormhole_navigator]: Switching map to buaahz_2_1.yaml...
ros2 action send_goal /switch_map wormhole_interfaces/action/SwitchMap "{from_map: 'buaahz_2_3.yaml', to_map: 'buaahz_2_1.yaml'}"日志如下:
Waiting for an action server to become available...
Sending goal:
from_map: buaahz_2_3.yaml
to_map: buaahz_2_1.yaml
exit_x: 0.0
exit_y: 0.0
exit_yaw: 0.0
entry_x: 0.0
entry_y: 0.0
entry_yaw: 0.0
Goal accepted with ID: 32d2c37d7b214b7384cef8df76d46c71
Result:
success: true
message: Switched and navigated
Goal finished with status: SUCCEEDED
我已经确认过两张地图都没问题,单独运行都可以正常加载,但还是切换失败,请大佬帮忙看看解决一下
navigation2节点日志如下
[component_container_isolated-1] [INFO] [1768181321.569627624] [map_server]: Handling LoadMap request
[component_container_isolated-1] [INFO] [1768181321.569684828] [map_io]: Loading yaml file: buaahz_2_1.yaml
[component_container_isolated-1] [INFO] [1768181321.569653477] [amcl]: initialPoseReceived
[component_container_isolated-1] [ERROR] [1768181321.569736942] [map_io]: Failed processing YAML file buaahz_2_1.yaml at position (-1:-1) for reason: bad file: buaahz_2_1.yaml
[component_container_isolated-1] [WARN] [1768181321.569757384] [amcl]: Failed to transform initial pose in time (Lookup would require extrapolation into the future. Requested time 1768181321.569726 but the latest data is at time 1768181321.472442, when looking up transform from frame [base_link] to frame [odom])
[component_container_isolated-1] [INFO] [1768181321.570215075] [amcl]: Setting pose (1768181321.570215): 0.000 0.000 0.000
[component_container_isolated-1] [INFO] [1768181321.570413925] [bt_navigator]: Begin navigating from current location (0.00, 0.00) to (0.00, 0.00)
[component_container_isolated-1] [INFO] [1768181321.670761496] [controller_server]: Received a goal, begin computing control effort.
[component_container_isolated-1] [INFO] [1768181321.671932310] [controller_server]: Reached the goal!
[component_container_isolated-1] [INFO] [1768181321.870730031] [bt_navigator]: Goal succeeded
ros2 run wormhole_navigator wormhole_navigator_node 日志如下:
[INFO] [1768181199.166162972] [wormhole_navigator]: Loaded 2 wormholes
[INFO] [1768181231.546685324] [wormhole_navigator]: Received request to switch from buaahz_2_3.yaml -> buaahz_2_1.yaml
[INFO] [1768181231.546900549] [wormhole_navigator]: Switching map to buaahz_2_1.yaml...
ros2 action send_goal /switch_map wormhole_interfaces/action/SwitchMap "{from_map: 'buaahz_2_3.yaml', to_map: 'buaahz_2_1.yaml'}"日志如下:
Waiting for an action server to become available...
Sending goal:
from_map: buaahz_2_3.yaml
to_map: buaahz_2_1.yaml
exit_x: 0.0
exit_y: 0.0
exit_yaw: 0.0
entry_x: 0.0
entry_y: 0.0
entry_yaw: 0.0
Goal accepted with ID: 32d2c37d7b214b7384cef8df76d46c71
Result:
success: true
message: Switched and navigated
Goal finished with status: SUCCEEDED
我已经确认过两张地图都没问题,单独运行都可以正常加载,但还是切换失败,请大佬帮忙看看解决一下