## 4 Dynamic Simulation of One Mobile Robot Using Flat Surfaces
(**a**) mobile robot’s starting position; (**b**) mobile robot’s ending position. Figure 13: Publishing the test velocity in the Vector 3 subvector. A logical scheme is shown in Figure 15, which reflects the current method of control development and is based on a manual input of the linear velocity. Additionally, a graph was extracted showing the position, linear velocity, and linear acceleration of the mobile robot along the x-axis, as presented in Figure 16. The simulation was conducted over a duration of 13 s.  
These values were extracted by the /odom topic interrogation. This was an initial test, which confirms the actual functionalities of the motion metrics, including the linear velocity. Now, a 2D LiDAR sensor is simulated for scanning the actual stage. This sensor, with a scanning field of \(\pm 60^{\circ}\) and an angular resolution of 0.5\({}^{\circ}\), has been integrated into the system. The sensor operates at an update rate of 10 Hz and provides a maximum range of approximately 3.5 m, allowing the robot to detect and react to nearby obstacles within its frontal sensing arc, shown in Figure 17.  
In this study, we employ the Cartographer SLAM framework to perform real-time mapping and localization using 2D LiDAR data within a simulated environment. Cartographer follows a graph-based SLAM paradigm, wherein a pose graph is incrementally constructed by matching incoming laser scans to localized submaps. These pose constraints are globally optimized using nonlinear least-squares methods (via Ceres Solver), yielding a globally consistent map and trajectory estimate. Compared to probabilistic approaches such as FastSLAM or GMapping, which rely on particle filters and resampling techniques, Cartographer leverages deterministic scan matching, loop closure detection, and pose graph optimization, ensuring accurate and efficient map construction without the compu  
Figure 16: Graph of the mobile robot’s position, velocity, and acceleration. Figure 15: Information circulation from the terminal input of the velocity to differential controllers. tational overhead of particle filtering. The method aligns well with the operational needs of emergency robotics, where rapid and robust environmental understanding is crucial. This configuration enables the robot to autonomously stop when an obstacle is detected directly ahead. An obstacle avoidance algorithm is currently under development, aiming to implement a progressive turning behavior upon obstacle detection, thereby enhancing the system's autonomy in dynamic environments. The robot was tested in a virtual environment over a 10 min randomized motion sequence, using linear velocity commands of 0.4 m/s published to the /cmd_vel topic, as described in Figure 18. During this exploration, the LiDAR sensor continuously scanned the environment, contributing to a qualitative assessment of spatial awareness and real-time perception. The SLAM process was performed using the Cartographer ROS2 framework, which operated on the standard topics: /scan (2D LiDAR), /odom (odometry), /tf, and /tf_static for frame transformations. Sensor data were sampled at 10 Hz, and the occupancy grid was generated with a resolution of 0.05 m per cell. The robot's true position was obtained from the /gazebo/model_states topic and used as a reference for validating the overall mapping consistency within the simulated 5 \(\times\) 20 m\({}^{2}\) environment. The colored trajectories denote shifts in the robot's orientation, thereby reflecting the LiDAR sensor's new field of detection. Figure 17: Map scanning using a 2D LiDAR sensor. Figure 13.0 Exported scanned map generated by mobile robot exploration. The simulation-based mapping of the environment using a LiDAR sensor plays a critical role in preparing autonomous robotic systems for real-world emergency scenarios.