ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | Q&A
Ask Your Question

link between detection algorithm and the knowledge base in Knowrob

asked 2013-02-03 07:27:45 -0500

salma gravatar image

updated 2013-02-28 01:15:21 -0500

Hi all , I am working on an Roboearth application like Amigo who use roboearth to download object models to do a task

I am working now on detection package that detect the requested Object .

I tried re_object_detector_gui package that use the re_kinect_object_detector algorithm

BUT ,, this gui is manually by user choose or download the object model

1- How can i use the detect algorithm re_kinect_object_detector without this gui

by automatic detect the correspond object when i ask it for a cup for example this query search on knowrob data set and the result model detected by the detection algorithm ?

2- i wanna a sequence of how this process working like : first ,query from the user by .. Second : search in the knowledge base using ... third : if he found the model that match my request detect it by ... etec ...

thanks :)

Edited :

I made a simple talker node that publish an object model path in the re_kinect/model_path (std_msgs/String)

see the code :

#include "ros/ros.h"
#include "std_msgs/String.h"
#include <sstream>

int main(int argc, char **argv)

  ros::init(argc, argv, "talker");

  ros::NodeHandle n;

  ros::Publisher chatter_pub = n.advertise<std_msgs::String>("re_kinect/model_path", 1000);

  ros::Rate loop_rate(10);

  int count = 0;
  while (ros::ok())

    std_msgs::String msg;

    std::stringstream ss;
    ss << "/home/turtlebot/Desktop/drink.b5ero_kinect" << count; = ss.str();



and rosmaked it with no error then :

1- run the openni launch

2- run the talker node , it returns the string of the model path

3- run the re_kinect node detector to detect

but it returns :

turtlebot@turtlebot-HP-Compaq-tc4400-EY609EA-ABB:~$ rosrun re_kinect_object_detector re_kinect
[ WARN] [1361999828.637136682]: no model files loaded!

how can it load the fixed model path i have entered all the time i run the detector ? where is the wrong ?

and that is the rxgraph for it : image description

thanks :)

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2013-02-03 20:30:49 -0500

moritz gravatar image

re_kinect_object_detector publishes the detected objects on a topic, as described in the documentation:

To get the object detections into KnowRob, you will need to write a topic listener that listens to all detected objects and creates the corresponding instances in the knowledge base. An example for the re_vision recognition component can be found in re_ontology/prolog/ (re_vision_listener/1). There is currently no listener for the DetectionResult messages, but the only thing you need to do is to adapt the re_vision listener to the other message format.

edit flag offensive delete link more


actually i am a beginner in that, but i opened th object_detector main code ,, i Understand that it writes four topics : ros::Subscriber kinect_sub; ros::Subscriber model_sub; ros::Publisher features_pub; ros::Publisher detected_objects_pub;

salma gravatar image salma  ( 2013-02-15 03:59:21 -0500 )edit

Should i write this listener topic in main code ? this example of file in the prolog folder is a module ,, should i do a module like it in re_kinect_object_detector ??

salma gravatar image salma  ( 2013-02-15 04:02:28 -0500 )edit

It seems that the concept of topics is not really clear, I recommend the tutorial You probably want to create your own program that listens to the detected_objects topic.

moritz gravatar image moritz  ( 2013-02-17 10:32:02 -0500 )edit

i have been read this tutorial before and did this turtlism app , but i didn't use it in a own code before . thanks moritz i 'll try :)

salma gravatar image salma  ( 2013-02-17 12:14:40 -0500 )edit

Question edited please check it :) thanks :)

salma gravatar image salma  ( 2013-02-27 09:39:22 -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



Asked: 2013-02-03 07:27:45 -0500

Seen: 334 times

Last updated: Feb 28 '13