Nowadays, robots have become a most crucial role. With technology development, we can do so many things using robotic technology. There are lots of projects in which robots move in a known area. This study proposes a mechanism to move a robot in an unknown area. We can use this kind of robot in hazardous environments, and we can use this robot in several ways. The proposed system is based on the Robotic Operation System (ROS) and the simulator Gazebo. The obstacle avoidance part is done using a laser sensor. After that, there should be a direction-changing mechanism in the developing algorithm. That implemented using loops. Because after the robot changes direction, it again needs to check whether another object is there in the navigated location. The proposed algorithm was developed with the autonomous navigation mechanism. Map generation is another functionality of this project. It is done using Simultaneous Localization And Mapping (SLAM). Map visualization was done using the Rviz application. With the robot’s movement, the robot’s current position is calculated using x, y, and z coordinates. Also, this project has included reverse navigation functionality. Reverse navigation is a novel section in this research work. The objective of this study and the outcome is to move the robot without having any crashes. Also, we can use this to evaluate dangerous areas. Experimental results of the direction and velocity changes have been mentioned in the results and discussion section.