[Solved] Problem with calculating angle between ROSbot and wall

I found the error, I am ashamed :frowning: . Should be:

def calculate_angle(l, l1, alfa):
angle = atan((l1 * cos(radians(alfa)) - l) / (l1 * sin(radians(alfa))))
return degrees(angle)