How to create OWL file that can query by knowrob normally?
I followed knowrob tutorials.
I create an owl file sam_world.owl by protege.
<?xml version="1.0"?>
<!DOCTYPE Ontology [
<!ENTITY xsd "http://www.w3.org/2001/XMLSchema#" >
<!ENTITY xml "http://www.w3.org/XML/1998/namespace" >
<!ENTITY rdfs "http://www.w3.org/2000/01/rdf-schema#" >
<!ENTITY rdf "http://www.w3.org/1999/02/22-rdf-syntax-ns#" >
]>
<Ontology xmlns="http://www.w3.org/2002/07/owl#"
xml:base="http://www.semanticweb.org/ira/ontologies/2012/7/untitled-ontology-4"
xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
xmlns:xsd="http://www.w3.org/2001/XMLSchema#"
xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"
xmlns:xml="http://www.w3.org/XML/1998/namespace"
ontologyIRI="http://www.semanticweb.org/ira/ontologies/2012/7/untitled-ontology-4">
<Prefix name="" IRI="http://www.w3.org/2002/07/owl#"/>
<Prefix name="owl" IRI="http://www.w3.org/2002/07/owl#"/>
<Prefix name="rdf" IRI="http://www.w3.org/1999/02/22-rdf-syntax-ns#"/>
<Prefix name="xsd" IRI="http://www.w3.org/2001/XMLSchema#"/>
<Prefix name="rdfs" IRI="http://www.w3.org/2000/01/rdf-schema#"/>
<Declaration>
<Class IRI="#book"/>
</Declaration>
<Declaration>
<Class IRI="#cup"/>
</Declaration>
<Declaration>
<Class IRI="#flower"/>
</Declaration>
<Declaration>
<Class IRI="#outside"/>
</Declaration>
<Declaration>
<Class IRI="#room"/>
</Declaration>
<Declaration>
<Class IRI="#sidewalk"/>
</Declaration>
<SubClassOf>
<Class IRI="#book"/>
<Class IRI="#room"/>
</SubClassOf>
<SubClassOf>
<Class IRI="#cup"/>
<Class IRI="#room"/>
</SubClassOf>
<SubClassOf>
<Class IRI="#flower"/>
<Class IRI="#outside"/>
</SubClassOf>
<SubClassOf>
<Class IRI="#sidewalk"/>
<Class IRI="#outside"/>
</SubClassOf>
</Ontology>
<!-- Generated by the OWL API (version 3.3.1957) http://owlapi.sourceforge.net -->
And I load knowrob:
rosrun rosprolog rosprolog mod_vis
Then I load my own owl file and query it...
It shows many warnings and one query error:
?- owl_parser:owl_parse('/home/sam/code/ros/sam_ai/sam_owl/sam_world.owl', false, false, true).
Warning: RDF: file:///home/sam/code/ros/sam_ai/sam_owl/sam_world.owl:12: Unexpected element http://www.w3.org/2002/07/owl# : Ontology
Warning: RDF: file:///home/sam/code/ros/sam_ai/sam_owl/sam_world.owl:19: Unexpected element http://www.w3.org/2002/07/owl# : Prefix
Warning: RDF: file:///home/sam/code/ros/sam_ai/sam_owl/sam_world.owl:20: Unexpected element http://www.w3.org/2002/07/owl# : Prefix
Warning: RDF: file:///home/sam/code/ros/sam_ai/sam_owl/sam_world.owl:21: Unexpected element http://www.w3.org/2002/07/owl# : Prefix
Warning: RDF: file:///home/sam/code/ros/sam_ai/sam_owl/sam_world.owl:22: Unexpected element http://www.w3.org/2002/07/owl# : Prefix
Warning: RDF: file:///home/sam/code/ros/sam_ai/sam_owl/sam_world.owl:23: Unexpected element http://www.w3.org/2002/07/owl# : Prefix
Warning: RDF: file:///home/sam/code/ros/sam_ai/sam_owl/sam_world.owl:24: Unexpected element http://www.w3.org/2002/07/owl# : Declaration
Warning: RDF: file:///home/sam/code/ros/sam_ai/sam_owl/sam_world.owl:25: Unexpected element http://www.w3.org/2002/07/owl# : Class
Warning: RDF: file:///home/sam/code/ros/sam_ai/sam_owl/sam_world.owl:27: Unexpected element http://www.w3.org/2002/07/owl# : Declaration
Warning: RDF: file:///home/sam/code/ros/sam_ai/sam_owl/sam_world.owl:28: Unexpected element http ...