introlab / find-object

Find-Object project
http://introlab.github.io/find-object/
BSD 3-Clause "New" or "Revised" License
448 stars 189 forks source link

Empty frame ID #145

Closed takahiko-hasegawa-hdjp closed 8 months ago

takahiko-hasegawa-hdjp commented 8 months ago

HI there Im using ROS2 interface of find object and i encountered an issue. when object is detected, it publishes a topic called /objectsStamped but the the frameId is always empty.

in FindObjectROS.cpp therte is a line of code that extracts frame ID from header but seems empty.

      // use same header as the input image (for synchronization and frame reference)
      msgStamped.header.frame_id = header.frameId_.toStdString();

and I suppose the function of this FindObjectROS::publish is a callback function of the following

      QObject::connect(
              &mainWindow,
              SIGNAL(objectsFound(const find_object::DetectionInfo &, const find_object::Header &, const cv::Mat &, float)),
              findObjectROS_,
              SLOT(publish(const find_object::DetectionInfo &, const find_object::Header &, const cv::Mat &, float)));

How can I resolve this issue?

matlabbe commented 8 months ago

Does the image topic sent to find_object have a frame_id set?

takahiko-hasegawa-hdjp commented 8 months ago

OK I got it now! frame ID wasnt set on my rgb topic.

Another question not related but is there a way to save multiple objects to a folder but shares the same ID? so there is one object that i want to detect but depending on the lighting condition and some angle difference the detection is not great. So I want to save multiple "images" for same object. Can I do that?

Can we also set feature detection and descriptor type from config file?

matlabbe commented 8 months ago

You can create a settings file and pass it to find_object_2d node with settings_path parameter: http://wiki.ros.org/find_object_2d (from find object ui, you can do File->Save Settings... to get a settings file)

Each image has its own unique ID, you would need to combine yourself the range of IDs that represent the same object. For example, IDs 1 to 9 are object A, IDs 10 to 19 are object B....

takahiko-hasegawa-hdjp commented 8 months ago

Thank you!! Thats sorted now!

Created new issue here: The problem I have is that I have multiple landmarks in my environment where the shape of those landmarks are identical but the colours are differnt.

I understand that the feature matching relies on the descriptor of the keypoints extracted whichi do not consider colour. Is there a way to utilise colour information?

Created new issue here since its completely off topic: #146

Thanks!