animation()¶
A method that will play a specified animation on the specified group.
Reference¶
Arguments¶
Arguments |
Type |
Default value |
Explanation |
|---|---|---|---|
group |
|
name of the predefined LED’s group. |
|
color |
|
name of the predefined LED’s color. |
|
animation |
|
name of the predefined LED’s animation you want to play. |
|
speed |
|
1 |
sets the speed that the animation will play, 0 is not allowd. |
repetitions |
|
1 |
number of the times the animation will play. if set 0 - the animation will play forever. |
execution_control |
|
|
See enumerations to set the animation to be overridden. |
callback_feedback |
|
|
If you define a feedback callback, it will receive feedback during the movement. |
callback_finish |
|
|
If you define a finish callback, it will be called when the movement finishes or is interrupted. |
Return¶
None
Exceptions¶
RayaLedsWrongGroupRayaLedsWrongColorRayaLedsWrongAnimationNameRayaLedsWrongRepetitionsRayaLedsWrongSpeed
See the complete 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