| turn | Index |
Overview
The turn primitive causes the robot to rotate about one wheel. The monitor keeps track of obstructions, edges, stalls, and other boundary conditions. The current speed setting for the robot is used for the motion and smooth ramping is used to create a fluid movement. The robot's encoders are used to resolve the requested turn with high accuracy.
The robot only checks for front obstacles when the turning wheel is moving forward and only checks for rear obstacles when the turning wheel is moving backward. Thresholds for front and rear obstacle detection may be adjusted by modifying the front-ranger-threshold and rear-ranger-threshold properties of the Garcia object. These properties may also be set within an XML script by using a global primitive.
Defined values that may be used as turn parameters can be found in the aGarciaDefs.tea file in the aSystem subfolder of the brainstem directory tree.
Return Status
This primitive returns either a succesful completion or the condition that terminated the motion.
Property Inheritance
turn inherits Behavior inherits Object properties.
| Properties |
| side angle |
side (int) The wheel which will move during the turn. The other wheel will maintain a velocity of 0. Using the defined value aGARCIA_MOTO_MOTOR_RIGHT will make Garcia turn by driving the right wheel. Using the defined value aGARCIA_MOTO_MOTOR_LEFT will make Garcia turn by driving the left wheel. |
angle (float) The angle for the turn. The direction of rotation (clockwise or counter-clockwise) depends on which wheel is moving and the sign of the angle. The value must be in units specified by the Garcia Object's angle-units property. |