Ask Your Question

TurtleBot ROS - How to move to specific angle (using Twist)

asked 2016-01-12 11:43:54 -0500

Guy Peled gravatar image


I'm trying to set a specific angle for the robot.

I'm using simple python script I found here:

I am able to get IMU messages and get the current angle (in degree), by listening to "/mobile_base/sensors/imu_data", and take the yaw from data.orientation, and also to make the robot 'twist' by setting move_cmd.angular.z.

But how can I tell the robot to go to exact angle, without an ugly loop that trying to get near my desired angle?


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2016-01-13 04:38:38 -0500

dfornas gravatar image

What do you want is a controller. If the TurtleBot doesn't come with one you should implement it. As you say the easiest way to do it is to make a node that listens for desired poses and sends a twist to the robot. The most straightforward is the porportional control in which the speed is proportional to the desired angle. Of course there are other options but I don't see why is this ugly.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools


Asked: 2016-01-12 11:43:54 -0500

Seen: 620 times

Last updated: Jan 13 '16