Rotating 90 degrees

Hi @kailin.tong
I had the same problem. The issue is that if you turn too fast, things dont work. Also the robot has to accelerate to that speed and then decelerate, making it inaccurate. Try setting your angular speed to 0.2 and turning it for 4 seconds and adjust going from there.

Another tip: when implementing this later in a loop to move in a square path, make sure you use rospy.Rate(10).sleep()
If you send /cmd_vel commands too quickly, things get fucked.

use linear and angular speed smaller than 0.3
use a rate of 10hz for your loops

1 Like