animation()
  • 1 Minute to read

animation()


Article summary

A method that will play a specified animation on the specified group.

Reference

Arguments

ArgumentsTypeDefault valueExplanation
groupstringname of the predefined led's group.
colorstringname of the predefined led's color.
animationstringname of the predefined led's animation you want to play.
speedint1sets the speed that the animation will play, 0 is not allowd.
repetitionsint1number of the times the animation will play. if set 0 - the animation will play forever.
execution_controlenumEXECUTION.CONTROL.OVERRIDEEnumeration to set the animation to be overridden.
callback_feedbackcallableNoneIf you define a feedback callback, it will receive feedback during the movement.
callback_finishcallableNoneIf you define a finish callback, it will be called when the movement finishes or is interrupted.

Return

None

Exceptions

  • RayaLedsWrongGroup
  • RayaLedsWrongColor
  • RayaLedsWrongAnimationName
  • RayaLedsWrongRepetitions
  • RayaLedsWrongSpeed

See the complete LEDs exceptions.

Usage example

Give an order for UR robot to play an animation on the head led, with the color red, at the default speed of 1, and do it once.

leds.animation(group = 'head', color= 'red', animation= 'waiting', speed=1, repetitions= 1)

Notice:

If no speed was specified, the default speed would be 1.
setting repetitions = 0 will make the robot play the animation indefinitely


Was this article helpful?

What's Next