Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
modeling_changing_objects [2013/02/04 12:15] – created tenorth | modeling_changing_objects [2014/06/05 11:38] (current) – external edit 127.0.0.1 | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ===Projection: | + | #REDIRECT doc:modeling_changing_objects |
- | + | ||
- | Projection is performed by querying for the postActors, i.e. everything that is a kind of output or post-condition of an action: | + | |
- | | + | |
- | + | ||
- | The projection rules are implemented as computables for the postActors relation. First, they compute direct effects of an action (e.g. the pancake mix being on top of the pancake maker). | + | |
- | + | ||
- | These direct effects can trigger indirect effects, i.e. processes whose pre-conditions become true by the effects of an action. Therefore, the projection rule calls the generic process. predicate after the projection took place to check whether any processes became active. An example of such a process is the baking process that happens if dough is put somewhere where a thermal connection to something hot exists. | + | |
- | + | ||
- | + | ||
- | After projection, the inputs and effects of the action can be read with | + | |
- | | + | |
- | | + | |
- | + | ||
- | ===Query for object transformations=== | + | |
- | The transformedInto relation is a transitive relation that covers all object transformations, | + | |
- | ?- rdf_triple(object_change: | + | |
- | From = ' | + | |
- | To = 'http:// | + | |
- | + | ||
- | + | ||
- | === Example scenario=== | + | |
- | + | ||
- | making pancakes; static sequence of actions in the pancake-making.owl | + | |
- | + | ||
- | ?- use_module(library(comp_spatial)). | + | |
- | ?- use_module(library(object_change)). | + | |
- | + | ||
- | # initially, the egg is computed to be on the table | + | |
- | ?- rdf_triple(knowrob:' | + | |
- | A = ' | + | |
- | + | ||
- | ?- rdf_triple(knowrob: | + | |
- | | + | |
- | + | ||
- | ?- rdf_triple(knowrob: | + | |
- | egg1 -> EggShell0 | + | |
- | egg1 -> EggYolk-Food1 | + | |
- | + | ||
- | ?- rdf_triple(knowrob: | + | |
- | | + | |
- | milk1 added to -> Dough2 | + | |
- | | + | |
- | + | ||
- | ?- rdf_triple(knowrob: | + | |
- | | + | |
- | | + | |
- | + | ||
- | ?- rdf_triple(knowrob: | + | |
- | | + | |
- | + | ||
- | # the egg is now gone and therefore not on the table any more | + | |
- | ?- rdf_triple(knowrob:' | + | |
- | | + | |
- | + | ||
- | # what has been transformed into Baked4? | + | |
- | ?- rdf_triple(object_change: | + | |
- | A = ' | + | |
- | A = ' | + | |
- | A = ' | + | |
- | A = ' | + | |
- | A = ' | + | |
- | | + | |
- | + | ||
- | # where did the egg go? | + | |
- | ?- rdf_triple(object_change: | + | |
- | Res = ' | + | |
- | Res = ' | + | |
- | Res = ' | + | |
- | Res = ' | + | |
- | | + | |
- | + | ||
- | + | ||
- | === Combining projection with light-weight planning=== | + | |
- | + | ||
- | + | ||
- | | + | |
- | ?- use_module(library(object_change)). | + | |
- | ?- object_change: | + | |
- | + | ||
- | egg1 -> EggShell1 | + | |
- | egg1 -> EggYolk-Food2 | + | |
- | milk1 added to -> Dough4 | + | |
- | | + | |
- | | + | |
- | | + | |
- | | + | |
- | + | ||
- | | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | + | ||
- | | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + | |
- | ' | + |