KnowRob Model

KnowRob supports the Resource Description Framework (RDF) which is similar to classical modelling approaches such as entity-relationship and class diagrams. In the RDF model, statements about resources can be represented in form of subject-predicate-object triples that express a relationship between subject and object of the triple. Models in KnowRob usually build ontop of RDF. One category of KnowRob Models are extensions of the modelling language that introduce new resources such as XML Schema Data Types (XSD), RDF Schema (RDFS), and Web Ontology Language (OWL). The other category of models define RDF ontologies that conceptualize entities, and allow some form of reasoning.

Ontology Languages

RDFS is an ontology language that can be used to represent taxonomies through subClassOf and subPropertyOf relationships. It further allows to define the domain and range of properties -- i.e. what type of subject can be the host the property, and what type of object can be the value of it. RDFS is integrated into the KnowRob Language through a set of language terms including has_type/2, has_range/2, and has_domain/2.

OWL is another ontology language, but more expressive then RDFS. Please refer to the OWL2 overview for complete information about it. The OWL language supports some more advanced class relationships such as intersectionOf and complementOf, property cardinality restrictions, and additional property characteristics such as inverse and functional properties. KnowRob integrates with the OWL language by declaring a set of language terms, and how they map into the RDF model. An example of an OWL language term is shown below:

has_inverse_property(Property,Inverse) ?+>
    triple(Property,owl:inverseOf,Inverse).

This querying+projection rule declares that the term has_inverse_property/2 is mapped to RDF by using owl:inverseOf as predicate in the triple. KnowRob's language further supports OWL class expressions in arguments of language terms. Such class descriptions can used with the core terms instance_of/2, subclass_of/2, and holds/3, for example:

:- instance_of(Subject,some(Predicate,Object)).

Where the term some/2 maps to an existential restriction class in the OWL language. Please refer to source code documentation for a full list of OWL language terms.

Ontology Organization

KnowRob ships with a set of OWL ontologies organized into upper-level, domain and application ontologies.

A upper-level ontology (also called foundational ontology) defines concepts that are useful across disciplines such as event and object, and general relations such as parthood and participation. KnowRob uses the DOLCE+DnS Ultralite (DUL) upper-level ontology which is a *"lightweight, easy-to-apply foundational ontology for modeling either physical or social contexts"*.

A domain ontology is used to fix general terms in some domain. The domain KnowRob was designed for is everyday activities. KnowRob ships with the Socio-physical Model of Activities (SOMA) ontology which derives its notions from the DUL upper-level. However, it is possible to configure KnowRob for other discipines by using different domain ontologies. Another domain ontology in KnowRob has the scope to capture categories underying robot control. This includes the concepts sensor, actor, and capability.

Finally, an application ontology contains all application-specific definitions. As KnowRob is a general framework, no such ontology will be auto-loaded by default. However, some application ontologies are available as part of public repositories, and hosted by the openEASE webservice.

Activity Model

In KnowRob, an Action is defined as an Event where at least one agent that participates in the event executes a Task which is typically defined in a Plan. Tasks are used to classify actions, similar to how roles are used to classify objects within some situational context. There may be multiple plans defining the same task which is useful to capture different ways to achieve the same goal. The distinction between Action and Task is further important as it enables us to put individual tasks into discourse without referring to a particular execution of them (i.e. an Action). This is needed because a Plan is a generalization of action executions, abstracting away from individual objects that were involved by only referring to the roles they have played.

Plans are used to structure tasks, asserting how they are composed of steps and in which order they should be executed. KnowRob supports relations from Allen's Interval Algebra to assert ordering constraints between steps, and also allows to only specify partial ordering. Each step of a plan is a task itself, and may also be defined by some plan(s). However, the action model of KnowRob allows to go deeper by decomposing a task into phases. A phase is a Process or State that occurs during task execution which includes force dynamic events, and motions. Processes are classified by one of the ProcessType concepts, and states are classified by one of the Gestallt concepts defined in the model.

<p align="center"> <img src="../../img/plan.png" width="500"> </p>

Roles are used to classify objects that participate in some event. This includes the agent that performed the action, tools that were used, objects that were affected, as well as locations of interest. KnowRob defines a taxonomy of roles with the most general concepts being Patient, Instrument, and Location.

Prolog files

DUL.pl  -- Predicates for the DOLCE+DnS Ultralite ontology.
executes_task/2A relation between an action and a task, e.g.
has_assignment/2Associates a parameter to an assignment.
has_data_value/2A datatype property that encodes values from a datatype for an Entity.
has_location/2A generic, relative spatial location, holding between any entities.
has_object_type/2Relates an entity to its types that are sub-classes of the Object concept.
has_parameter/2A Concept can have a Parameter that constrains the attributes that a classified Entity can have in a certain Situation, e.g.
has_parameter/3Same as has_parameter/2 but in addition unifies the type of the parameter with the third argument.
has_parameter_range/3Same as has_parameter/2 but in addition unifies the range of the parameter with the third argument.
has_part/2Relates an object to its parts.
has_participant/3A relation between an object and a process, e.g.
has_quality_type/2Relates an entity to its types that are sub-classes of the Quality concept.
has_region/2A relation between entities and regions, e.g.
has_role/2Relates an object to its roles.
has_time_interval/2
is_action/1True iff Entity is an instance of dul:'Action'.
is_agent/1True iff Entity is an instance of dul:'Agent'.
is_amount/1True iff Entity is an instance of dul:'Amount'.
is_classified_by/2
is_concept/1True iff Entity is an instance of dul:'Concept'.
is_description/1True iff Entity is an instance of dul:'Description'.
is_design/1True iff Entity is an instance of dul:'Design'.
is_diagnosis/1True iff Entity is an instance of dul:'Diagnosis'.
is_event/1True iff Entity is an instance of dul:'Event'.
is_event_type/1True iff Entity is an instance of dul:'EventType'.
is_goal/1True iff Entity is an instance of dul:'Goal'.
is_norm/1True iff Entity is an instance of dul:'Norm'.
is_object/1True iff Entity is an instance of dul:'Object'.
is_parameter/1True iff Entity is an instance of dul:'Parameter'.
is_physical_artifact/1True iff Entity is an instance of dul:'PhysicalArtifact'.
is_physical_attribute/1True iff Entity is an instance of dul:'PhysicalAttribute'.
is_physical_object/1True iff Entity is an instance of dul:'PhysicalObject'.
is_plan/1True iff Entity is an instance of dul:'Plan'.
is_plan_execution/1True iff Entity is an instance of dul:'PlanExecution'.
is_process/1True iff Entity is an instance of dul:'Process'.
is_quality/1True iff Entity is an instance of dul:'Quality'.
is_region/1True iff Entity is an instance of dul:'Region'.
is_role/1True iff Entity is an instance of dul:'Role'.
is_setting_for/2A relation between situations and entities, e.g.
is_situation/1True iff Entity is an instance of dul:'Situation'.
is_social_attribute/1True iff Entity is an instance of dul:'SocialAttribute'.
is_social_object/1True iff Entity is an instance of dul:'SocialObject'.
is_space_region/1True iff Entity is an instance of dul:'SpaceRegion'.
is_task/1True iff Entity is an instance of dul:'Task'.
is_time_interval/1True iff Entity is an instance of dul:'TimeInterval'.
is_transition/1True iff Entity is an instance of dul:'Transition'.
plan_has_goal/2Relates a plan to its goal.
satisfies/2A relation between a Situation and a Description, e.g.
task_role/2A relation between roles and tasks, e.g.
task_role_range/3Same as task_role/2 but in addition unifies the range of the parameter with the third argument.
task_role_type/3Same as task_role/2 but in addition unifies the type of the parameter with the third argument.
OWL.pl  -- The Web Ontology Language (OWL) model.
disjoint_with/2Tests if Class1 and Class2 are disjoint, taking both individual disjointWith properties and the OWL2 AllDisjointClasses into account.
disjoint_with_direct/2True if there is a disjointness axioms for Cls and Disjoint, not taking into account the super classes of both.
has_description/2Convert an OWL class into a Prolog representation.
has_equivalent_class/2Maps an OWL class to classes it is equivalent to.
has_inverse_property/2The inverse-of relation between two properties.
has_property_chain/2Reads chain axioms of a property resource.
is_all_disjoint_classes/1True for OWL2 AllDisjointClasses.
is_class/1True for OWL classes.
is_complement_of/2Convert an OWL complement class into a Prolog representation.
is_data_property/1True iff Entity is an datatype property IRI.
is_functional_property/1True for functional properties.
is_individual/1True for OWL individuals.
is_intersection_of/2Convert an OWL intersection class into a Prolog representation.
is_object_property/1True for OWL object properties.
is_owl_term/1
is_restriction/1True for OWL restrcitions.
is_restriction/2Convert an OWL restriction class into a Prolog representation.
is_restriction_term/1
is_symmetric_property/1True for symmetric properties.
is_transitive_property/1True for transitive properties.
is_union_of/2Convert an OWL union class into a Prolog representation.
same_as/2True if X and Y are identical or connected by the owl:sameAs relation.
QUDT.pl  -- Utilities for handling units of measure and the conversion between different units
qudt_conv/4Convert a value to another unit of the same kind.
qudt_unit/4Facts about units in the QUDT model.
RDFS.pl  -- The Resource Description Framework Schema model.
has_comment/2rdfs:comment is an instance of rdf:Property that may be used to provide a human-readable description of a resource.
has_domain/2The domain of a property globally restricts hosts of the property to instances of the domain.
has_label/2rdfs:label is an instance of rdf:Property that may be used to provide a human-readable version of a resource's name.
has_range/2The range of a property globally restricts values of the property to instances of the range.
has_type/2rdf:type is an instance of rdf:Property that is used to state that a resource is an instance of a class.
instance_of/2The type of an entity (rdf:type).
is_datatype/1rdfs:Datatype is the class of datatypes.
is_literal/1The class rdfs:Literal is the class of literal values such as strings and integers.
is_property/1rdf:Property is the class of RDF properties.
is_resource/1All things described by RDF are called resources, and are instances of the class rdfs:Resource.
rdf_list/2Read a RDF list into a Prolog list.
subclass_of/2The subclass-of relation (rdfs:subClassOf).
subproperty_of/2The subproperty-of relation (rdfs:subPropertyOf).
SOMA.pl  -- Predicates for the SOMA ontology.
action_active/1Set the execution status of an action to 'active'.
action_cancelled/1Set the execution status of an action to 'cancelled'.
action_failed/1Set the execution status of an action to 'failed'.
action_paused/1Set the execution status of an action to 'paused'.
action_pending/1Set the execution status of an action to 'planning'.
action_status/2Relates an action to its execution status.
action_succeeded/1Set the execution status of an action to 'succeeded'.
disposition_trigger_type/2Relates a disposition to the type of objects that can be the trigger of the disposition.
event_interval/3Returns the start and end time of an event.
has_disposition/2Relates an object to its dispositions.
has_interval_begin/2The start time of I.
has_interval_duration/2Calculate the duration of the the TemporalThing Event.
has_interval_end/2The end time of I.
has_kinematics_file/3
has_kinematics_file/3Associates an object to KinoDynamicData about the object.
has_process_role/2A relation between roles and process types.
has_subevent/2
is_affordance/1True iff Entity is an instance of soma:'Affordance'.
is_binding/1True iff Entity is an instance of soma:'Binding'.
is_chemical_process/1True iff Entity is an instance of soma:'ChemicalProcess'.
is_computational_agent/1True iff Entity is an instance of soma:'ComputationalAgent'.
is_configuration/1True iff Entity is an instance of soma:'Configuration'.
is_destination/1True iff Entity is an instance of soma:'Destination'.
is_digital_object/1True iff Entity is an instance of soma:'DigitalObject'.
is_disposition/1True iff Entity is an instance of soma:'Disposition'.
is_episode/1
is_extrinsic/1True iff Entity is an instance of soma:'Extrinsic'.
is_feature/1True iff Entity is an instance of soma:'Feature'.
is_force_interaction/1True iff Entity is an instance of soma:'ForceInteraction'.
is_instrument/1True iff Entity is an instance of soma:'Instrument'.
is_interval_equal/2Interval I1 is equal to I2.
is_intrinsic/1True iff Entity is an instance of soma:'Intrinsic'.
is_location/1True iff Entity is an instance of soma:'Location'.
is_manipulation_action/1True iff Entity is an instance of soma:'ManipulationAction'.
is_mental_action/1True iff Entity is an instance of soma:'MentalAction'.
is_mental_task/1True iff Entity is an instance of soma:'MentalTask'.
is_motion/1True iff Entity is an instance of soma:'Motion'.
is_origin/1True iff Entity is an instance of soma:'Origin'.
is_patient/1True iff Entity is an instance of soma:'Patient'.
is_performed_by/2Relates an action to the agent that performs it.
is_physical_process/1True iff Entity is an instance of soma:'PhysicalProcess'.
is_physical_quality/1True iff Entity is an instance of soma:'PhysicalQuality'.
is_physical_state/1True iff Entity is an instance of soma:'PhysicalState'.
is_physical_task/1True iff Entity is an instance of soma:'PhysicalTask'.
is_process_flow/1True iff Entity is an instance of soma:'ProcessFlow'.
is_process_type/1True iff Entity is an instance of soma:'ProcessType'.
is_progression/1True iff Entity is an instance of soma:'Progression'.
is_social_quality/1True iff Entity is an instance of soma:'SocialQuality'.
is_social_state/1True iff Entity is an instance of soma:'SocialState'.
is_state/1True iff Entity is an instance of soma:'State'.
is_state_type/1True iff Entity is an instance of soma:'StateType'.
is_succeedence/1True iff Entity is an instance of soma:'Succeedence'.
object_color_rgb/4True if Col is the main color of Obj.
object_dimensions/4True if Depth x Width x Height are (exactly) the extends of the bounding box of Obj.
object_feature/2Associates an object resource to features it hosts.
object_localization/2Relates an object to its localization quality.
object_mesh_path/2True if FilePath is a path to a mesh file (stl or dae) for Obj.
object_shape/5Relates objects to shapes and their origin (usually a pose relative to the object).
object_shape_type/2Relates an object to the type of its shape(s).
plan_defines_task/2Relates a plan to the task it defines.
task_effect/2Relates an action or task to roles that imply change, and that need to be taken by some object when the task is executed.
workflow_constituent/2
workflow_first_step/2Relates a workflow to the dedicated first step of it.
workflow_role_range/3Relates a workflow to roles of objects defined by the tasks of the workflow, and also infers the required type for fillers of the role.
XSD.pl  -- XML Schema Data Types.
xsd_data_basetype/2Convert between XSD and Prolog type identifier.
xsd_data_type/1True for all XSD data types such as xsd:string.
xsd_data_type_name/2Split name from IRI of a XSD type.
xsd_misc_type/1Mis data types.
xsd_numeric_type/1Decimal data types are used for numeric values.
xsd_string_type/1String data types are used for values that contains character strings.
__init__.pl
portray.pl  -- portray for language terms and RDF resources.
terms.pl  -- The occurs predicate.
is_a/2Wrapper around instance_of, subclass_of, and subproperty_of.
occurs/1True for all occurences (events).