In the description, it has been given to consider the laser ray that makes 90 degrees with the front of the robot. I have been considered that and when distance > 0.3, it goes towards the wall but it does not turn. I checked the distance and even though the robot is approaching the wall, the distance does not decrease below 0.3. Can anyone suggest what to do?
Maybe you are looking at the wrong laser value. A good idea is to just look at the
/scan (you can make a script to print only the scan value you want) topic while your robot is moving towards the wall. Is the distance decreasing? If it isn’t, then you know you’re looking at the wrong value.