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 Name | Message type | Callback |
---|---|---|
entry | Transition [movai_msgs-MovAI/TransitionTo] | rotate_entry.cb |
odometry | Odometry [nav_msgs-ROS1/Subscriber] | rotate_odometry.cb |
timer | Timer [movai_msgs-ROS1/Timer] | rotate_timer.cb |
Output List
There are 2 parameters.
Port Name | Message type |
---|---|
cmd_vel | Twist [geometry_msgs-ROS1/Publisher] |
exit | Transition [movai_msgs-MovAI/TransitionFor] |
Parameter List
There are 4 parameters.
Parameter | Description |
---|---|
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. |