Build Ontology Map Node

Definition:

Defines the Ontologycal map using the armor_client.py helper script methods and the ontology file ontologycal_map.owl.
Services:

/state/get_battery_level —> uses GetBatteryLevel.srv

/state/get_pose —> uses GetPose.srv

class scripts.build_ontology_map.Build_Ontology_Map(log_tag, init_time)[source]

Class for building the ontologycal map. Each time this class is called by finite_state_machine.py ontology map loaded by using helper script armor_client.py in armor package and it make me able to use different method available inside armor pkg. In case, if each method from armor it’s used, it’s necessary to syncs the reasoner (PELLET).

add_door(door)[source]

Add indiviuals (DOOR) to class in ontologycal map –> using helper script armor_client.py in armor package and syncs the reasoner (PELLET)

Parameters:door (string) –
add_last_visit_time(room, visit_time)[source]

Add time visited method for each ROOM in order to make URGENT list of the ROOM which are not visited for a long time –> using helper script armor_client.py in armor package and syncs the reasoner (PELLET)

Parameters:
  • room (string) –
  • visit_time (string) –
add_robot()[source]

Function to add robot in extra palce in ROOM E (where there are marker) for first time and and sets its initial time instance and battery level and defines its urgency and battery threshold –> using helper script armor_client.py in armor package and syncs the reasoner (PELLET)

add_room(room)[source]

Add indiviuals (ROOM) to class in ontologycal map –> using helper script armor_client.py in armor package and syncs the reasoner (PELLET)

Parameters:room (string) –
assign_doors_to_room(room, doors)[source]

Assign at least one DOOR to each ROOM –> using helper script armor_client.py in armor package and syncs the reasoner (PELLET)

Parameters:
  • room (string) –
  • doors[] (string) –
cut_dataprop(data_prop)[source]

Very simple function that cut the data prop from a string received from armor.

Parameters:data_prop (string) –
cut_dataprop_list(data_prop_list)[source]

Very simple function that cut the data prop from a list of strings received from armor.

Parameters:data_prop_list (string[]) –
disjoint_individuals()[source]

Disjoint each indiviual (ROOM, DOOR) in different class in ontologycal map –> using helper script armor_client.py in armor package and syncs the reasoner (PELLET)

get_battery_level()[source]

Get the current battery level of the robot from robot_states.py node, using /state/get_battery_level service.

Returns:battery_level(int)
get_location()[source]

Uses get_pose() function defined in this script to find out current location of the robot is corrispondent to which room. This function uses proximity threshold condition for define area of each room.

Returns:is_in(string)
get_pose()[source]

Get current position of the robot from robot_states.py node, using /state/get_pose service.

Returns:pose(Point)
update_ontology(now)[source]

This function it’s mainly used in state machine in finite_state_machine.py. Briefly this function is useful to:

  1. Update robot time instance
  2. Update battery level
  3. Update robot location
  4. Update last visited time
  5. Detect urgent locations
  6. Define priority for target room
Parameters:now (float32) –
Returns:target_room(string) battery_low(bool)