rotate()
- 1 Minute to read
rotate()
- 1 Minute to read
Article summary
Did you find this summary helpful?
Thank you for your feedback
rotate()
Rotate the robot (left or right).
Reference
Arguments
Arguments | Type | Default value | |
---|---|---|---|
angle | float | The angle of movement. Positive values will rotate the robot left, and negative values will rotate the robot to the right | |
angular_velocity | float | Rotational velocity[d/s]. Value must be positive | |
callback | func | None | If you define a callback, it will be called when the movement finishes. |
wait | bool | false | Wait until the movement finishes before moving to the next line of code. |
ang_unit | ANG_UNIT | ANG_UNIT.DEG | The angle's unit for rotation (angle and vx). ANG_UNIT.DEG for degrees, ANG_UNIT.RAD for radians. |
Return
None
Exceptions
Exception | Condition |
---|---|
RayaWrongArgument | Duration is smaller than zero |
RayaAlreadyMoving | There is another motion command in progress |
RayaBridgeException | Command was rejected by bridge |
See the complete list of Raya Exceptions.
Example
Rotate to the left for 15 degrees with velocity of 1 degrees per second:
await motion.rotate(angle = 15.0, angular_velocity=1.0, wait=True)
Was this article helpful?