0
$\begingroup$

Rosanswers logo

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;
    msg.data = ss.str();

    ROS_INFO("%s", msg.data.c_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 :)


Originally posted by salma on ROS Answers with karma: 464 on 2013-02-03

Post score: 2

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

re_kinect_object_detector publishes the detected objects on a topic, as described in the documentation: http://www.ros.org/wiki/re_kinect_object_detector

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/comp_re_vision.pl (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.


Originally posted by moritz with karma: 2673 on 2013-02-03

This answer was ACCEPTED on the original site

Post score: 1


Original comments

Comment by salma on 2013-02-15:
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;

Comment by salma on 2013-02-15:
Should i write this listener topic in main code ? this example of comp_re_vision.pl file in the prolog folder is a module ,, should i do a module like it in re_kinect_object_detector ??

Comment by moritz on 2013-02-17:
It seems that the concept of topics is not really clear, I recommend the tutorial http://www.ros.org/wiki/ROS/Tutorials/UnderstandingTopics. You probably want to create your own program that listens to the detected_objects topic.

Comment by salma on 2013-02-17:
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 :)

Comment by salma on 2013-02-27:
Question edited please check it :) thanks :)

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.