Ask Your Question

How to load KnowRob to My package ?!

asked 2012-11-29 06:08:21 -0500

Amal gravatar image


I create a Test package and want to load KnowRob system to it. So ((1)) How to do this?!!

((2)) What dependencies I have to define, I define
std_msgs roslang rospy roscpp

My system: I work in Ubuntu 12.o4 and install fuerte. In home I have a ros which contain KnowRob, RoboEarth, and ccny_vision . I add to it sandbox and create my test package in this sandbox


edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2012-11-29 14:24:13 -0500

moritz gravatar image

The answer depends on which kind of package you would like to create:

(1) If the package implements new Prolog functionality or contains custom OWL files, you should create a package similar to e.g. comp_spatial. It should be a normal ROS package that, in addition, contains the following files:

|- owl
|  \- your_file.owl
|- prolog

The should initialize the package, which may include loading dependencies, parsing OWL files, and registering RDF namespaces. Have a look at e.g. comp_spatial for an example. The or files you will find in some packages are required since the RDF parser needs global paths for loading files referenced by an OWL file. files therefore contain a placeholder that is replaced during compilation as specified in your CMakeLists.txt. Once you have set up your package like this, you can launch the system using rosrun rosprolog rosprolog your_package

(2) If you would just like to use existing packages in your program, e.g. to send queries via jpl or to call Java methods in one of the packages, it's enough to just depend on the KnowRob package.

Regarding which package to depend on, this depends on which functionality you would like to use. You just need to list the direct dependencies in your manifest, their dependencies are automatically included as well. Common candidates could be to depend on mod_vis (if you would like to use the visualization somewhere) or on ias_semantic_map (if you would like to use that map).

edit flag offensive delete link more


do you want to say that it is not necessary to create a package and can call what I need from KnowRob ?!

Amal gravatar image Amal  ( 2012-11-29 19:09:46 -0500 )edit

I am saying that, depending on what you would like to do, you either create a KnowRob-like package (option 1, when you'd like to extend KnowRob) or put your code into a normal ROS package, depend on KnowRob packages, and call methods from those (option 2, if you just want to use parts of KnowRob).

moritz gravatar image moritz  ( 2012-11-29 19:16:31 -0500 )edit

OK at first stage I want to just use existing packages but not to query in terminal, I want to write a program that call nodes. where can write this program ?!

Amal gravatar image Amal  ( 2012-11-29 19:24:15 -0500 )edit

You mean you'd like to send queries via ROS instead of interactively at the terminal? Then have a look at and especially the example clients in that package.

moritz gravatar image moritz  ( 2012-11-29 19:27:05 -0500 )edit

Thank for Ur help, I will start from It. :)

Amal gravatar image Amal  ( 2012-11-29 19:28:46 -0500 )edit

What is difference between and ?!

Amal gravatar image Amal  ( 2013-01-29 07:14:48 -0500 )edit

Quoting from my anshwer: " files therefore contain a placeholder that is replaced during compilation as specified in your CMakeLists.txt.". If you need to have global paths in your .pl file, you can create a file with a placeholder and generate the .pl from it.

moritz gravatar image moritz  ( 2013-01-29 07:49:30 -0500 )edit

Local Path if will use the owl of the package but Global if need owl from other package, and the same in parsing ?that is right

what is the justification of ?! I open the in in comp_spacial package I think that is like a steps of processing, how to understand this file?

Amal gravatar image Amal  ( 2013-01-30 12:28:43 -0500 )edit

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower


Asked: 2012-11-29 06:08:21 -0500

Seen: 217 times

Last updated: Nov 29 '12