Hello,
please remember, you might need to enable SLAM to also do relocalization as a plain dead-reckoning algorithm cannot do that good.
Thumb rule is angle pose will get more error than travelled distance with plain odometry.
So ít should not be just navigation and mapping. It's also localization and relocalization, by trying to cancel accumulated errors.
- Making loops help some SLAMs generating the map as the offset of dead reckoning path versus mapping topology can be used to improve the localization model quality
- Some SLAMs can also localize your bot when the world coordinate after it travels a bit and is able to "recognise" the familiar features with confidence
- So, after the world position is assumed known, the SLAM algorithm can be used to count out some accumulated error. Just need to have the weights and error estimates right so you know what data is how reliable
But to get purfect, you might need quite some tuning..
I've seen that slam_toolbox to start accumulating a lot of errors at least without relocalization when I tried your stuff.
And obstacle avoidance can be made with map and without map. While going towards the waypoint, the robot could be made to deviate from the costmap calculated path.
But then it needs to acknowledge the obstacle being there and have an algorithm to avoid it. Some prefer stateless avoidance, some stateful. So it's a bit of a question of taste if you would want to add temporary obstacles into your global map..
Cheers,
Sampsa