Skills (User)

Animate

This module contains the animate-related features of the robot.

class pymirokai.features.skills.user.animate.AnimateUser

Bases: object

Class to handle animate-related features of the robot.

animate_arm(anim_name, arm)

Animate one of the robot’s arms.

Parameters:
  • anim_name (ArmAnimations) – The name of the animation to play.

  • arm (Arm) – The arm to animate.

Return type:

Mission

Returns:

Mission – The mission representing the animation task.

animate_arms(anim_name)

Animate both of the robot’s arms.

Parameters:

anim_name (ArmAnimations) – The name of the animation to play.

Return type:

Mission

Returns:

Mission – The mission representing the animation task.

animate_neck_and_wait_infinitely()

Set the neck mode to ‘animate’.

Return type:

Mission

Returns:

Mission – The mission representing the task.

arms_down()

Move the robot’s arms down.

Return type:

Mission

Returns:

Mission – The mission representing the task.

body_scan()

Make the robot fake a body scan.

Return type:

Mission

Returns:

Mission – The mission representing the task.

cancel_sound(sound_name)

Cancel the currently playing sound, if any.

Parameters:

sound_name (SoundName) – The name of the sound to cancel.

Return type:

Mission

Returns:

Mission – The mission representing the cancel operation.

change_default_base_emotion(animation_name=None, intensity=None)

Change the default expressive background animation settings.

Parameters:
  • animation_name (BaseEmotion | None) – The new animation name, if changing.

  • intensity (float | None) – The new intensity, from 0.0 to 1.0, if changing.

Return type:

Mission

Returns:

Mission – The mission representing the change operation.

change_default_interactive_state(animation_name=None, intensity=None)

Change the default interactive state settings.

Parameters:
  • animation_name (InteractiveState | None) – The new animation name, if changing.

  • intensity (float | None) – The new intensity, from 0.0 to 1.0, if changing.

Return type:

Mission

Returns:

Mission – The mission representing the change operation.

change_frequency_wind_ears(frequency)

Change the frequency of the wind ears animation.

Parameters:

frequency (float) – The frequency in Hz for the wind ears motion.

Return type:

Mission

Returns:

Mission – The mission representing the frequency change.

enable_animated_arms(enable_arms)

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

Parameters:

enable_arms (bool) – If the arms should follows the animations.

Return type:

Mission

Returns:

Mission – The mission representing the background animation task.

freeze_neck_and_wait_infinitely()

Set the neck mode to ‘freeze’.

Return type:

Mission

Returns:

Mission – The mission representing the task.

hold_hand(arm)

Play animation to hold hand with specified arm.

Parameters:

arm (Arm) – The arm to use for holding hand.

Return type:

Mission

Returns:

Mission – The mission representing the task.

lets_dance()

Put the robot’s arms in dance position.

Return type:

Mission

Returns:

Mission – The mission representing the task.

move_ear(ear, target_range)

Move a single ear to a specified target range.

Parameters:
  • ear (Ear) – The ear to move.

  • target_range (float) – The target position, between 0.0 (min) and 1.0 (max).

Return type:

Mission

Returns:

Mission – The mission representing the ear movement task.

move_ears(left_target_range, right_target_range)

Move both ears to specified target ranges.

Parameters:
  • left_target_range (float) – Target position for the left ear.

  • right_target_range (float) – Target position for the right ear.

Return type:

Mission

Returns:

Mission – The mission representing the ears movement task.

play_animation(animation_name, intensity=0.85, play_sound=True)

Play an animation with optional sound and arm movement.

Parameters:
  • animation_name (Animation) – The animation to play.

  • intensity (float, optional) – Intensity from 0.0 (low) to 1.0 (high). Defaults to 0.85.

  • play_sound (bool, optional) – Whether to play a sound linked to the animation. Defaults to True.

Return type:

Mission

Returns:

Mission – The mission representing the animation task.

play_sound(sound_name)

Play a sound by name.

Parameters:

sound_name (SoundName) – The name of the sound to play.

Return type:

Mission

Returns:

Mission – The mission representing the play sound operation.

reset_background_animations()

Reset all background animations to their standard/default state.

Return type:

Mission

Returns:

Mission – The mission representing the reset operation.

reset_ears()

Reset ears to their nominal position.

Return type:

Mission

Returns:

Mission – The mission representing the task.

reset_neck_orientation()

Reset target applied to the neck.

Return type:

Mission

Returns:

Mission – The mission representing the neck orientation reset.

scan_neck_and_wait_infinitely()

Set the neck mode to ‘scan’.

Return type:

Mission

Returns:

Mission – The mission representing the task.

set_base_emotion(animation_name, intensity=1.0)

Set an base emotion.

Parameters:
  • animation_name (BaseEmotion) – The expressive state.

  • intensity (float, optional) – Intensity from 0.0 (low) to 1.0 (high). Defaults to 1.0.

Return type:

Mission

Returns:

Mission – The mission representing the background animation task.

set_body_posture(animation_name)

Set the body posture of the robot.

Parameters:

animation_name (PostureState) – The posture to set.

Return type:

Mission

Returns:

Mission – The mission representing the posture task.

set_default_head_mode(head_mode)

Change the default head mode.

Parameters:

head_mode (HeadMode) – Target head mode to set as default.

Return type:

Mission

Returns:

Mission – The mission representing the task.

set_interactive_state(animation_name, intensity=1.0)

Set an interactive background animation.

Parameters:
  • animation_name (InteractiveState) – The interactive state.

  • intensity (float, optional) – Intensity from 0.0 (low) to 1.0 (high). Defaults to 1.0.

Return type:

Mission

Returns:

Mission – The mission representing the background animation task.

set_neck_orientation(roll=0.0, pitch=0.0, yaw=0.0, reset_target_after=False, wait_infinitely=True)

Set the neck orientation in radians.

Parameters:
  • roll (float) – The roll angle in radians.

  • pitch (float) – The pitch angle in radians.

  • yaw (float) – The yaw angle in radians.

  • reset_target_after (bool, optional) – in track mode, only the roll is applyed, Defaults to False.

  • wait_infinitely (bool) – True if wait infinitely, otherwise use default neck behavior

Return type:

Mission

Returns:

Mission – The mission representing the neck orientation operation.

sniff_around()

Make the robot sniff around.

Return type:

Mission

Returns:

Mission – The mission representing the task.

track_neck_and_wait_infinitely(focus_on='everything')

Set the neck mode to ‘track’ and focus on something.

Parameters:

focus_on (str, optional) – Focus mode (everything, handles, humans, deposit_zone, or firefly). Defaults to ‘everything’.

Return type:

Mission

Returns:

Mission – The mission representing the task.

wake_up()

Wake up the robot.

Return type:

Mission

Returns:

Mission – The mission representing the wake-up operation.

wiggle_ear(ear, min_range=0.5, max_range=1.0, rounds=3)

Wiggle one ear.

Parameters:
  • ear (Ear) – The ear to move.

  • min_range (float, optional) – The minimum range of the wiggle (between 0.0 and 1.0). Defaults to 0.5.

  • max_range (float, optional) – The maximum range of the wiggle (between 0.0 and 1.0). Defaults to 1.0.

  • rounds (int, optional) – The number of back-and-forth motions. Defaults to 3.

Return type:

Mission

Returns:

Mission – The mission representing the task.

Raises:

RuntimeError – If the ear is not valid.

wiggle_ears(min_range=0.35, max_range=0.75, rounds=4, synchronize_ears=False)

Wiggle the ears back and forth.

⚠️ Note: synchronize_ears may produce unexpected behavior depending on the chosen range.

Parameters:
  • min_range (float, optional) – Minimum wiggle range in [0.0, 1.0]. Defaults to 0.5.

  • max_range (float, optional) – Maximum wiggle range in [0.0, 1.0]. Defaults to 1.0.

  • rounds (int, optional) – Number of back-and-forth motions. Defaults to 3.

  • synchronize_ears (bool) – If True, both ears move together. Disabled by default.

Return type:

Mission

Returns:

Mission – The mission representing the task.

wind_ears(frequency, min_range=0.0, max_range=1.0)

Wind the robot’s ears.

Parameters:
  • frequency (float) – Frequency in Hz to wind ears.

  • min_range (float, optional) – Minimum range (between 0 and 1). Defaults to 0.0.

  • max_range (float, optional) – Maximum range (between 0 and 1). Defaults to 1.0.

Return type:

Mission

Returns:

Mission – The mission representing the task.

Freeze

This module contains the freeze-related features of the robot.

class pymirokai.features.skills.user.freeze.FreezeUser

Bases: object

Class to handle freeze-related features of the robot.

stop_lower_priority_actions()

Stop all of the robot’s lower priority actions.

Return type:

Mission

Returns:

Mission – The mission representing the task.

Interact

This module contains the interact-related features of the robot.

class pymirokai.features.skills.user.interact.InteractUser

Bases: object

Class to handle interact-related features of the robot.

acknowledge_engagement()

Acknowledge engagement with the robot.

Return type:

Mission

Returns:

Mission – The mission representing the task.

check_internet_connectivity()

Check current internet connectivity.

Return type:

Mission

Returns:

Mission – The mission representing the task.

checkup_ears()

Check mirokai ears.

Return type:

Mission

Returns:

Mission – The mission representing the task.

describe_what_you_see(language=None)

Describe the robot’s surroundings by taking a picture.

WARNING: This function uploads the picture to a cloud service for processing.

Parameters:

language (str) – The language in which to describe the surroundings. Defaults to “en”.

Return type:

Mission

Returns:

Mission – The mission representing the task.

express_joy()

Express joy.

Return type:

Mission

Returns:

Mission – The mission representing the task.

happy_kiss()

Send a happy kiss.

Return type:

Mission

Returns:

Mission – The mission representing the task.

high_five(arm)

High five wiht user.

Parameters:

arm (Arm) – The arm to use for the high five. If None, the robot will randomly choose an arm.

Return type:

Mission

Returns:

Mission – The mission representing the task.

japanese_greeting()

Do a japanese greeting.

Return type:

Mission

Returns:

Mission – The mission representing the task.

kiss()

Perform a kiss action.

Return type:

Mission

Returns:

Mission – The mission representing the task.

point_at_2d_camera_point(point2d=None)

Point at a 2D camera point.

Parameters:

point2d (list) – Target to point at, 2d coordinates in the form [x, y]

Return type:

None

Returns:

str – The last autonomous planning result.

say(something)

Say something with emotion and autonomous reaction.

Parameters:

something (str) – The text to say.

Return type:

Mission

Returns:

Mission – The mission representing the task.

shake_hand()

Shake hand.

Return type:

Mission

Returns:

Mission – The mission representing the task.

shy_kiss()

Send a shy kiss.

Return type:

Mission

Returns:

Mission – The mission representing the task.

silence()

Current full TTS queue.

Return type:

Mission

Returns:

Mission – The mission representing the task.

soft_coo()

Produce a cooing sound.

Return type:

Mission

Returns:

Mission – The mission representing the task.

start_conversation()

Activate llm and enable the conversation.

Return type:

Mission

Returns:

Mission – The mission representing the task.

start_or_stop_actions_by_voice()

Deactivate or activate actions by voice.

Return type:

Mission

Returns:

Mission – The mission representing the task.

start_or_stop_conversation()

Deactivate llm and disable the conversation or Activate llm and enable the conversation.

Return type:

Mission

Returns:

Mission – The mission representing the task.

stop_conversation()

Deactivate llm and disable the conversation.

Return type:

Mission

Returns:

Mission – The mission representing the task.

wave(arm)

Wave with a specified arm or both arms.

Parameters:

arm (Arm) – The arm to use for waving. If None, the robot waves with both arms.

Return type:

Mission

Returns:

Mission – The mission representing the task.

Manipulate

This module contains the manipulate-related features of the robot.

class pymirokai.features.skills.user.manipulate.ManipulateUser

Bases: object

Class to handle manipulate-related features of the robot.

close_both_hands()

Close the robot’s hands.

Return type:

Mission

Returns:

Mission – The mission representing the task.

close_hand(arm)

Close the robot’s hand.

Parameters:

arm (Arm) – The hand to close (left or right).

Return type:

Mission

Returns:

Mission – The mission representing the task.

drop_everything()

Drop what the robot has on its hands.

Return type:

Mission

Returns:

Mission – The mission representing the task.

drop_handle()

Drop a handle.

Return type:

Mission

Returns:

Mission – The mission representing the task.

drop_on_deposit_any_handle()

Drop the handle in front of the robot.

Return type:

Mission

Returns:

Mission – The mission representing the task.

drop_on_deposit_handle_with_left_hand()

Drop the handle in front of the robot with left hand.

Return type:

Mission

Returns:

Mission – The mission representing the task.

drop_on_deposit_handle_with_right_hand()

Drop the handle in front of the robot with right hand.

Return type:

Mission

Returns:

Mission – The mission representing the task.

drop_tray()

Drop the tray the robot is holding.

Return type:

Mission

Returns:

Mission – The mission representing the task.

grasp_any_object()

Grasp the handle in front of the robot.

Return type:

Mission

Returns:

Mission – The mission representing the task.

grasp_object_with_human(rune, arm=None)

Grasp a handle presented by a human.

Parameters:
  • rune (EnchantedObject) – The object/handle rune to grasp.

  • arm (Arm | None) – Preferred arm to use (Arm.LEFT / Arm.RIGHT). If None, the robot chooses automatically.

Return type:

Mission

Returns:

Mission – The mission representing the task.

grasp_object_with_left_hand()

Grasp the handle in front of the robot with left hand.

Return type:

Mission

Returns:

Mission – The mission representing the task.

grasp_object_with_right_hand()

Grasp the handle in front of the robot with right hand.

Return type:

Mission

Returns:

Mission – The mission representing the task.

open_both_hands()

Open the robot’s hands.

Return type:

Mission

Returns:

Mission – The mission representing the task.

open_both_hands_without_precondition()

Open the robot’s hands without precondition.

Return type:

Mission

Returns:

Mission – The mission representing the task.

open_hand(arm)

Open the robot’s hand.

Parameters:

arm (Arm) – The hand to open (left or right).

Return type:

Mission

Returns:

Mission – The mission representing the task.

open_hand_half(arm)

Open the robot’s hand halfway.

Parameters:

arm (Arm) – The hand to open halfway (left or right).

Return type:

Mission

Returns:

Mission – The mission representing the task.

open_hand_without_precondition(arm)

Open the robot’s hand without precondition.

Parameters:

arm (Arm) – The hand to open (left or right).

Return type:

Mission

Returns:

Mission – The mission representing the task.

Navigate

This module contains the navigate-related features of the robot.

class pymirokai.features.skills.user.navigate.NavigateUser

Bases: object

Class to handle navigate-related features of the robot.

add_new_location_at_robot_position(location_name)

Add a new location in a persistent way where the robot is currently.

Parameters:

location_name (str) – Name of the location to add.

Return type:

Mission

Returns:

Mission – The mission representing the task.

distribute_something_in_tray(what_is_in_the_tray)

Distributes an item in a tray by navigating to different locations and showing the tray to detected users.

The function performs two things steps: 1. Navigates to different locations and waits at each spot. 2. If a user is detected 2.1. We Cancel navigation 2.2. We Show the tray to users 2.3. We ask if he wants the item in the tray.

Parameters:

what_is_in_the_tray (str) – What is in the tray.

Return type:

Mission

Returns:

Mission – The mission representing the task.

follow_user(rune)

Follow a user.

Parameters:

rune (EnchantedUser) – The rune of the user to follow.

Return type:

Mission

Returns:

Mission – The mission representing the task.

get_current_location()

Get the robot’s current location.

Returns the current location if known.

Return type:

Mission

Returns:

Mission – The mission representing the task.

go_to_absolute(coordinates)

Go to an absolute position.

Parameters:

coordinates (Coordinates) – Coordinates for the absolute position.

Return type:

Mission

Returns:

Mission – The mission representing the task.

go_to_location(location)

Go to a specific location.

Parameters:

location (Rune) – The location to go to.

Return type:

Mission

Returns:

Mission – The mission representing the task.

go_to_relative(coordinates)

Go to a relative position.

Parameters:

coordinates (Coordinates) – Coordinates for the relative position.

Return type:

Mission

Returns:

Mission – The mission representing the task.

go_to_rune(rune)

Go to a specific rune.

Parameters:

rune (Rune) – The rune to go to.

Return type:

Mission

Returns:

Mission – The mission representing the task.

move_backward(distance_meters=1.0)

Move backward a certain distance.

Parameters:

distance_meters (float) – The distance to move backward, in meters.

Return type:

Mission

Returns:

Mission – The mission representing the task.

move_forward(distance_meters=1.0)

Move forward a certain distance.

Parameters:

distance_meters (float) – The distance to move forward, in meters.

Return type:

Mission

Returns:

Mission – The mission representing the task.

move_left_side(distance_meters=1.0)

Move left side a certain distance.

Parameters:

distance_meters (float) – The distance to move on the left side, in meters.

Return type:

Mission

Returns:

Mission – The mission representing the task.

move_right_side(distance_meters=1.0)

Move right side a certain distance.

Parameters:

distance_meters (float) – The distance to move on the right side, in meters.

Return type:

Mission

Returns:

Mission – The mission representing the task.

stop_moving()

Stop the robot’s movement.

Return type:

Mission

Returns:

Mission – The mission representing the task.

teleoperate(enable)

Enable or disable robot teleoperation.

Parameters:

enable (bool) – Enable or disable teleoperation

Return type:

Mission

Returns:

Mission – The mission representing the task.

track_rune(rune)

Track a rune.

Parameters:

rune (Rune) – The rune to track.

Return type:

Mission

Returns:

Mission – The mission representing the task.

turn(degrees=90.0, direction=Direction.LEFT, duration=datetime.timedelta(days=-1, seconds=86399))

Turn the robot by a certain angle.

Parameters:
  • degrees (float, optional) – Angle in degrees (positive values only). Defaults to 90.0.

  • direction (Direction | None) – Explicit direction override (Direction.LEFT or Direction.RIGHT). If None, the sign of degrees or internal policy is used.

  • speed (float | None) – Optional angular speed.

  • duration (float | None) – Optional time (seconds) to complete the turn. If provided, it overrides speed-based timing.

Return type:

Mission

Returns:

Mission – The mission representing the task.

turn_back()

Turn back the robot.

Return type:

Mission

Returns:

Mission – The mission representing the task.

turn_to_rune(rune)

Turn specific rune and stop moving.

Parameters:

rune (Rune) – The rune to turn to.

Return type:

Mission

Returns:

Mission – The mission representing the task.

Show-Off

This module contains the show_off-related features of the robot.

class pymirokai.features.skills.user.show_off.ShowOffUser

Bases: object

Class to handle show_off-related features of the robot.

blow_bubbles(skill_cache, device_name='Bulleur', duration_s=20)

Blow bubbles.

Return type:

Mission

Returns:

Mission – The mission representing the task.

Parameters:
  • skill_cache (dict)

  • device_name (str)

  • duration_s (int)

checkout_ears()

Check out the robot’s ears.

Return type:

Mission

Returns:

Mission – The mission representing the task.

curl()

Perform a curl action.

Return type:

Mission

Returns:

Mission – The mission representing the task.

dab()

Performs a dab gesture.

Return type:

Mission

Returns:

Mission – The mission representing the task.

discover_body()

Discover the robot’s body.

Return type:

Mission

Returns:

Mission – The mission representing the task.

fist_bump(arm)

Perform a fist bump with the specified arm, then the robot puts its arms down back.

Parameters:

arm (Arm | None) – The hand to use for the fist bump.

Return type:

Mission

Returns:

Mission – The mission representing the task.

fist_bump_posture(arm=None)

Put the arm in a fist bump posture.

Parameters:

arm (Arm | None) – The hand to use for the fist bump.

Return type:

Mission

Returns:

Mission – The mission representing the task.

give_both_hands()

Give both hands.

Return type:

Mission

Returns:

Mission – The mission representing the task.

give_hand()

Give a hand.

Return type:

Mission

Returns:

Mission – The mission representing the task.

look_around()

Plays ‘look_around’ animation with arms.

Return type:

Mission

Returns:

Mission – The mission representing the task.

mirokai_spin()

Spin around.

Return type:

Mission

Returns:

Mission – The mission representing the task.

mirokai_spin_short()

Spin around briefly.

Return type:

Mission

Returns:

Mission – The mission representing the task.

nose_dive()

Perform a nose dive action.

Return type:

Mission

Returns:

Mission – The mission representing the task.

raise_arms()

Raise the robot’s arms.

Return type:

Mission

Returns:

Mission – The mission representing the task.

show_off_with_arms()

Show off with the robot’s arms.

Return type:

Mission

Returns:

Mission – The mission representing the task.

stretch_body_long()

Mirokaï raises its arms to stretch then perform some arms motions.

Return type:

Mission

Returns:

Mission – The mission representing the task.

stretch_body_short()

Mirokaï raises its arms to stretch.

Return type:

Mission

Returns:

Mission – The mission representing the task.

System

This module contains system-related features of the robot.

class pymirokai.features.skills.user.system.SystemUser

Bases: object

Class to handle system-related features of the robot.

enable_motor_functions()

Calibrate and enable motor functions of the robot.

Return type:

Mission

Returns:

Mission – The mission representing the task.

get_battery_level()

Get current battery level.

Return type:

Mission

Returns:

Mission – The mission representing the task.

get_prompt()

Get current prompt of the robot.

Return type:

Mission

Returns:

Mission – The mission representing the task.

Transport

This module contains the transport-related features of the robot.

class pymirokai.features.skills.user.transport.TransportUser

Bases: object

Class to handle transport-related features of the robot.

grasp_handle_on_deposit(rune)

Grasp a handle at a deposit zone.

Parameters:

rune (EnchantedObject) – The enchanted object representing the handle.

Return type:

Mission

Returns:

Mission – The mission representing the task.

put_down_handle_on_deposit(handle, destination)

Place a handle at a specified deposit zone.

Parameters:
Return type:

Mission

Returns:

Mission – The mission representing the task.