ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
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 image guzza  ( 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 image Elizaveta.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 image Elizaveta.Elagina  ( 2015-02-12 09:24:27 -0500 )edit

You need some feedback, probably from an Odometry message.

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

Thank you! I will try that.

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

Question Tools

Stats

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

Seen: 9,075 times

Last updated: Jan 08 '12