ROS2 nav2 global costmap disappearing
Hello, I am using ros2 foxy on Ubuntu 20.04 with rviz2 and gazebo 11. I'm running a robot in a simulation and will soon test my program on a real robot.
Everything launch and work as intended : - I can drive the robot with teleop - I can use nav2 to tell it to go from point A to point B
Now I want to save a map of where the robot has been when driving. I set up it's footprint so when I move it around, the global_costmap gets "populated" with white cells (if I understand correctly, it means they go from unknown to free).
However, after 3/4 minutes of driving the global costmap disappear with this message :
[bt_navigator-11] [INFO] [1654067456.988313971] [bt_navigator]: Begin navigating from current location to (3.10, 1.08)
[controller_server-8] [INFO] [1654067457.016923884] [local_costmap.local_costmap]: Received request to clear entirely the local_costmap
[bt_navigator-11] [WARN] [1654067457.017791003] [bt_navigator_rclcpp_node]: Node timed out while executing service call to local_costmap/clear_entirely_local_costmap.
[controller_server-8] [INFO] [1654067457.018207010] [local_costmap.local_costmap]: Received request to clear entirely the local_costmap
[planner_server-9] [INFO] [1654067457.019795388] [global_costmap.global_costmap]: Received request to clear entirely the global_costmap
[recoveries_server-10] [INFO] [1654067457.023361510] [recoveries_server]: Attempting spin
I think it is a normal behavior but is there a way to stop that from happening so I can move around my entire area and then save it as a map for future uses ? Thank you for taking the time to read my question, feel free to correct anything you think is wrong/inaccurate.
Edit (1) : After more testing, it appear that this happens when the robot get's "stuck" or have difficulties to follow the path it was given.