[Solved] ROS, problem with robot which turns right

Hello Quarkpol,

By checking only one value from laser scanner, you will get correct measurement only with ROSbot positioned parallel to wall. When ROSbot turns in order to drive closer to wall, your measurement will be increased by 1/cos(α) where α is angle ROSbot and wall. The more ROSbot is turning towards the wall, the more incorrect value you are using. I would suggest you to use more values, eg. 20 points from lidar and extract wall distance and orientation from it.

Regards,
Łukasz