Problems with namespaces in KnowRob
I'm trying to follow the tutorial on reasoning about actions on the KnowRob website.
As suggested in the tutorial, I execute
$ roscd knowrob_basics_tutorial
$ rosrun rosprolog rosprolog knowrob_basics_tutorial
?- owl_parse('owl/pancake-making.owl', false, false, true).
and get a very hopeful
true.
I then proceed with
?- class_properties(pancake:'MakingPancakes', knowrob:subAction, Sub).
that unfortunately answers with
ERROR: namespace `pancake' does not exist
^ Exception: (11) setup_call_catcher_cleanup('$expand':'$set_source_module'(user, user), '$expand':expand_goal(class_properties(pancake:'MakingPancakes', knowrob:subAction, _G239), _G303, user, [user, system]), _G373, '$expand':'$set_source_module'(_G328, user)) ?
The namespace is correctly included in the OWl file
<rdf:RDF
xmlns ="&pancake;"
xmlns:pancake ="&pancake;"
xml:base ="&pancake;"
xmlns:knowrob ="&knowrob;"
[...] >
so it's really hard for me to understand what's going on. How do I ensure the pancake namespace is correctly included? Is there a way for me to print out all the namespaces?
Turns out that if I use the whole class name, without abbreviating with the shortened namespace, everything works. Not sure how I should specify the namespace in prolog anyway.