Skip to content

Animate


Animate Arms

  • Description: Animate both of the robot's arms.

  • Args:

    • anim_name (ArmAnimations): The name of the animation to play.
  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "animate_arms",
        "anim_name": anim_name
      }
    }
    

Animate Arm

  • Description: Animate one of the robot's arms.

  • Args:

    • anim_name (ArmAnimations): The name of the animation to play.
    • arm (Arm | list[Arm]): The arm to animate.
  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "animate_arm",
        "anim_name": anim_name,
        "arm": arm
      }
    }
    

Arms Down

  • Description: Move the robot's arms down.

  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "arms_down"
      }
    }
    

Arm Down

  • Description: Move one robot's arm down.

  • Args:

    • arm (Arm | list[Arm]): The arm to animate.
  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "arm_down",
        "arm": arm
      }
    }
    

Wiggle Ears

  • Description: Wiggle the ears back and forth. ⚠️ Note: synchronize_ears may produce unexpected behavior depending on the chosen range.

  • Args:

    • min_range (float): Minimum wiggle range in [0.0, 1.0]. Defaults to 0.5. Defaults to 0.35.
    • max_range (float): Maximum wiggle range in [0.0, 1.0]. Defaults to 1.0. Defaults to 0.75.
    • rounds (int): Number of back-and-forth motions. Defaults to 3. Defaults to 4.
    • synchronize_ears (bool): If True, both ears move together. Disabled by default. Defaults to False.
  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "wiggle_ears",
        "min_range": min_range,
        "max_range": max_range,
        "rounds": rounds,
        "synchronize_ears": synchronize_ears
      }
    }
    

Wiggle Ear

  • Description: Wiggle one ear.

  • Args:

    • ear (Ear): The ear to move.
    • min_range (float): The minimum range of the wiggle (between 0.0 and 1.0). Defaults to 0.5. Defaults to 0.5.
    • max_range (float): The maximum range of the wiggle (between 0.0 and 1.0). Defaults to 1.0. Defaults to 1.0.
    • rounds (int): The number of back-and-forth motions. Defaults to 3. Defaults to 3.
  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "wiggle_ear",
        "ears": ears,
        "min_range": min_range,
        "max_range": max_range,
        "rounds": rounds
      }
    }
    

Hold Hand

  • Description: Play animation to hold hand with specified arm.

  • Args:

    • arm (Arm): The arm to use for holding hand.
  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "hold_hand",
        "arm": arm
      }
    }
    

Reset Ears

  • Description: Reset ears to their nominal position.

  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "reset_ears"
      }
    }
    

Wind Ears

  • Description: Wind the robot's ears.

  • Args:

    • frequency (float): Frequency in Hz to wind ears.
    • min_range (float): Minimum range (between 0 and 1). Defaults to 0.0. Defaults to 0.0.
    • max_range (float): Maximum range (between 0 and 1). Defaults to 1.0. Defaults to 1.0.
  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "wind_ears",
        "frequency": frequency,
        "min_range": min_range,
        "max_range": max_range
      }
    }
    

Sniff Around

  • Description: Make the robot sniff around.

  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "sniff_around"
      }
    }
    

Body Scan

  • Description: Make the robot fake a body scan.

  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "body_scan"
      }
    }
    

Track Neck And Wait Infinitely

  • Description: Set the neck mode to 'track' and select attention preference on something.

  • Args:

    • attention_preference (AttentionPreference): Attention preference 'AttentionPreference.EVERYTHING'. Defaults to AttentionPreference.EVERYTHING.
  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "track_neck_and_wait_infinitely",
        "attention_preference": attention_preference
      }
    }
    

Animate Neck And Wait Infinitely

  • Description: Set the neck mode to 'animate'.

  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "animate_neck_and_wait_infinitely"
      }
    }
    

Freeze Neck And Wait Infinitely

  • Description: Set the neck mode to 'freeze'.

  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "freeze_neck_and_wait_infinitely"
      }
    }
    

Scan Neck And Wait Infinitely

  • Description: Set the neck mode to 'scan'.

  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "scan_neck_and_wait_infinitely"
      }
    }
    

Set Default Head Mode

  • Description: Change the default head mode.

  • Args:

    • head_mode (HeadMode): Target head mode to set as default.
  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "set_default_head_mode",
        "head_mode": head_mode
      }
    }
    

Set Body Posture

  • Description: Set the body posture of the robot.

  • Args:

    • animation_name (PostureState): The posture to set.
  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "set_body_posture",
        "animation_name": animation_name
      }
    }
    

Play Body Animation

  • Description: Robot is performing a full body animation: if arms aren't available, there's no reason to play the anim.

  • Args:

    • animation_name (str): Animation name
    • arm (Arm | None): Specified side (if appliable) Defaults to None.
  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "play_body_animation",
        "animation_name": animation_name
      }
    }
    

Play Animation

  • Description: Play an animation with optional sound and arm movement.

  • Args:

    • animation_name (str): The name of the animation to play.
    • intensity (float): Intensity from 0.0 (low) to 1.0 (high). Defaults to 0.85. Defaults to 1.
    • play_sound (bool): Whether to play a sound linked to the animation. Defaults to True. Defaults to True.
    • disable_arms_animation (bool): if the arms should play the animation. Defaults to False.
  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "play_animation",
        "animation_name": animation_name,
        "intensity": intensity,
        "play_sound": play_sound,
        "disable_arms_animation": disable_arms_animation
      }
    }
    

Set Base Emotion

  • Description: Set an base emotion.

  • Args:

    • animation_name (BaseEmotion): The expressive state.
    • intensity (float): Intensity from 0.0 (low) to 1.0 (high). Defaults to 1.0. Defaults to 1.0.
  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "set_base_emotion",
        "animation_name": animation_name,
        "intensity": intensity
      }
    }
    

Move Ear

  • Description: Move a single ear to a specified target range.

  • Args:

    • ear (Ear): The ear to move.
    • target_range (float): The target position, between 0.0 (min) and 1.0 (max).
    • motion_duration (float): Duration of the ear motion in seconds (maximum 20s). Defaults to 0.5.
    • hold_duration (float | None): Additional hold time in seconds after the move (maximum 20s). If None, no hold is added. Defaults to None.
  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "move_ear",
        "ear": ear,
        "target_range": target_range,
        "motion_duration": motion_duration,
        "hold_duration": hold_duration
      }
    }
    

Move Ears

  • Description: Move both ears to specified target ranges.

  • Args:

    • left_target_range (float): Target position for the left ear.
    • right_target_range (float): Target position for the right ear.
    • motion_duration (float): Duration of the ears motion in seconds (maximum 20s). Defaults to 0.5.
    • hold_duration (float | None): Additional hold time in seconds after the move (maximum 20s). If None, no hold is added. Defaults to None.
  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "move_ears",
        "left_target_range": left_target_range,
        "right_target_range": right_target_range,
        "motion_duration": motion_duration,
        "hold_duration": hold_duration
      }
    }
    

Change Default Base Emotion

  • Description: Change the default expressive background animation settings.

  • Args:

    • animation_name (BaseEmotion | None): The new animation name, if changing. Defaults to None.
    • intensity (float | None): The new intensity, from 0.0 to 1.0, if changing. Defaults to None.
  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "change_default_base_emotion",
        "animation_name": animation_name,
        "intensity": intensity
      }
    }
    

Change Default Interactive State

  • Description: Change the default interactive state settings.

  • Args:

    • animation_name (InteractiveState | None): The new animation name, if changing. Defaults to None.
    • intensity (float | None): The new intensity, from 0.0 to 1.0, if changing. Defaults to None.
  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "change_default_interactive_state",
        "animation_name": animation_name,
        "intensity": intensity
      }
    }
    

Reset Background Animations

  • Description: Reset all background animations to their standard/default state.

  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "reset_background_animations"
      }
    }
    

Set Interactive State

  • Description: Set an interactive background animation. This interactive state will complete when parent skill is complete or skill is canceled.

  • Args:

    • animation_name (InteractiveState): The interactive state.
    • intensity (float): Intensity from 0.0 (low) to 1.0 (high). Defaults to 1.0. Defaults to 1.0.
  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "set_interactive_state",
        "animation_name": animation_name,
        "intensity": intensity
      }
    }
    

Enable Animated Arms

  • Description: Enable or Disable the following of animations (from the animations engine) on the arms.

  • Args:

    • enable_arms (bool): If the arms should follows the animations.
  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "enable_animated_arms",
        "enable_arms": enable_arms
      }
    }
    

Cancel Sound

  • Description: Cancel the currently playing sound, if any.

  • Args:

    • sound_name (SoundName): The name of the sound to cancel.
  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "cancel_sound",
        "sound_name": sound_name
      }
    }
    

Play Sound

  • Description: Play a sound by name, from a random selection or by specifying energy and index. Check folder ~/install/share/assets/animation_sounds to get the naming of sound animation set

  • Args:

    • sound_name (SoundName): Sound to play
    • energy (str): Energy level of the sound to use ("low", "medium", or "high"). Change the set variant. Defaults to "low". Defaults to 'low'.
    • index (int | None): Variation index to play. If None, one audio is selected randomly from the chosen energy level. Defaults to None. Defaults to None.
  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "play_sound",
        "sound_name": sound_name,
        "energy": energy,
        "index": index
      }
    }
    

Change Frequency Wind Ears

  • Description: Change the frequency of the wind ears animation.

  • Args:

    • frequency (float): The frequency in Hz for the wind ears motion.
  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "change_frequency_wind_ears",
        "frequency": frequency
      }
    }
    

Wake Up

  • Description: Wake up the robot.

  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "wake_up"
      }
    }
    

Set Neck Orientation

  • Description: Set the neck orientation in radians.

  • Args:

    • roll (float): The roll angle in radians. Defaults to 0.0.
    • pitch (float): The pitch angle in radians. Defaults to 0.0.
    • yaw (float): The yaw angle in radians. Defaults to 0.0.
    • reset_target_after (bool): in track mode, only the roll is applyed, Defaults to False. Defaults to False.
    • wait_infinitely (bool): True if wait infinitely, otherwise use default neck behavior Defaults to True.
  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "set_neck_orientation",
        "roll": roll,
        "pitch": pitch,
        "yaw": yaw,
        "reset_target_after": reset_target_after,
        "wait_infinitely": wait_infinitely
      }
    }
    

Reset Neck Orientation

  • Description: Reset target applied to the neck.

  • Endpoint: /api/v2/commands/skill/

  • HTTP Method: POST

  • Type of Argument: Dict

  • JSON Example:

    {
      "command": "skill",
      "value": {
        "name": "reset_neck_orientation"
      }
    }