Closed Rak-r closed 11 months ago
First video
It should be pretty clear why that failed; you're sending it a command clearly off of the map. That's not unknown space, that's space that's not even mapped to be even unknown, its out of bounds.
Second video
Your resolution of sensor is too low it seems. We do raycasting to clear out cells, so if your resolution is too low, there aren't enough "free" measurements in a given probablistic cell to mark it as free yet. When you move the robot, it triggers another update and thus more "free" measurements from a call come along to expand the space. The cells directly around the robot are marked the first time because the low-resolution is enough to hit the free threshold within that overlapping space only.
This is not a Nav2 issue but a SLAM issue with your sensor, use a higher resolution sensor to have more dense beams to be able to clear out more cells as unoccupied in a given measurement snapshot and/or use a depth camera SLAM instead of a lidar SLAM that models your sensor's limitations more accurately. SLAM Toolbox is built for professional grade lidars, typically ~0.5 degree resolution or higher
Question
Required Info:
Operating System:
ROS2 Version:
DDS implementation:
Expected behavior
When setting the goal to an undetected space, Smac A* Hybrid planner should generate the path
Actual behavior
Global planner Failed to generate path
Additional information
I am trying to setup NAV2 for physical robot with online mapping and localization. But first testing in simulation. After launching the slam toolbox online async with mapping mode and NAV2 everything starts good. I set the goal to some arbitrary point and planner fails to generate the path and after that behaviour server starts with backup. Once backup done some part of map is updated and then if I set the goal inside the white area (global costmap) it starts to generate global plan.
I tried changing the costmap params but no progress. What I want to know is that if I give goal point, isn't the global planner should be able to generate the path with having info from global costmap.? What's causing this issue to happen. It might be something trivial I ham having but looked for configuration guides and other NAV2 default repos. Still getting the same query.
To update the map with slight travel, I tweaked
minimum_travel_distance
andminimum_travel_heading
params in slam_toolbox. It works but still I have to give goal to white map area.I visualised that global and local costmaps are generated. I am using simulated lidar sensor and also having depth cam setup. I tried to changing the sensor ranges as well. The other issue comes up in terminal log in both sensor modalities is:
[planner_server]: GridBased: failed to create plan, invalid use: Starting point in lethal space! Cannot create feasible plan. planner_server-2] [WARN] [1700588297.287430276] [nav2_costmap_2d]: Robot is out of bounds of the costmap! [planner_server-2] [WARN] [1700588297.287468315] [global_costmap.global_costmap]: Sensor origin at (-0.34, 0.00) is out of map bounds (-0.34, 0.00) to (214748367.63, 214748367.97). The costmap cannot raytrace for it.
First video shows the failed path generation
https://github.com/ros-planning/navigation2/assets/85680564/2631564b-0d10-4233-b3c2-4261090b75d9
Second video for small goal in the space and starts to map
https://github.com/ros-planning/navigation2/assets/85680564/c6ad2d03-c47a-4c24-b9bd-cbdbc25f3a6e
NAV2 params for Gloabl and local costmaps and planner server
` local_costmap: local_costmap: ros__parameters: update_frequency: 5.0 publish_frequency: 2.0 global_frame: odom robot_base_frame: base_link use_sim_time: False rolling_window: true width: 5 height: 5 resolution: 0.05 #0.25 footprint: "[[-0.6, 0.285475], [-0.6, -0.285475], [0.6, -0.285475], [0.6, 0.285475]]"
robot_radius: 0.5
local_costmap_client: ros__parameters: use_sim_time: False local_costmap_rclcpp_node: ros__parameters: use_sim_time: False '
global costmap configurations
` global_costmap: global_costmap: ros__parameters: update_frequency: 5.0 publish_frequency: 2.0 global_frame: map robot_base_frame: base_link use_sim_time: false footprint: "[[-0.6, 0.285475], [-0.6, -0.285475], [0.6, -0.285475], [0.6, 0.285475]]"
robot_radius: 0.5
global_costmap_client: ros__parameters: use_sim_time: False global_costmap_rclcpp_node: ros__parameters: use_sim_time: False '
` planner_server: ros__parameters: planner_plugins: ["GridBased"] use_sim_time: False
planner_server_rclcpp_node: ros__parameters: use_sim_time: False `
Implementation considerations
I have asked something similar in robotics stack exchange : https://robotics.stackexchange.com/questions/105576/nav2-and-slam-toolbox-without-prior-map?noredirect=1#comment42765_105576
It would great, if someone could guide what I am lacking and suggest some insights.