Ros basics in 5 days - Leftward Drifting of BB8

Hi. I’m trying to navigate the BB8 by giving velocity commands on the /cmd_vel topic using Twist. I’m trying to make it move in a square pattern. In the first forward movement, the robot moves in a straight line perfectly. After it turns right 90 deg and starts the subsequent movements, it keeps turning left. I didn’t give any angular speed at these moments. Any Idea why this is happening?

I gave: move.linear.x = 0.5, move.angular.z = 0. and it still turns left.

Thanks in advance,
Surya

Hello @suryascifi,

Well, that’s really strange. Did you solve this issue? If not, make sure that the angular speed (which is set to 0) is being received by the /cmd_vel topic. Even though you might have it in your code, it can happen that this speed value is not being properly received by the topic due to some bug in the code.

Best,