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 the robot’s arm.

Parameters:
  • anim_name (str) – 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 (str) – 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

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.

freeze_neck_and_wait_infinitely()

Set the neck mode to ‘freeze’.

Return type:

Mission

hold_hand(hand)

Play animation to hold hand with specified arm.

Return type:

Mission

Returns:

Mission – The mission representing the task.

Parameters:

hand (Hand)

lets_dance()

Put robot’s arm in dance position.

Return type:

Mission

Returns:

Mission – The mission representing the task.

move_ear_to_target(ear, target_range)

Move a ear to a target range.

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

  • target_range (float) – The target range to move the ear to (between 0.0 and 1.0).

Return type:

Mission

Returns:

Mission – The mission representing the task.

Raises:

RuntimeError – If the ear is not valid.

move_ears_to_target(target_range)

Move both ears to a target range.

Parameters:

target_range (float) – The target range to move the ears to. Valid values are between 0.0 (minimum) and 1.0 (maximum).

Return type:

Mission

Returns:

Mission – The mission representing the task.

play_animation_sound(animation_name, volume=0.8)

Play sound paired with a face animation.

Parameters:
  • animation_name (str) – The name of the animation containing the sound.

  • volume (float) – The volume of the sound, between 0.0 and 1.0. Defaults to 0.8.

Return type:

Mission

Returns:

Mission – The mission representing the task.

play_face_reaction(emote_reaction, pause_expression=True, speed_factor=0.0)

Play a face reaction.

Parameters:
  • emote_reaction (str) – The emotion to react with.

  • pause_expression (bool) – Whether to pause the expression.

  • speed_factor (float) – The speed factor of the reaction.

Return type:

Mission

Returns:

Mission – The mission representing the task.

play_face_reaction_range(emote_emotion, intensity=0.8)

Play a face reaction within a specified intensity range.

Parameters:
  • emote_emotion (str) – The emotion to react with.

  • intensity (float) – The intensity level of the reaction, between 0.0 and 1.0. Defaults to 0.8.

Return type:

Mission

Returns:

Mission – The mission representing the task.

reset_ears()

Reset ears to their nominal position.

Return type:

Mission

Returns:

Mission – The mission representing the task.

scan_neck_and_wait_infinitely()

Set the neck mode to ‘scan’.

Return type:

Mission

sniff_around()

Make the robot sniff around.

Return type:

Mission

Returns:

Mission – The mission representing the task.

take_neck_resource_punctually()

Set the neck mode to ‘auto’.

Return type:

Mission

track_neck_and_wait_infinitely(focus_on='everything')

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

Parameters:
  • focus_on (str) – set the focus on something (everything, handles, humans, deposit_zone, or firefly).

  • 'everything' (Default to)

Return type:

Mission

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

Wind robot’s ears.

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

  • min_range (float) – Minimum range (between 0 and 1)

  • max_range (float) – Maximum range (between 0 and 1)

Return type:

Mission

Returns:

Mission – The mission representing the task.

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

Wriggle one ear.

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

  • min_range (float) – The minimum range of the wriggle (between 0.0 and 1.0).

  • max_range (float) – The maximum range of the wriggle (between 0.0 and 1.0).

  • rounds (int) – The number of rounds to wriggle.

Return type:

Mission

Returns:

Mission – The mission representing the task.

Raises:

RuntimeError – If the ear is not valid.

wriggle_ears(min_range=0.5, max_range=1.0, rounds=3)

Wriggle the ears.

Parameters:
  • min_range (float) – The minimum range of the wriggle (between 0.0 and 1.0).

  • max_range (float) – The maximum range of the wriggle (between 0.0 and 1.0).

  • rounds (int) – The number of rounds to wriggle.

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.

freeze()

Freeze all of the robot’s movement.

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='en')

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.

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.

say(something, autonomous_reaction=True)

Say something with emotion and autonomous reaction.

Parameters:
  • something (str) – The text to say.

  • autonomous_reaction (bool) – Whether to react autonomously.

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.

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.

stop_conversation()

Deactivate llm and disable the conversation.

Return type:

Mission

Returns:

Mission – The mission representing the task.

wave(arm=None)

Wave with a specified arm or both arms.

Parameters:

arm (Optional[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(hand)

Close the robot’s hand.

Parameters:

hand (Hand) – The hand to close (left or right).

Return type:

Mission

Returns:

Mission – The mission representing the task.

drop(rune)

Drop a handle.

Parameters:
  • rune_label – (str): The label associated with the handle’s rune.

  • rune (EnchantedObject)

Return type:

Mission

Returns:

Mission – The mission representing the task.

drop_from_hand(hand)

Drop whatever is in the robot’s hand. Ends up opening the hand.

Return type:

Mission

Returns:

Mission – The mission representing the task.

Parameters:

hand (Hand)

grasp_any_handle()

Grasp the handle in front of the robot.

Return type:

Mission

Returns:

Mission – The mission representing the task.

grasp_handle_with_human(rune)

Grasp a handle presented by a human.

Parameters:

rune (EnchantedObject) – The rune object representing the handle to grasp.

Return type:

Mission

Returns:

Mission – The mission representing the task.

grasp_handle_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_handle_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_hand(hand)

Open the robot’s hand.

Parameters:

hand (Hand) – The hand to open (left or right).

Return type:

Mission

Returns:

Mission – The mission representing the task.

open_hand_half(hand)

Open the robot’s hand halfway.

Parameters:

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

Return type:

Mission

Returns:

Mission – The mission representing the task.

put_object_in_front()

Put an object in front of the robot.

Return type:

Mission

Returns:

Mission – The mission representing the task.

take_object_in_front(hand=None)

Take an object in front of the robot.

Parameters:

hand (Optional[Hand]) – The hand to use for taking the object.

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.

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_back()

Turn back the robot.

Return type:

Mission

Returns:

Mission – The mission representing the task.

turn_left(degrees=90.0, duration=datetime.timedelta(days=-1, seconds=86399))

Turn the robot to the left by a specified angle.

Parameters:
  • degrees (float) – The angle in degrees to turn left. Defaults to 90.0 degrees.

  • duration (timedelta) – The duration of the turn. Negative values indicate automatic calculation. Defaults to timedelta(seconds=-1.0).

Return type:

Mission

Returns:

Mission – The mission representing the task.

turn_right(degrees=90.0, duration=datetime.timedelta(days=-1, seconds=86399))

Turn the robot to the right by a specified angle.

Parameters:
  • degrees (float) – The angle in degrees to turn right. Defaults to 90.0 degrees.

  • duration (timedelta) – The duration of the turn. Negative values indicate automatic calculation. Defaults to timedelta(seconds=-1.0).

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.

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.

discover_body()

Discover the robot’s body.

Return type:

Mission

Returns:

Mission – The mission representing the task.

fist_bump(hand=None)

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

Parameters:

hand (Optional[Hand]) – The hand to use for the fist bump.

Return type:

Mission

Returns:

Mission – The mission representing the task.

fist_bump_posture(hand=None)

Put the arm in a fist bump posture.

Parameters:

hand (Optional[Hand]) – 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.

mirokai_spin()

Spin around.

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.

wake_up_long()

Perform a long wake up action.

Return type:

Mission

Returns:

Mission – The mission representing the task.

wake_up_short()

Perform a short wake up action.

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.

get_battery_level()

Get current battery level.

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.