Hi @d.zablah, welcome to the community…
The use of rate.sleep()
in your rotate()
function is causing this issue,
rospy.Rate
convenience class is used to maintaining a particular rate for a loop and isn’t the most appropriate method for your current application.
I replaced rate.sleep()
with rospy.sleep(2)
and your bb8 was taking turns just fine.
Happy learning …!!