Features

Behavior

Behavior-related features for managing robot obstacle avoidance and known entities.

class pymirokai.features.abilities.behavior.Behavior

Bases: object

Class to handle behavior-related features of the robot.

exit_arms_collision()

Exit current arms collision.

Return type:

dict[str, Any]

Returns:

Dict[str, Any] – The response from the REST API.

async list_all_entities_from_type(type)

List all the currently known locations by the robot.

Parameters:

type (type[BaseModel]) – type used to list all corresponding entities.

Return type:

list[Location]

Returns:

Dict[str, Any] – The locations.

async list_all_locations()

List all the currently known locations by the robot.

Return type:

list[Location]

Returns:

Dict[str, Any] – The locations.

set_obstacle_avoidance(enabled)

Enable or disable obstacle avoidance behavior.

Parameters:

enabled (bool) – True to enable, False to disable.

Return type:

dict[str, Any]

Returns:

dict[str, Any] – The REST API response.

Generic

Generic feature interface for robot configuration and knowledge queries.

class pymirokai.features.abilities.generic.Generic

Bases: object

Class to handle generic features of the robot.

get_character_name()

Get the current character name.

Return type:

dict[str, Any]

Returns:

Dict[str, Any] – The response from the REST API.

get_language()

Get the current language setting.

Return type:

dict[str, Any]

Returns:

Dict[str, Any] – The response from the REST API.

get_publishers()

Get the list of available publishers.

Return type:

dict[str, Any]

Returns:

Dict[str, Any] – The list of available publishers.

is_pddl_condition_true(pddl_condition)

Check whether a PDDL condition currently holds true.

Parameters:

pddl_condition (str) – The PDDL condition to evaluate.

Return type:

bool

Returns:

bool – True if the condition is satisfied, False otherwise.

pretty_print_facts_and_fluents()

Print all the facts and fluents in a human-readable format.

Return type:

str

Returns:

str – A string containing the pretty-printed facts and fluents.

Interaction

Interaction-related features for robot perception and human-robot interaction.

class pymirokai.features.abilities.interaction.Interaction

Bases: object

Class to handle interaction-related features of the robot.

async autonomous_planning_output()

Return the last autonomous planning result.

Return type:

str

Returns:

str – The last autonomous planning result.

get_human_neck_roll()

Get the human neck roll angle.

Return type:

dict[str, Any]

Returns:

Dict(str; Any) – The response from the REST API.

get_humans_relative_positions()

Get humans positions relative to the robot.

Return type:

dict[str, Any]

Returns:

Dict(str; Any) – The response from the REST API.

get_perceived_emotions()

Retrieve the current emotional state perceived by the robot.

Return type:

dict[str, Any]

Returns:

dict[str, Any] – The response from the REST API containing perceived emotions.

is_making_noise()

Check if the robot is making noise.

Return type:

dict[str, Any]

Returns:

Dict[str, Any] – The response from the REST API.

is_seeing_handle()

Check if the robot is seeing a handle.

Return type:

dict[str, Any]

Returns:

Dict[str, Any] – The response from the REST API.

is_seeing_human()

Check if the robot is seeing a human.

Return type:

dict[str, Any]

Returns:

Dict[str, Any] – The response from the REST API.

is_sleeping()

Check if the robot is sleeping.

Return type:

dict[str, Any]

Returns:

Dict[str, Any] – The response from the REST API.

async pddl_domain()

Return the robot’s current PDDL domain definition.

The domain describes the available actions, predicates, and structure used by the autonomous planner.

Return type:

str

Returns:

str – The current PDDL domain, formatted as a string.

async pddl_problem()

Return the robot’s current PDDL problem definition.

The problem defines the specific goals, objects, and initial conditions for the autonomous planner to solve using the domain.

Return type:

str

Returns:

str – The current PDDL problem, formatted as a string.

set_actions_by_voice(enabled)

Activate or deactivate the trigger by voice.

Parameters:

enabled (bool) – True to enable, False to disable.

Return type:

dict[str, Any]

Returns:

Dict[str, Any] – The response from the REST API.

set_sound_level(level)

Set the sound level of the robot.

Parameters:

level (int) – The sound level (0-100).

Return type:

dict[str, Any]

Returns:

Dict[str, Any] – The response from the REST API.

Navigation

Navigation-related features for motion control and stability management.

class pymirokai.features.abilities.navigation.Navigation

Bases: object

Class to handle navigation-related features of the robot.

set_robot_max_velocity(percentage)

Set the maximum velocity at which the robot can operate.

Parameters:

percentage (float) – The maximum velocity in percent.

Return type:

dict[str, Any]

Returns:

Dict[str, Any] – The response from the REST API.

toggle_balancing(value)

Set balancing state to the current value.

True to activate balancing, False to deactivate.

This state is available with the websocket topic “is_balancing”.

Parameters:

value (bool) – True to activate the balancing, False to deactivate.

Return type:

str

Returns:

str – A string containing the pretty-printed facts and fluents.

Runes

Rune interaction features for detecting and associating physical rune markers.

class pymirokai.features.abilities.runes.Runes

Bases: object

Class to handle generic features of the robot.

get_all_runes_details()

Get details on all detected runes: ID, RSSI, Angles (horizontal and vertical).

Return type:

dict[str, Any]

Returns:

Dict[str, Any] – The response from the REST API.

get_clicked_runes()

Get a list of all clicked runes.

Return type:

dict[str, Any]

Returns:

Dict[str, Any] – The response from the REST API.

get_detected_runes()

Get a list of all detected runes.

Return type:

dict[str, Any]

Returns:

Dict[str, Any] – The response from the REST API.

get_double_clicked_runes()

Get a list of all double-clicked runes.

Return type:

dict[str, Any]

Returns:

Dict[str, Any] – The response from the REST API.

get_long_pressed_runes()

Get a list of all long-pressed runes.

Return type:

dict[str, Any]

Returns:

Dict[str, Any] – The response from the REST API.

get_rune_angle_of_arrival(rune_id)

Get the angle of arrival of a rune.

Parameters:

rune_id (str) – The ID of the rune to check.

Return type:

dict[str, Any]

Returns:

Dict[str, Any] – The response from the REST API.

get_rune_rssi(rune_id)

Get the RSSI of a rune.

Parameters:

rune_id (str) – The ID of the rune to check.

Return type:

dict[str, Any]

Returns:

Dict[str, Any] – The response from the REST API.

is_clicked(rune_id)

Check if a rune has been clicked.

Parameters:

rune_id (str) – The ID of the rune to check.

Return type:

dict[str, Any]

Returns:

Dict[str, Any] – The response from the REST API.

is_detected(rune_id)

Check if a rune has been detected.

Parameters:

rune_id (str) – The ID of the rune to check.

Return type:

dict[str, Any]

Returns:

Dict[str, Any] – The response from the REST API.

is_double_clicked(rune_id)

Check if a rune has been double-clicked.

Parameters:

rune_id (str) – The ID of the rune to check.

Return type:

dict[str, Any]

Returns:

Dict[str, Any] – The response from the REST API.

is_long_pressed(rune_id)

Check if a rune has been long-pressed.

Parameters:

rune_id (str) – The ID of the rune to check.

Return type:

dict[str, Any]

Returns:

Dict[str, Any] – The response from the REST API.

is_seeing(rune_id)

Check if the robot is seeing a specific rune.

Parameters:

rune_id (str) – The ID of the rune to check.

Return type:

dict[str, Any]

Returns:

Dict[str, Any] – The response from the REST API.

rune_association(rune_id, virtual_id='', label='', description='', rune_class='')

Associate metadata with a rune.

Parameters:
  • rune_id (str) – The unique ID of the rune.

  • virtual_id (str) – The virtual ID to assign.

  • label (str) – The display label for the rune.

  • description (str) – A brief description of the rune.

  • rune_class (str) – The classification of the rune.

Return type:

dict[str, str]

Returns:

dict[str, str] – The REST API response.