Re: Build project with example code but failed, Any help great appreciated!

Posted by derwee on
URL: http://official-rtab-map-forum.206.s1.nabble.com/Build-project-with-example-code-but-failed-Any-help-great-appreciated-tp545p564.html

Hi Matlabbe,
We try to get label in map with sensor data which from kinect. But failed. How to current signatur which match with sensor data?  When we call interface rtabmap.getMemory()->getLastWorkingSignature()->id(), It return the last one in map. Is there some way to implement this requirement? Thanks.
                                   
                                       //retrieve all the signature to get label
                                        std::set<int> sigs = rtabmap.getMemory()->getAllSignatureIds();
                                        std::set<int>::iterator iter = sigs.begin();
                                        while (iter != sigs.end()) {
                                                printf("reeman signaturId= %d \n", *iter);
                                                const rtabmap::Signature *signature = rtabmap.getMemory()->getSignature(*iter);
                                                if (signature != NULL) {
                                                        label3 = rtabmap.getMemory()->getSignature(*iter)->getLabel();
                                                        printf("reeman I'm in label3= %s \n", label3.c_str());
                                                }
                                                iter++;
                                        }