Ask Your Question
0

Help with header/code adaptation of RGBDSLAM

asked 2014-06-10 09:11:04 -0500

TSC gravatar image

updated 2014-06-10 11:58:22 -0500

Hi to all,

Right now I'm trying to adapt and migrate the ROS package RGBDSLAM to ROS Indigo and, after talking to Felix Endres, the code developer and the responsible for the package maintenance, I thought it should be better to get some help around here, cause it seems like the API from OpenCV got some changes that are not compatible with the rgbdslam previous code.

Right now I have OpenCV-2.4.9 installed on Ubuntu 13.10 Saucy. The following errors appear when I do catkin_make on the workspace folder: (I'm going to split them in different cases so it can be better analyzed)

In file included from /home/nuno/AIMAVProject_ws/src/rgbdslam_v2/src/sift_gpu_wrapper.cpp:18:0:
/home/nuno/AIMAVProject_ws/src/rgbdslam_v2/src/sift_gpu_wrapper.h:49:40: error: ‘cv::vector’ has not been declared
  void detect(const cv::Mat& image, cv::vector<cv::KeyPoint>& keypoints, std::vector<float>& descriptors, const cv::Mat& mask = cv::Mat()) const;
                                        ^

/home/nuno/AIMAVProject_ws/src/rgbdslam_v2/src/sift_gpu_wrapper.h:49:46: error: expected ‘,’ or ‘...’ before ‘<’ token
  void detect(const cv::Mat& image, cv::vector<cv::KeyPoint>& keypoints, std::vector<float>& descriptors, const cv::Mat& mask = cv::Mat()) const;
                                              ^

/home/nuno/AIMAVProject_ws/src/rgbdslam_v2/src/sift_gpu_wrapper.cpp:108:55: error: ‘cv::vector’ has not been declared
 void SiftGPUWrapper::detect(const cv::Mat& image, cv::vector<cv::KeyPoint>& keypoints, std::vector<float>& descriptors, const Mat& mask) const {
                                                       ^

/home/nuno/AIMAVProject_ws/src/rgbdslam_v2/src/sift_gpu_wrapper.cpp:108:61: error: expected ‘,’ or ‘...’ before ‘<’ token
 void SiftGPUWrapper::detect(const cv::Mat& image, cv::vector<cv::KeyPoint>& keypoints, std::vector<float>& descriptors, const Mat& mask) const {
                                                             ^

/home/nuno/AIMAVProject_ws/src/rgbdslam_v2/src/sift_gpu_wrapper.cpp: In member function ‘void SiftGPUWrapper::detect(const cv::Mat&, int) const’:
/home/nuno/AIMAVProject_ws/src/rgbdslam_v2/src/sift_gpu_wrapper.cpp:111:9: error: ‘keypoints’ was not declared in this scope
         keypoints.clear();
         ^

/home/nuno/AIMAVProject_ws/src/rgbdslam_v2/src/sift_gpu_wrapper.cpp:133:9: error: ‘descriptors’ was not declared in this scope
         descriptors.resize(128 * num_features);
         ^

/home/nuno/AIMAVProject_ws/src/rgbdslam_v2/src/sift_gpu_wrapper.cpp:141:5: error: ‘keypoints’ was not declared in this scope
     keypoints.clear();
     ^

/home/nuno/AIMAVProject_ws/src/rgbdslam_v2/src/misc.cpp:370:40: error: ‘string’ does not name a type
 FeatureDetector* createDetector( const string& detectorType ) 
                                        ^

/home/nuno/AIMAVProject_ws/src/rgbdslam_v2/src/misc.cpp:370:48: error: ISO C++ forbids declaration of ‘detectorType’ with no type [-fpermissive]
 FeatureDetector* createDetector( const string& detectorType ) 
                                                ^

/home/nuno/AIMAVProject_ws/src/rgbdslam_v2/src/misc.cpp: In function ‘cv::FeatureDetector* createDetector(const int&)’:
/home/nuno/AIMAVProject_ws/src/rgbdslam_v2/src/misc.cpp:374:23: error: request for member ‘compare’ in ‘detectorType’, which is of non-class type ‘const int’
     if( !detectorType.compare( "FAST" ) ) {
                       ^

/home/nuno/AIMAVProject_ws/src/rgbdslam_v2/src/misc.cpp:379:56: error: no matching function for call to ‘cv::DynamicAdaptedFeatureDetector::DynamicAdaptedFeatureDetector(cv::FastAdjuster*, int, int, int)’
             params->get<int>("adjuster_max_iterations"));
                                                        ^

/home/nuno/AIMAVProject_ws/src/rgbdslam_v2/src/misc.cpp:379:56: note: candidates are:
In file included from /usr/local/include/opencv2/features2d/features2d.hpp:48:0,
                 from /usr/include/opencv ...
(more)
edit retag flag offensive close merge delete

1 answer

Sort by » oldest newest most voted
0

answered 2014-06-11 02:56:08 -0500

It seems the first error is because vector isn't included

#include <vector>

For the compare function, I can't find it in the documentation. Is it an OpenCV type (like FeatureDetector)? In that case, there is no compare function. Maybe you want to use create instead?

For the SIFT part, see the doc of non-free module (and don't forget to include the non-free header!

I hope this helps.

edit flag offensive delete link more

Question Tools

Stats

Asked: 2014-06-10 09:11:04 -0500

Seen: 1,207 times

Last updated: Jun 11 '14