Ask Your Question
1

How to make the Turtlebot rotate in place a set # of degrees/radians

asked 2012-01-08 03:25:01 -0500

guzza gravatar image

I looked at the geometry_msgs::Twist class but that allows you to only set the velocity of a turn. I want to make the turtlebot slowly rotate in place a set number of radians/degrees on command.

Thanks!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
5

answered 2012-01-08 04:36:04 -0500

joq gravatar image

Keep sending a Twist messages with your desired yaw rate (angular.z in radians/sec) until it reaches the desired heading. Then, start sending Twist with a zero yaw rate.

edit flag offensive delete link more

Comments

Thanks this worked out!
guzza gravatar imageguzza ( 2012-01-09 13:20:37 -0500 )edit

I have the same question. I wonder if it's possible to send the desired radian/degree as a parameter to the programme? So that when I run the script it automatically rotates a desired degree.

Elizaveta.Elagina gravatar imageElizaveta.Elagina ( 2015-02-12 09:23:49 -0500 )edit

Maybe I didn't get your advice right, but how do I fixate the moment it reached the desired heading given that I set only the velocity?

Elizaveta.Elagina gravatar imageElizaveta.Elagina ( 2015-02-12 09:24:27 -0500 )edit

You need some feedback, probably from an Odometry message.

joq gravatar imagejoq ( 2015-02-12 10:30:01 -0500 )edit

Thank you! I will try that.

Elizaveta.Elagina gravatar imageElizaveta.Elagina ( 2015-02-13 07:57:09 -0500 )edit

Your Answer

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

Add Answer

Question Tools

Stats

Asked: 2012-01-08 03:25:01 -0500

Seen: 6,515 times

Last updated: Jan 08 '12