ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Problem with running knowrob tutorial (knowrob_common)

asked 2014-10-13 09:36:55 -0500

Robatics1 gravatar image

updated 2014-10-15 13:04:46 -0500

Hi knowrob developers,

I got problem when I want to run knowrob_common file. In this case, when I execute queries (for example, owl_has(A, rdf:type, knowrob:'Drawer').), it return false.

What I did:

$ rosrun rosprolog rosprolog knowrob_common

What I got:

library(swi_hooks) compiled into pce_swi_hooks 0.00 sec, 3,856 bytes
% /home/aliakbari101/.plrc compiled 0.00 sec, 1,552 bytes
%     library(error) compiled into error 0.00 sec, 19,104 bytes
%    library(lists) compiled into lists 0.00 sec, 45,824 bytes
%   library(shlib) compiled into shlib 0.00 sec, 67,120 bytes
%   library(option) compiled into swi_option 0.00 sec, 14,768 bytes
%  library(process) compiled into process 0.00 sec, 99,560 bytes
% /home/aliakbari101/catkin_ws/src/knowrob/rosprolog/prolog/ compiled 0.00 sec, 107,104 bytes
%  library(jpl) compiled into jpl 0.02 sec, 345,320 bytes
%    library(sgml) compiled into sgml 0.00 sec, 40,016 bytes   
%      library(quintus) compiled into quintus 0.00 sec, 22,016 bytes   
%     rewrite compiled into rewrite 0.00 sec, 33,976 bytes
%     library(uri) compiled into uri 0.00 sec, 13,936 bytes
%     library(record) compiled into record 0.00 sec, 33,752 bytes
%    rdf_parser compiled into rdf_parser 0.01 sec, 147,880 bytes
%     library(gensym) compiled into gensym 0.00 sec, 4,616 bytes
%    rdf_triple compiled into rdf_triple 0.00 sec, 37,312 bytes
%    library(rdf) compiled into rdf 0.01 sec, 257,832 bytes
%    library(debug) compiled into prolog_debug 0.00 sec, 22,112 bytes
%    library(assoc) compiled into assoc 0.01 sec, 35,904 bytes
%   library(sgml_write) compiled into sgml_write 0.01 sec, 121,176 bytes
%   library(nb_set) compiled into nb_set 0.00 sec, 6,200 bytes
%    library(filesex) compiled into files_ex 0.00 sec, 10,888 bytes
%   rdf_cache compiled into rdf_cache 0.00 sec, 28,104 bytes
%  library(semweb/rdf_db) compiled into rdf_db 0.03 sec, 606,000 bytes
%   library(broadcast) compiled into broadcast 0.00 sec, 7,520 bytes
%  library(semweb/rdf_edit) compiled into rdf_edit 0.01 sec, 87,320 bytes
%  library(semweb/rdfs) compiled into rdfs 0.00 sec, 28,328 bytes
%  library(semweb/rdf_portray) compiled into rdf_portray 0.00 sec, 15,192 bytes
%  library(owl) compiled into t20_owl 0.01 sec, 68,712 bytes
%    library(utf8) compiled into utf8 0.00 sec, 13,824 bytes
%   library( compiled into url 0.01 sec, 113,720 bytes
%    library(socket) compiled into socket 0.00 sec, 11,352 bytes
%    library(base64) compiled into base64 0.00 sec, 17,704 bytes
%   library(http/ compiled into http_open 0.00 sec, 92,944 bytes
%  library(owl_parser) compiled into owl_parser 0.01 sec, 221,864 bytes
%  library(rdfs_computable) compiled into rdfs_computable 0.01 sec, 48,384 bytes
%  library(util) compiled into util 0.00 sec, 28,248 bytes
%   library(crypt) compiled into crypt 0.00 sec, 3,328 bytes
%  library(knowrob_owl) compiled into knowrob_owl 0.00 sec, 29,048 bytes
%  library(owl_export) compiled into owl_export 0.00 sec, 20,056 bytes
%  library ...
edit retag flag offensive close merge delete


Does it work after manually loading that file using rdf_load('/path/to/rdf-schema.xml'). ? More info:

moritz gravatar image moritz  ( 2014-10-14 01:20:37 -0500 )edit

As you said, I loaded manually, but again when I want to execute the same query that I mentioned in the question, it returns false !!! For the installation, I followed your website and I compiled it without any errors. I do not know whether knowrob works fine with ubuntu 13 or not !!

Robatics1 gravatar image Robatics1  ( 2014-10-14 01:47:36 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-10-14 14:06:39 -0500

moritz gravatar image

updated 2014-10-14 15:27:20 -0500

I did not read the question well enough -- the problem is not related to rdf-schema.xml, but to the fact that there simply are no drawers that your query could return since no map has been loaded.

This problem appears since you are using the wrong instructions: As the box at the head of this wiki page says, the instructions on that page are only valid for the catkinized version of KnowRob. Since you are using the rosbuild-based version, you will need to follow the given link to the previous version.

That page will tell you that you have to start with the mod_vis instead of the knowrob_common package, which automatically loads an environment map, so that your query will have results.

EDIT: I'm not sure what the problem is. Some people seem to have that problem, I could not reproduce it. One thing we could test is whether the catkinized version still has this issue. You can check it out from the indigo-devel branch (that, despite the name, should also work in groovy and hydro, but you need to put it into your catkin workspace, not the rosbuild one, and remove the other knowrob checkout).

edit flag offensive delete link more


In fact, I tried with the old version instruction as well (rosrun rosprolog rosprolog mod_vis), but again the same problem.

Robatics1 gravatar image Robatics1  ( 2014-10-14 14:28:22 -0500 )edit

For example, I run owl_subclass_of(A, knowrob:'FoodOrDrink'). and the response is just A = '' ans when I pressed this sign ; it returns false.

Robatics1 gravatar image Robatics1  ( 2014-10-14 14:29:02 -0500 )edit

I cloned the knowrob project and checked out to the indigo-devel branch and also, put it inside the catkin workspace. Moreover, I installed rosjava (hydro version). this is the error when I run catkin_make --pkg knowrob, Could not find a package configuration file provided by "data_vis_msgs".

Robatics1 gravatar image Robatics1  ( 2014-10-15 10:41:39 -0500 )edit

data_vis_msgs are in You will have to install that from source for now till the next round of .deb package updates is out.

moritz gravatar image moritz  ( 2014-10-15 11:50:54 -0500 )edit

Now, I am able to run catkin_make correctly, but the problem still remained and it returns false when a query is executed. I edited the compilation part and also wrote one query instance.

Robatics1 gravatar image Robatics1  ( 2014-10-15 13:08:32 -0500 )edit

I'm sorry, very busy times these days, and without error messages and without being able to reproduce the issue, it's hard for me to recommend anything besides maybe reinstalling.

moritz gravatar image moritz  ( 2014-10-17 01:23:52 -0500 )edit

Ok, thanks for your attention.

Robatics1 gravatar image Robatics1  ( 2014-10-17 05:59:32 -0500 )edit

Question Tools

1 follower


Asked: 2014-10-13 09:36:55 -0500

Seen: 400 times

Last updated: Oct 15 '14