rotate()
  • 1 Minute to read

rotate()


Article summary

rotate()

Rotate the robot (left or right).

Reference

Arguments

ArgumentsTypeDefault value
anglefloatThe angle of movement. Positive values will rotate the robot left, and negative values will rotate the robot to the right
angular_velocityfloatRotational velocity[d/s]. Value must be positive
callbackfuncNoneIf you define a callback, it will be called when the movement finishes.
waitboolfalseWait until the movement finishes before moving to the next line of code.
ang_unitANG_UNITANG_UNIT.DEGThe angle's unit for rotation (angle and vx). ANG_UNIT.DEG for degrees, ANG_UNIT.RAD for radians.

Return

None

Exceptions

ExceptionCondition
RayaWrongArgumentDuration is smaller than zero
RayaAlreadyMovingThere is another motion command in progress
RayaBridgeExceptionCommand 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?

What's Next