How does the bot know its own position when mapping?

Hi paresh,

We use very popular in robotics SLAM. You can read more about it here.

If you will follow our ROS tutorials step by step, you will receive answers for all your questions.

Best regards,
Hubert