Download

Rotate a robot around Z

Description

Using odometry as input, this node produces Twist output cmd_vel so that the robot rotates around the Z axis by . GGG

This is a state node. When initiated, it starts publishing Twist messages until the rotation is terminated. Then, it transitions out.

Examples

The following Demos/Flows make use of this node –

Input List

There are 3 parameters.

Port NameMessage typeCallback
entryTransition [movai_msgs-MovAI/TransitionTo]rotate_entry.cb
odometryOdometry [nav_msgs-ROS1/Subscriber]rotate_odometry.cb
timerTimer [movai_msgs-ROS1/Timer]rotate_timer.cb

Output List

There are 2 parameters.

Port NameMessage type
cmd_velTwist [geometry_msgs-ROS1/Publisher]
exitTransition [movai_msgs-MovAI/TransitionFor]

Parameter List

There are 4 parameters.

ParameterDescription
angle[float] The angle (i8n degrees) that the robot rotates on the xy plane. If the value is positive, the robot rotates in the counter clockwise direction and vise versa.
kp[float] A proportional constant for the calculation of angular velocity. The higher the value the bigger the angular velocity of the robot in relation to the angle (in radians) that the robot must rotate.
max_vel[float] Maximum angular velocity (rad/s).
rotation_error[float] Acceptable error in rotation (deg). Only positive values allowed.

More Info