Currently, mapping typically relies on two types of hardware: Lidar sensors and Stereo Cameras, depending on the robot’s purpose and requirements, combined with the powerful ROS (Robot Operating System) platform to simulate, design, and build control algorithms for robots. This approach helps reduce the costs and time needed to build real models. This paper presents a method for simulating the construction of an environmental map for robots using lidar sensors based on the ROS platform, serving research, teaching, and robot design purposes.Currently, mapping typically relies on two types of hardware: Lidar sensors and Stereo Cameras, depending on the robot’s purpose and requirements, combined with the powerful ROS (Robot Operating System) platform to simulate, design, and build control algorithms for robots. This approach helps reduce the costs and time needed to build real models. This paper presents a method for simulating the construction of an environmental map for robots using lidar sensors based on the ROS platform, serving research, teaching, and robot design purposes.