strands-project / strands_3d_mapping

Tools for building 3D maps and using these maps for navigation and visualization.
25 stars 39 forks source link

ekz-public-lib on indigo #67

Open cburbridge opened 9 years ago

cburbridge commented 9 years ago

ekz-public lib does not compile on indigo:

[ 73%] Built target semantic_map
In file included from /usr/include/pcl-1.7/pcl/search/kdtree.h:44:0,
                 from /usr/include/pcl-1.7/pcl/search/pcl_search.h:44,
                 from /usr/include/pcl-1.7/pcl/features/impl/feature.hpp:44,
                 from /usr/include/pcl-1.7/pcl/features/feature.h:498,
                 from /usr/include/pcl-1.7/pcl/features/normal_3d.h:44,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/core/Calibration.h:10,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/core/FrameInput.h:6,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/src/core/FrameInput.cpp:1:
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h:228:29: error: field ‘param_k_’ has incomplete type
       ::flann::SearchParams param_k_;
                             ^
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h:231:29: error: field ‘param_radius_’ has incomplete type
       ::flann::SearchParams param_radius_;
                             ^
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h: In member function ‘pcl::KdTreeFLANN<PointT>& pcl::KdTreeFLANN<PointT, Dist>::operator=(const pcl::KdTreeFLANN<PointT>&)’:
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h:115:9: error: ‘param_k_’ was not declared in this scope
         param_k_ = k.param_k_;
         ^
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h:116:9: error: ‘param_radius_’ was not declared in this scope
         param_radius_ = k.param_radius_;
         ^
In file included from /usr/include/pcl-1.7/pcl/visualization/pcl_visualizer.h:52:0,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/FrameMatcher/FrameMatcher.h:16,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/src/FrameMatcher/FrameMatcher.cpp:1:
/usr/include/pcl-1.7/pcl/visualization/area_picking_event.h: In member function ‘bool pcl::visualization::AreaPickingEvent::getPointsIndices(std::vector<int>&) const’:
/usr/include/pcl-1.7/pcl/visualization/area_picking_event.h:64:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           if (nb_points_ == -1)
                              ^
In file included from /usr/include/pcl-1.7/pcl/visualization/pcl_visualizer.h:52:0,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/RGBDSegmentation/RGBDSegmentation.h:24,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/src/RGBDSegmentation/RGBDSegmentation.cpp:1:
/usr/include/pcl-1.7/pcl/visualization/area_picking_event.h: In member function ‘bool pcl::visualization::AreaPickingEvent::getPointsIndices(std::vector<int>&) const’:
/usr/include/pcl-1.7/pcl/visualization/area_picking_event.h:64:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           if (nb_points_ == -1)
                              ^
In file included from /usr/include/pcl-1.7/pcl/visualization/pcl_visualizer.h:52:0,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/core/Calibration.h:12,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/core/FrameInput.h:6,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/src/core/FrameInput.cpp:1:
/usr/include/pcl-1.7/pcl/visualization/area_picking_event.h: In member function ‘bool pcl::visualization::AreaPickingEvent::getPointsIndices(std::vector<int>&) const’:
/usr/include/pcl-1.7/pcl/visualization/area_picking_event.h:64:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           if (nb_points_ == -1)
                              ^
In file included from /usr/include/pcl-1.7/pcl/visualization/pcl_visualizer.h:52:0,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/FrameMatcher/BowAICK.h:19,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/src/FrameMatcher/BowAICK.cpp:1:
/usr/include/pcl-1.7/pcl/visualization/area_picking_event.h: In member function ‘bool pcl::visualization::AreaPickingEvent::getPointsIndices(std::vector<int>&) const’:
/usr/include/pcl-1.7/pcl/visualization/area_picking_event.h:64:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           if (nb_points_ == -1)
                              ^
In file included from /usr/include/pcl-1.7/pcl/visualization/pcl_visualizer.h:52:0,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/FrameMatcher/AICK.h:18,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/src/FrameMatcher/AICK.cpp:1:
/usr/include/pcl-1.7/pcl/visualization/area_picking_event.h: In member function ‘bool pcl::visualization::AreaPickingEvent::getPointsIndices(std::vector<int>&) const’:
/usr/include/pcl-1.7/pcl/visualization/area_picking_event.h:64:30: warning: comparison between signed and unsigned integer expressions [-Wsign-compare]
           if (nb_points_ == -1)
                              ^
In file included from /usr/include/pcl-1.7/pcl/search/kdtree.h:44:0,
                 from /usr/include/pcl-1.7/pcl/search/pcl_search.h:44,
                 from /usr/include/pcl-1.7/pcl/features/impl/feature.hpp:44,
                 from /usr/include/pcl-1.7/pcl/features/feature.h:498,
                 from /usr/include/pcl-1.7/pcl/features/normal_3d.h:44,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/core/Calibration.h:10,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/core/FrameInput.h:6,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/RGBDSegmentation/RGBDSegmentation.h:29,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/src/RGBDSegmentation/RGBDSegmentation.cpp:1:
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h: At global scope:
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h:228:29: error: field ‘param_k_’ has incomplete type
       ::flann::SearchParams param_k_;
                             ^
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h:231:29: error: field ‘param_radius_’ has incomplete type
       ::flann::SearchParams param_radius_;
                             ^
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h: In member function ‘pcl::KdTreeFLANN<PointT>& pcl::KdTreeFLANN<PointT, Dist>::operator=(const pcl::KdTreeFLANN<PointT>&)’:
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h:115:9: error: ‘param_k_’ was not declared in this scope
         param_k_ = k.param_k_;
         ^
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h:116:9: error: ‘param_radius_’ was not declared in this scope
         param_radius_ = k.param_radius_;
         ^
In file included from /usr/include/pcl-1.7/pcl/search/kdtree.h:44:0,
                 from /usr/include/pcl-1.7/pcl/search/pcl_search.h:44,
                 from /usr/include/pcl-1.7/pcl/features/impl/feature.hpp:44,
                 from /usr/include/pcl-1.7/pcl/features/feature.h:498,
                 from /usr/include/pcl-1.7/pcl/features/normal_3d.h:44,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/core/Calibration.h:10,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/core/FrameInput.h:6,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/FeatureExtractor/FeatureExtractor.h:14,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/core/RGBDFrame.h:21,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/FrameMatcher/FrameMatcher.h:19,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/src/FrameMatcher/FrameMatcher.cpp:1:
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h: At global scope:
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h:228:29: error: field ‘param_k_’ has incomplete type
       ::flann::SearchParams param_k_;
                             ^
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h:231:29: error: field ‘param_radius_’ has incomplete type
       ::flann::SearchParams param_radius_;
                             ^
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h: In member function ‘pcl::KdTreeFLANN<PointT>& pcl::KdTreeFLANN<PointT, Dist>::operator=(const pcl::KdTreeFLANN<PointT>&)’:
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h:115:9: error: ‘param_k_’ was not declared in this scope
         param_k_ = k.param_k_;
         ^
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h:116:9: error: ‘param_radius_’ was not declared in this scope
         param_radius_ = k.param_radius_;
         ^
In file included from /usr/include/pcl-1.7/pcl/search/kdtree.h:44:0,
                 from /usr/include/pcl-1.7/pcl/search/pcl_search.h:44,
                 from /usr/include/pcl-1.7/pcl/features/impl/feature.hpp:44,
                 from /usr/include/pcl-1.7/pcl/features/feature.h:498,
                 from /usr/include/pcl-1.7/pcl/features/normal_3d.h:44,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/core/Calibration.h:10,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/core/FrameInput.h:6,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/FeatureExtractor/FeatureExtractor.h:14,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/core/RGBDFrame.h:21,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/FrameMatcher/FrameMatcher.h:19,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/FrameMatcher/BowAICK.h:26,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/src/FrameMatcher/BowAICK.cpp:1:
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h: At global scope:
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h:228:29: error: field ‘param_k_’ has incomplete type
       ::flann::SearchParams param_k_;
                             ^
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h:231:29: error: field ‘param_radius_’ has incomplete type
       ::flann::SearchParams param_radius_;
                             ^
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h: In member function ‘pcl::KdTreeFLANN<PointT>& pcl::KdTreeFLANN<PointT, Dist>::operator=(const pcl::KdTreeFLANN<PointT>&)’:
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h:115:9: error: ‘param_k_’ was not declared in this scope
         param_k_ = k.param_k_;
         ^
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h:116:9: error: ‘param_radius_’ was not declared in this scope
         param_radius_ = k.param_radius_;
         ^
In file included from /usr/include/pcl-1.7/pcl/search/kdtree.h:44:0,
                 from /usr/include/pcl-1.7/pcl/search/pcl_search.h:44,
                 from /usr/include/pcl-1.7/pcl/features/impl/feature.hpp:44,
                 from /usr/include/pcl-1.7/pcl/features/feature.h:498,
                 from /usr/include/pcl-1.7/pcl/features/normal_3d.h:44,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/core/Calibration.h:10,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/core/FrameInput.h:6,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/FeatureExtractor/FeatureExtractor.h:14,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/core/RGBDFrame.h:21,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/FrameMatcher/FrameMatcher.h:19,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/include/FrameMatcher/AICK.h:25,
                 from /home/chris/ros_ws/src/strands_3d_mapping/ekz-public-lib/src/FrameMatcher/AICK.cpp:1:
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h: At global scope:
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h:228:29: error: field ‘param_k_’ has incomplete type
       ::flann::SearchParams param_k_;
                             ^
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h:231:29: error: field ‘param_radius_’ has incomplete type
       ::flann::SearchParams param_radius_;
                             ^
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h: In member function ‘pcl::KdTreeFLANN<PointT>& pcl::KdTreeFLANN<PointT, Dist>::operator=(const pcl::KdTreeFLANN<PointT>&)’:
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h:115:9: error: ‘param_k_’ was not declared in this scope
         param_k_ = k.param_k_;
         ^
/usr/include/pcl-1.7/pcl/kdtree/kdtree_flann.h:116:9: error: ‘param_radius_’ was not declared in this scope
         param_radius_ = k.param_radius_;
         ^
make[2]: *** [strands_3d_mapping/ekz-public-lib/CMakeFiles/RGBDSegmentation_ekzpublic.dir/src/RGBDSegmentation/RGBDSegmentation.cpp.o] Error 1
make[1]: *** [strands_3d_mapping/ekz-public-lib/CMakeFiles/RGBDSegmentation_ekzpublic.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
make[2]: *** [strands_3d_mapping/ekz-public-lib/CMakeFiles/frameinput_ekzpublic.dir/src/core/FrameInput.cpp.o] Error 1
make[1]: *** [strands_3d_mapping/ekz-public-lib/CMakeFiles/frameinput_ekzpublic.dir/all] Error 2
make[2]: *** [strands_3d_mapping/ekz-public-lib/CMakeFiles/FrameMatcher_ekzpublic.dir/src/FrameMatcher/FrameMatcher.cpp.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [strands_3d_mapping/ekz-public-lib/CMakeFiles/FrameMatcher_ekzpublic.dir/src/FrameMatcher/BowAICK.cpp.o] Error 1
make[2]: *** [strands_3d_mapping/ekz-public-lib/CMakeFiles/FrameMatcher_ekzpublic.dir/src/FrameMatcher/AICK.cpp.o] Error 1
make[1]: *** [strands_3d_mapping/ekz-public-lib/CMakeFiles/FrameMatcher_ekzpublic.dir/all] Error 2
make: *** [all] Error 2
Invoking "make -j12 -l12" failed

I hav blacklisted it with touch CATKIN_IGNORE, and all other packages compile ok. @RaresAmbrus is this needed by the semantic mapping code?

nilsbore commented 9 years ago

It's not needed for semantic map so you can delete it if you just want to use that. @jekekrantz will have to fix this or delete the package if it's not going to be used.

cburbridge commented 9 years ago

@jekekrantz ??

tony5614 commented 7 years ago

try this. I am using 1.7.1 and I modify these two files because of the forward declaration,we can only declare a pointer ::flann::SearchParams *paramk; instead of a instance ::flann::SearchParams paramk;

kdtree_flann.hpp: http://pastebin.com/j2aVdXQr kdtree_flann.h http://pastebin.com/38spwRxk

shubham0108 commented 7 years ago

It works @tony5614 . Thanks a lot. (Cries tears of joy)

AirSmithX commented 7 years ago

unbeliveble !!!!!!!!!!!!!!!!! IT WORKS!!!!!!!!!!!!!!!!!!!!!!

nmssilva commented 6 years ago

lol I can't believe this actually worked. The pcl files should be updated asap...

hawesie commented 6 years ago

@jekekrantz any thoughts?

ninja-sword commented 3 years ago

First I changed file name /usr/local/include/opencv2/flann/flann.hpp to /usr/local/include/opencv2/flann/cvflann.hpp, I can do this because it seems a useless head file and causes conflict. Second I changed [#include "flann/general.h"] in /usr/include/flann/flann.hpp to [#include "general.h"] to make sure it not going to find wrong head file again( /usr/local/include/opencv2/flann/general.h )

YuanxianH commented 3 years ago

try this. I am using 1.7.1 and I modify these two files because of the forward declaration,we can only declare a pointer *::flann::SearchParams paramk; instead of a instance ::flann::SearchParams paramk;**

kdtree_flann.hpp: http://pastebin.com/j2aVdXQr kdtree_flann.h http://pastebin.com/38spwRxk

It does work!!!

ksvbka commented 3 years ago

try this. I am using 1.7.1 and I modify these two files because of the forward declaration,we can only declare a pointer *::flann::SearchParams paramk; instead of a instance ::flann::SearchParams paramk;**

kdtree_flann.hpp: http://pastebin.com/j2aVdXQr kdtree_flann.h http://pastebin.com/38spwRxk

Thank, magical!!!

zhujun3753 commented 2 years ago

try this. I am using 1.7.1 and I modify these two files because of the forward declaration,we can only declare a pointer *::flann::SearchParams paramk; instead of a instance ::flann::SearchParams paramk;**

kdtree_flann.hpp: http://pastebin.com/j2aVdXQr kdtree_flann.h http://pastebin.com/38spwRxk

This can not work in some cases. There is another choice: in/usr/include/pcl-1.8/pcl/kdtree/kdtree_flann.h, add the following :

// Forward declarations
namespace flann
{
....
}
//=========new add starts!!=================
namespace myflann
{
    typedef enum {
        FLANN_False = 0,
        FLANN_True = 1,
        FLANN_Undefined
    } tri_type;
  struct SearchParams
    {
        SearchParams(int checks_ = 32, float eps_ = 0.0, bool sorted_ = true ) :
            checks(checks_), eps(eps_), sorted(sorted_)
        {
            max_neighbors = -1;
            use_heap = FLANN_Undefined;
            cores = 1;
            matrices_in_gpu_ram = false;
        }

        // how many leafs to visit when searching for neighbours (-1 for unlimited)
        int checks;
        // search for eps-approximate neighbours (default: 0)
        float eps;
        // only for radius search, require neighbours sorted by distance (default: true)
        bool sorted;
        // maximum number of neighbors radius search should return (-1 for unlimited)
        int max_neighbors;
        // use a heap to manage the result set (default: FLANN_Undefined)
        tri_type use_heap;
        // how many cores to assign to the search (used only if compiled with OpenMP capable compiler) (0 for auto)
        int cores;
        // for GPU search indicates if matrices are already in GPU ram
        bool matrices_in_gpu_ram;
    };
}
//=========new add ends !!=================
namespace pcl
{
....
}

and modify ::flann::SearchParams param_k_; as ::myflann::SearchParams param_k_;, ::flann::SearchParams param_radius_; as ::myflann::SearchParams param_radius_; This issue could be solved!!