animation()
  • 1 Minute to read

animation()


Article summary

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

Reference

Arguments

ArgumentsTypeDefault valueExplenation
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

Exceptions

ExceptionCondition
RayaBridgeExceptionCommand was not accepted properly

See the complete list of Raya Exceptions.

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