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