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

visualize omics ?!

asked 2012-11-23 07:32:23 -0500

Amal gravatar image

updated 2012-11-25 07:53:57 -0500

Hi, I was reading in commonsense knowledge here ' ' but I want to visualize parts of the output so I run first rosrun rosprolog rosprolog mod_vis and open knowrob_omics from inside by register_ros_package(knowrob_omics). and then open visualization convas to start querying and visualizations of what geten out but it not success, so I want to know

that is all after launch mod_vis

?- register_ros_package(knowrob_omics).
% Parsed "locations.rdf" in 0.05 sec; 1,344 triples
Warning: /home/amal/ros/stacks/knowrob/knowrob_omics/prolog/
    Singleton variables: [O]
%  library(omics) compiled into omics 0.00 sec, 6,312 bytes
% /home/amal/ros/stacks/knowrob/knowrob_omics/prolog/ compiled 0.06 sec, 65,300 bytes

?- register_ros_package(ias_semantic_map).
% Parsed "comp_temporal.owl" in 0.01 sec; 164 triples
Warning: /opt/ros/fuerte/stacks/knowrob/comp_temporal/prolog/
    Goal (directive) failed: comp_temporal:owl_parser:owl_parse(../owl/comp_temporal.owl,false,false,true)
%    library(comp_temporal) compiled into comp_temporal 0.01 sec, 24,168 bytes
Warning: /opt/ros/fuerte/stacks/knowrob/comp_temporal/prolog/
    Goal (directive) failed: user:owl_parser:owl_parse(/opt/ros/fuerte/stacks/knowrob/comp_temporal/owl/comp_temporal.owl,false,false,true)
%   /opt/ros/fuerte/stacks/knowrob/comp_temporal/prolog/ compiled 0.02 sec, 27,548 bytes
% Parsed "comp_spatial.owl" in 0.00 sec; 52 triples
Warning: /opt/ros/fuerte/stacks/knowrob/comp_spatial/prolog/
    Goal (directive) failed: comp_spatial:owl_parser:owl_parse(../owl/comp_spatial.owl,false,false,true)
%   library(comp_spatial) compiled into comp_spatial 0.01 sec, 25,256 bytes
Warning: /opt/ros/fuerte/stacks/knowrob/comp_spatial/prolog/
    Goal (directive) failed: user:owl_parser:owl_parse(/opt/ros/fuerte/stacks/knowrob/comp_spatial/owl/comp_spatial.owl,false,false,true)
%  /opt/ros/fuerte/stacks/knowrob/comp_spatial/prolog/ compiled 0.04 sec, 69,248 bytes
%   library(semweb/actionmodel) compiled into actionmodel 0.01 sec, 63,772 bytes
% Parsed "ccrl2_semantic_map.owl" in 0.07 sec; 2,976 triples
Warning: /opt/ros/fuerte/stacks/knowrob/ias_semantic_map/prolog/
    Goal (directive) failed: user:owl_parser:owl_parse(/opt/ros/fuerte/stacks/knowrob/ias_semantic_map/owl/ccrl2_semantic_map.owl,false,false,true)
%  ccrl2_semantic_map compiled 0.08 sec, 111,808 bytes
%  semantic_map_utils compiled into ias_semantic_map 0.00 sec, 8,520 bytes
% /opt/ros/fuerte/stacks/knowrob/ias_semantic_map/prolog/ compiled 0.12 sec, 202,448 bytes

?- probability_given(knowrob:'OmicsLocations', Obj, knowrob:'Kitchen', Pr).
Obj = '',
Pr = 0.003865979381443299 ;
Obj = '',
Pr = 0.006443298969072165 ;
Obj = '',
Pr = 0.037371134020618556 .

?- visualisation_canvas(C).
ControlP5 0.5.4 infos, comments, questions at
PeasyCam v105
lights() is not available with this renderer.
Nov 24, 2012 5:51:33 PM controlP5.ControlWindow init
INFO: You are using renderer processing.core.PGraphics3D.
In order to render controlP5 elements you need to call the ControlP5's draw() manually.
Suggestion is to put controlP5.draw ...
edit retag flag offensive close merge delete



What would you like to visualize? You get object classes back, if you would like to visualize object positions, you need to find the corresponding instances.

moritz gravatar image moritz  ( 2012-11-23 20:44:10 -0500 )edit

@moritz see update please

Amal gravatar image Amal  ( 2012-11-24 04:01:09 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2012-11-26 18:14:31 -0500

moritz gravatar image

There are several issues:

1) The inference returns object classes ("citrus fruits can usually be found in kitchens"), the visualization needs concrete object instances that have a position ("THAT lemon in THIS kitchen"). You can't visualize "a citrus fruit".

2) ERROR: Undefined procedure: add_object/3 ERROR: However, there are definitions for: ERROR: mod_vis:add_object/2

means that there is no predicate add_object that accepts three arguments, only one that accepts two. Like most other programming languages, Prolog doesn't allow you to just add arguments to a predicate call (what is it supposed do with them?)

3) ERROR: Undefined procedure: display_informations_for/3 ERROR: However, there are definitions for: ERROR: mod_vis:display_information_for/2

is an obvious typo. Please do at least read the error messages before asking.

edit flag offensive delete link more

Question Tools


Asked: 2012-11-23 07:32:23 -0500

Seen: 390 times

Last updated: Nov 26 '12