Code Monkey home page Code Monkey logo

cilantro's People

Contributors

aecins avatar algomorph avatar avikde avatar gumeo avatar kanishkaganguly avatar kzampog avatar raum avatar straszheim avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

cilantro's Issues

how to use this library in my project?

are there any examples about how to write CMakeLists. and how to this library in my project
when i write a CMakeLists and make the "non_rigid_icp.cpp" , but i get mistake like:

[ 50%] Building CXX object CMakeFiles/gen.dir/non_rigid_icp.cpp.o
[100%] Linking CXX executable gen
CMakeFiles/gen.dir/non_rigid_icp.cpp.o: In function color_toggle(cilantro::Visualizer&)': non_rigid_icp.cpp:(.text+0x17a): undefined reference to cilantro::Visualizer::getRenderingProperties(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) const'
non_rigid_icp.cpp:(.text+0x1a5): undefined reference to cilantro::RenderingProperties::noColor' non_rigid_icp.cpp:(.text+0x1de): undefined reference to cilantro::RenderingProperties::noColor'
non_rigid_icp.cpp:(.text+0x230): undefined reference to cilantro::Visualizer::setRenderingProperties(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cilantro::RenderingProperties const&)' non_rigid_icp.cpp:(.text+0x295): undefined reference to cilantro::Visualizer::getRenderingProperties(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&) const'
non_rigid_icp.cpp:(.text+0x2e5): undefined reference to cilantro::RenderingProperties::noColor' non_rigid_icp.cpp:(.text+0x31e): undefined reference to cilantro::RenderingProperties::noColor'
non_rigid_icp.cpp:(.text+0x370): undefined reference to cilantro::Visualizer::setRenderingProperties(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, cilantro::RenderingProperties const&)' CMakeFiles/gen.dir/non_rigid_icp.cpp.o: In function warp_toggle(cilantro::Visualizer&)':
non_rigid_icp.cpp:(.text+0x4e9): undefined reference to cilantro::Visualizer::toggleVisibility(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' CMakeFiles/gen.dir/non_rigid_icp.cpp.o: In function main':
non_rigid_icp.cpp:(.text+0xf07): undefined reference to cilantro::Visualizer::Visualizer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' non_rigid_icp.cpp:(.text+0xf6f): undefined reference to cilantro::Visualizer::Visualizer(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&)'
non_rigid_icp.cpp:(.text+0xfd7): undefined reference to cilantro::Visualizer::Visualizer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' non_rigid_icp.cpp:(.text+0x10c2): undefined reference to cilantro::Visualizer::registerKeyboardCallback(unsigned char, std::function<void ()>)'
non_rigid_icp.cpp:(.text+0x1136): undefined reference to cilantro::Visualizer::registerKeyboardCallback(unsigned char, std::function<void ()>)' non_rigid_icp.cpp:(.text+0x13e6): undefined reference to cilantro::Visualizer::registerKeyboardCallback(unsigned char, std::function<void ()>)'
non_rigid_icp.cpp:(.text+0x171a): undefined reference to cilantro::Visualizer::clearRenderArea()' non_rigid_icp.cpp:(.text+0x1729): undefined reference to cilantro::Visualizer::render()'
non_rigid_icp.cpp:(.text+0x1738): undefined reference to cilantro::Visualizer::render()' non_rigid_icp.cpp:(.text+0x1747): undefined reference to cilantro::Visualizer::render()'
non_rigid_icp.cpp:(.text+0x1774): undefined reference to cilantro::Visualizer::~Visualizer()' non_rigid_icp.cpp:(.text+0x1783): undefined reference to cilantro::Visualizer::~Visualizer()'
non_rigid_icp.cpp:(.text+0x1792): undefined reference to cilantro::Visualizer::~Visualizer()' non_rigid_icp.cpp:(.text+0x1c04): undefined reference to cilantro::Visualizer::~Visualizer()'
non_rigid_icp.cpp:(.text+0x1c13): undefined reference to cilantro::Visualizer::~Visualizer()' CMakeFiles/gen.dir/non_rigid_icp.cpp.o:non_rigid_icp.cpp:(.text+0x1c22): more undefined references to cilantro::Visualizer::~Visualizer()' follow
CMakeFiles/gen.dir/non_rigid_icp.cpp.o: In function cilantro::PLYReader::PLYReader(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, bool)': non_rigid_icp.cpp:(.text._ZN8cilantro9PLYReaderC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb[_ZN8cilantro9PLYReaderC5ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb]+0x42): undefined reference to tinyply::PlyFile::PlyFile()'
non_rigid_icp.cpp:(.text._ZN8cilantro9PLYReaderC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb[_ZN8cilantro9PLYReaderC5ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb]+0x103): undefined reference to tinyply::PlyFile::parse_header(std::istream&)' non_rigid_icp.cpp:(.text._ZN8cilantro9PLYReaderC2ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb[_ZN8cilantro9PLYReaderC5ERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEEb]+0x138): undefined reference to tinyply::PlyFile::~PlyFile()'
CMakeFiles/gen.dir/non_rigid_icp.cpp.o: In function cilantro::PLYReader::elementPropertyExists(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&) const': non_rigid_icp.cpp:(.text._ZNK8cilantro9PLYReader21elementPropertyExistsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS6_SaIS6_EE[_ZNK8cilantro9PLYReader21elementPropertyExistsERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS6_SaIS6_EE]+0x46): undefined reference to tinyply::PlyFile::get_elements() const'
CMakeFiles/gen.dir/non_rigid_icp.cpp.o: In function cilantro::PLYReader::requestData(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, std::allocator<std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > > > const&, unsigned int)': non_rigid_icp.cpp:(.text._ZN8cilantro9PLYReader11requestDataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS6_SaIS6_EEj[_ZN8cilantro9PLYReader11requestDataERKNSt7__cxx1112basic_stringIcSt11char_traitsIcESaIcEEERKSt6vectorIS6_SaIS6_EEj]+0x89): undefined reference to tinyply::PlyFile::request_properties_from_element(std::__cxx11::basic_string<char, std::char_traits, std::allocator > const&, std::vector<std::__cxx11::basic_string<char, std::char_traits, std::allocator >, std::allocator<std::__cxx11::basic_string<char, std::char_traits, std::allocator > > >, unsigned int)'
CMakeFiles/gen.dir/non_rigid_icp.cpp.o: In function cilantro::PLYReader::readData()': non_rigid_icp.cpp:(.text._ZN8cilantro9PLYReader8readDataEv[_ZN8cilantro9PLYReader8readDataEv]+0x2e): undefined reference to tinyply::PlyFile::read(std::istream&)'
CMakeFiles/gen.dir/non_rigid_icp.cpp.o: In function cilantro::RenderingProperties::RenderingProperties()': non_rigid_icp.cpp:(.text._ZN8cilantro19RenderingPropertiesC2Ev[_ZN8cilantro19RenderingPropertiesC5Ev]+0x30): undefined reference to cilantro::RenderingProperties::noColor'
non_rigid_icp.cpp:(.text._ZN8cilantro19RenderingPropertiesC2Ev[_ZN8cilantro19RenderingPropertiesC5Ev]+0x45): undefined reference to cilantro::RenderingProperties::noColor' CMakeFiles/gen.dir/non_rigid_icp.cpp.o: In function cilantro::PLYReader::~PLYReader()':
non_rigid_icp.cpp:(.text._ZN8cilantro9PLYReaderD2Ev[_ZN8cilantro9PLYReaderD5Ev]+0x18): undefined reference to tinyply::PlyFile::~PlyFile()' CMakeFiles/gen.dir/non_rigid_icp.cpp.o: In function cilantro::PointCloudRenderable::PointCloudRenderable<cilantro::PointCloud<float, 3l>, void>(cilantro::PointCloud<float, 3l> const&, cilantro::RenderingProperties const&)':
non_rigid_icp.cpp:(.text._ZN8cilantro20PointCloudRenderableC2INS_10PointCloudIfLl3EEEvEERKT_RKNS_19RenderingPropertiesE[_ZN8cilantro20PointCloudRenderableC5INS_10PointCloudIfLl3EEEvEERKT_RKNS_19RenderingPropertiesE]+0x72): undefined reference to vtable for cilantro::PointCloudRenderable' CMakeFiles/gen.dir/non_rigid_icp.cpp.o: In function cilantro::PointCorrespondencesRenderable::PointCorrespondencesRenderable<cilantro::PointCloud<float, 3l>, void>(cilantro::PointCloud<float, 3l> const&, cilantro::PointCloud<float, 3l> const&, cilantro::RenderingProperties const&)':
non_rigid_icp.cpp:(.text._ZN8cilantro30PointCorrespondencesRenderableC2INS_10PointCloudIfLl3EEEvEERKT_S6_RKNS_19RenderingPropertiesE[_ZN8cilantro30PointCorrespondencesRenderableC5INS_10PointCloudIfLl3EEEvEERKT_S6_RKNS_19RenderingPropertiesE]+0x7f): undefined reference to `vtable for cilantro::PointCorrespondencesRenderable'
collect2: error: ld returned 1 exit status
CMakeFiles/gen.dir/build.make:131: recipe for target 'gen' failed
make[2]: *** [gen] Error 1
CMakeFiles/Makefile2:95: recipe for target 'CMakeFiles/gen.dir/all' failed
make[1]: *** [CMakeFiles/gen.dir/all] Error 2
Makefile:103: recipe for target 'all' failed
make: *** [all] Error 2
thank you very much!!

Grid accumulator race condition

I'm running into another issue with the parallel GridAccumulator in combination with the IndexAccumulatorProxy. Consider the example below

#include <iostream>

#include <cilantro/core.hpp>

namespace cilantro {
template <typename ScalarT, ptrdiff_t EigenDim,
          typename GridPointScalarT = ptrdiff_t>
class IndexGridDownsampler
    : public GridAccumulator<ScalarT, EigenDim, IndexAccumulatorProxy<>,
                             GridPointScalarT> {
 public:
  EIGEN_MAKE_ALIGNED_OPERATOR_NEW

  IndexGridDownsampler(const ConstVectorSetMatrixMap<ScalarT, EigenDim> &points,
                       ScalarT bin_size, bool parallel = true)
      : GridAccumulator<ScalarT, EigenDim, IndexAccumulatorProxy<>,
                        GridPointScalarT>(
            points, bin_size, IndexAccumulatorProxy<>(), parallel) {}

  const IndexGridDownsampler &getDownsampledPoints(
      VectorSet<ScalarT, EigenDim> &ds_points,
      size_t min_points_in_bin = 1) const {
    ds_points.resize(this->data_map_.rows(), this->grid_lookup_table_.size());

    ScalarT scale;
    size_t ind = 0;
    for (size_t k = 0; k < this->bin_iterators_.size(); k++) {
      if (this->bin_iterators_[k]->second.indices.size() < min_points_in_bin) {
        continue;
      } else {
        scale = (ScalarT)(1.0) / this->bin_iterators_[k]->second.indices.size();
        for (auto i : this->bin_iterators_[k]->second.indices) {
          ds_points.col(ind) += scale * this->data_map_.col(i);
        }
        ind++;
      }
    }

    ds_points.conservativeResize(Eigen::NoChange, ind);
    return *this;
  }

  inline VectorSet<ScalarT, EigenDim> getDownsampledPoints(
      size_t min_points_in_bin = 1) const {
    VectorSet<ScalarT, EigenDim> ds_points;
    getDownsampledPoints(ds_points, min_points_in_bin);
    return ds_points;
  }
};
}

int main(int argc, char ** argv) {
    cilantro::VectorSet3f points(3, 16);
    points << 0.1, 0.1, 0.1, 0.1, 0.9, 0.9, 0.9, 0.9, 1.1, 1.1, 1.1, 1.1, 1.9, 1.9, 1.9, 1.9,
              0.1, 0.9, 1.1, 1.9, 0.1, 0.9, 1.1, 1.9, 0.1, 0.9, 1.1, 1.9, 0.1, 0.9, 1.1, 1.9,
              0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0;

    cilantro::IndexGridDownsampler<float, 3> downsampler(points, 2. / 3, false);
    std::cout << "parallel=false" << std::endl;
    std::cout << downsampler.getDownsampledPoints() << std::endl;

    cilantro::IndexGridDownsampler<float, 3> downsampler_p(points, 2. / 3, true);
    std::cout << "parallel=true" << std::endl;
    std::cout << downsampler_p.getDownsampledPoints() << std::endl;
    return 0;
}

The output on my machine yields:

parallel=false
0.1 0.1 0.1   1   1   1 1.9 1.9 1.9
0.1   1 1.9 0.1   1 1.9 0.1   1 1.9
  0   0   0   0   0   0   0   0   0
parallel=true
0.1 0.2 0.2   2   2   2 3.8 3.8 3.8
0.1   2 3.8 0.2   2 3.8 0.2   2 3.8
  0   0   0   0   0   0   0   0   0

The result of the parallel implementation is clearly incorrect. It seems that it combines the wrong indices together.

Peculiar memory error

I encountered strange behavior related to Eigen and nanoflann in cilantro. Consider the following example.

#include <cilantro/kd_tree.hpp>
#include <cilantro/io.hpp>
#include <iostream>

cilantro::NeighborSet<float> foobar(const Eigen::Matrix3Xf& points) {
  cilantro::KDTree3f tree(points);
  return tree.radiusSearch(Eigen::Vector3f(0.1, 0.1, 0.4), 1.001);
}

struct Foo {
  Foo(const Eigen::Matrix3Xf& points) : tree(points) {}

  cilantro::NeighborSet<float> bar() {
    return tree.radiusSearch(Eigen::Vector3f(0.1, 0.1, 0.4), 1.001);
  }
  
  cilantro::KDTree3f tree;
};

int main(int argc, char** argv) {
  Eigen::Matrix3Xf points(3, 8);
  points << 0, 1, 0, 0, 0, 1, 1, 1,
            0, 0, 1, 0, 1, 0, 1, 1,
            0, 0, 0, 1, 1, 1, 0, 1;

  cilantro::NeighborSet<float> nn;
  { // Causes invalid read
    Foo foo(points.colwise() - Eigen::Vector3f(0.5, 0.5, 0.5));
    nn = foo.bar();
  }
  { // no issues
    Eigen::Matrix3Xf centered =
        points.colwise() - Eigen::Vector3f(0.5, 0.5, 0.5);
    Foo foo(centered);
    nn = foo.bar();
  }
  { // no issues
    nn = foobar(points.colwise() - Eigen::Vector3f(0.5, 0.5, 0.5));
  }
  return 0;
}

Instantiating Foo with a temporary as in the first call leads to invalid reads that trace back to evalMetric in nanoflann. The invalid read does not show up in the second instantiation of Foo. Similarly the call to foobar does not cause an issue.

Seems more related to third party libs, but it would be great if we could catch these subtleties somehow. Lost quite some time over this one.

Race conditions in grid accumulator?

I'm having issues with cilantro's grid accumulator. Occasionally, I'm getting strange results such as a normal = (0, 0, 0). I've narrowed down the issues to the parallelism the grid_accumulator.hpp. It seems to me that there are race conditions specifically in L150-154. I don't understand all the bits of the parallelization here but I believe the accumulator shouldn't be shared across threads as this can cause undefined behavior and a reduction should be used instead.
I will try to create a minimal example if necessary for debugging. For now, setting ENABLE_NON_DETERMINISTIC_PARALLELISM=OFF fixes the issue.

tinyply updates

heya! i know you just updated tinyply but I think you should upgrade again to 2.3.2. It has a couple bugfixes that I accidentally introduced in 2.3 (and a whole new suite of validation tests!). cheers.

Output of SimpleCombinedMetricRigidICP3f not deterministic

While testing out ICP, I noticed the output of SimpleCombinedMetricRigidICP3f.estimate() is not deterministic. It seems due to multithreading as removing this omp reduction makes the output deterministic.

Steps to reproduce:
Run the rigid_icp example multiple and observe the estimated transform. Even though differences are really small, I noticed very different results on other clouds, especially with respect to number of iterations.

I haven't checked the other implementations, but I suspect they suffer from the same issue.

TypeTraits.h

I have an issue with the TypeTraits.h file, I get these error and I do not understand how to resolve them.
What is causing these errors?:

image

where is the lib file

I built the project with CMakeList you provided. But, where is the lib file? I can't find it in the install folder.

I built without enabling Pangolin.

image

ExternalProject and Linking, is Cilantro header-only library?

Hi,

I would like to ask if Cilantro is a header-only library?

I clone the repository using ExternalProject via CMake.
How you would like to an executable with Cilantro and Eigen? Do I need to compile the cilantro as a library and then link to executable or it is possible to link like header libraries? Example with CMake would be much appreciated.

########################################################################
# REFERENCES AND BASH COMMANDS
########################################################################
# bash commands
# cmake -DGET_LIBS=ON -DBUILD_MY_PROJECTS=OFF  -DBUILD_SHARED_LIBS=ON -G "Visual Studio 17 2022" -A x64 .. && cmake --build . --config Release
# cmake -DGET_LIBS=OFF -DBUILD_MY_PROJECTS=ON  -DBUILD_SHARED_LIBS=ON -G "Visual Studio 17 2022" -A x64 .. && cmake --build . --config Release
# Release\my_exe

########################################################################
#PROJECT INTIALIZATION
########################################################################
project(superbuild LANGUAGES CXX)
cmake_minimum_required(VERSION 3.19)


set(CMAKE_BUILD_TYPE_INIT "Release")

set(CMAKE_CXX_STANDARD 14)
set(CMAKE_CXX_EXTENSIONS OFF)
set(CMAKE_CXX_STANDARD_REQUIRED ON)

########################################################################
# START SUPERBUILD
########################################################################

SET(GET_LIBS "" CACHE STRING "Set option to download dependencies")

cmake_policy(SET CMP0097 NEW)
include(ExternalProject)

set(LIB_DEBUG_SUFFIX "")
if (MSVC)
  set(LIB_DEBUG_SUFFIX "d")
endif ()


SET(GET_LIBS "" CACHE STRING "Set option to download dependencies")
if (GET_LIBS)
  message(AUTHOR_WARNING "GET_LIBS_" ${GET_LIBS})

  ########################################################################
  # EIGEN
  ########################################################################
  ExternalProject_Add(eigen
    GIT_REPOSITORY https://gitlab.com/libeigen/eigen.git
    GIT_TAG 3.4.0
    CMAKE_ARGS
      -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
      -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
      -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/install/eigen #has not effect
    SOURCE_DIR   "${CMAKE_BINARY_DIR}/install/eigen" #install directory is in build/install/eigen
    BUILD_COMMAND "" #do not build
    INSTALL_COMMAND "" #do not install
  )

  ########################################################################
  # CILANTRO
  ########################################################################
  ExternalProject_Add(cilantro
    GIT_REPOSITORY https://github.com/kzampog/cilantro.git
    CMAKE_ARGS
      -DCMAKE_BUILD_TYPE=${CMAKE_BUILD_TYPE}
      -DCMAKE_CXX_COMPILER=${CMAKE_CXX_COMPILER}
      -DCMAKE_INSTALL_PREFIX=${CMAKE_BINARY_DIR}/install/eigen #has not effect
    SOURCE_DIR   "${CMAKE_BINARY_DIR}/install/cilantro" #install directory is in build/install/eigen
    BUILD_COMMAND "" #do not build
    INSTALL_COMMAND "" #do not install
  )

endif ()

###############################################################################
#EXECUTABLE THANK LINK HEADER ONLY DIRECTORY
###############################################################################
SET(BUILD_MY_PROJECTS "" CACHE STRING "Build Project")
if (BUILD_MY_PROJECTS)
  message(AUTHOR_WARNING "BUILD_MY_PROJECTS_" ${BUILD_MY_PROJECTS})
  add_executable(my_exe main.cpp)


list(APPEND includePath 
"${CMAKE_BINARY_DIR}/install/cilantro/"
"${CMAKE_BINARY_DIR}/install/eigen/"
)


  #target_include_directories(my_exe PRIVATE "${CMAKE_BINARY_DIR}/install/boost/include/boost-1_78/") #add directory of the EIGEN header-only library 
  target_include_directories(my_exe PRIVATE "$<BUILD_INTERFACE:${includePath}>") #add directory of the EIGEN header-only library 


endif ()

make -j

git clone https://github.com/kzampog/cilantro.git
cd cilantro
mkdir build
cd build
cmake ..
make -j

The following error occurs:
In file included from /home/gyc/桌面/3D/cilantro/src/image_viewer.cpp:1:0:
/home/gyc/桌面/3D/cilantro/include/cilantro/image_viewer.hpp: In member function ‘cilantro::ImageViewer& cilantro::ImageViewer::finishFrame()’:
/home/gyc/桌面/3D/cilantro/include/cilantro/image_viewer.hpp:25:58: error: ‘struct pangolin::PangolinGl’ has no member named ‘MakeCurrent’
inline ImageViewer& finishFrame() { gl_context_->MakeCurrent(); pangolin::FinishFrame(); return this; }
^
/home/gyc/桌面/3D/cilantro/src/image_viewer.cpp: In member function ‘cilantro::ImageViewer& cilantro::ImageViewer::setImage(void, size_t, size_t, const string&)’:
/home/gyc/桌面/3D/cilantro/src/image_viewer.cpp:16:22: error: ‘struct pangolin::PangolinGl’ has no member named ‘MakeCurrent’
gl_context_->MakeCurrent();
^
/home/gyc/桌面/3D/cilantro/src/image_viewer.cpp:17:48: error: ‘PixelFormatFromString’ is not a member of ‘pangolin’
gl_pix_format_ = pangolin::GlPixFormat(pangolin::PixelFormatFromString(fmt));
^
/home/gyc/桌面/3D/cilantro/src/image_viewer.cpp: In member function ‘cilantro::ImageViewer& cilantro::ImageViewer::setImage(const pangolin::GlTexture&)’:
/home/gyc/桌面/3D/cilantro/src/image_viewer.cpp:41:22: error: ‘struct pangolin::PangolinGl’ has no member named ‘MakeCurrent’
gl_context_->MakeCurrent();
^
/home/gyc/桌面/3D/cilantro/src/image_viewer.cpp: In member function ‘cilantro::ImageViewer& cilantro::ImageViewer::clear()’:
/home/gyc/桌面/3D/cilantro/src/image_viewer.cpp:55:22: error: ‘struct pangolin::PangolinGl’ has no member named ‘MakeCurrent’
gl_context_->MakeCurrent();
^
/home/gyc/桌面/3D/cilantro/src/image_viewer.cpp: In member function ‘cilantro::ImageViewer& cilantro::ImageViewer::clearRenderArea()’:
/home/gyc/桌面/3D/cilantro/src/image_viewer.cpp:61:22: error: ‘struct pangolin::PangolinGl’ has no member named ‘MakeCurrent’
gl_context_->MakeCurrent();
^
/home/gyc/桌面/3D/cilantro/src/image_viewer.cpp: In member function ‘cilantro::ImageViewer& cilantro::ImageViewer::render()’:
/home/gyc/桌面/3D/cilantro/src/image_viewer.cpp:68:22: error: ‘struct pangolin::PangolinGl’ has no member named ‘MakeCurrent’
gl_context_->MakeCurrent();
^
/home/gyc/桌面/3D/cilantro/src/image_viewer.cpp: In member function ‘void cilantro::ImageViewer::init_(const string&, const string&)’:
/home/gyc/桌面/3D/cilantro/src/image_viewer.cpp:76:23: error: ‘FindContext’ is not a member of ‘pangolin’
gl_context_ = pangolin::FindContext(window_name);
^
/home/gyc/桌面/3D/cilantro/src/image_viewer.cpp:79:27: error: ‘FindContext’ is not a member of ‘pangolin’
gl_context_ = pangolin::FindContext(window_name);
^
/home/gyc/桌面/3D/cilantro/src/image_viewer.cpp:81:22: error: ‘struct pangolin::PangolinGl’ has no member named ‘MakeCurrent’
gl_context_->MakeCurrent();
^
In file included from /home/gyc/桌面/3D/cilantro/src/visualizer.cpp:1:0:
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:25:14: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
std::shared_ptr addObject(const std::string &name, const std::shared_ptr &obj_ptr) {
^
In file included from /home/gyc/桌面/3D/cilantro/src/visualizer.cpp:1:0:
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:33:14: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
std::shared_ptr addObject(const std::string &name, Args&&... args) {
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:41:14: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
std::shared_ptr getObject(const std::string &name) {
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:184:14: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
std::shared_ptrpangolin::OpenGlRenderState gl_render_state_;
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:185:14: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
std::shared_ptr input_handler_;
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:186:14: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
std::shared_ptrpangolin::VideoOutput video_recorder_;
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:194:27: error: ‘shared_ptr’ is not a member of ‘std’
typedef std::pairstd::shared_ptr,std::shared_ptr ManagedRenderable;
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:194:27: error: ‘shared_ptr’ is not a member of ‘std’
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:194:53: error: wrong number of template arguments (1, should be 2)
typedef std::pairstd::shared_ptr,std::shared_ptr ManagedRenderable;
^
In file included from /usr/include/c++/5/utility:70:0,
from /home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:6,
from /home/gyc/桌面/3D/cilantro/src/visualizer.cpp:1:
/usr/include/c++/5/bits/stl_pair.h:96:12: note: provided for ‘template<class T1, class T2> struct std::pair’
struct pair
^
In file included from /home/gyc/桌面/3D/cilantro/src/visualizer.cpp:1:0:
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:194:54: error: expected unqualified-id before ‘,’ token
typedef std::pairstd::shared_ptr,std::shared_ptr ManagedRenderable;
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:196:30: error: ‘ManagedRenderable’ was not declared in this scope
std::mapstd::string,ManagedRenderable renderables;
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:196:47: error: template argument 2 is invalid
std::mapstd::string,ManagedRenderable renderables;
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:196:47: error: template argument 4 is invalid
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:80: error: ‘ManagedRenderable’ was not declared in this scope
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:98: error: template argument 2 is invalid
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:80: error: ‘ManagedRenderable’ was not declared in this scope
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:98: error: template argument 2 is invalid
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:80: error: ‘ManagedRenderable’ was not declared in this scope
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:98: error: template argument 2 is invalid
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:80: error: ‘ManagedRenderable’ was not declared in this scope
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:98: error: template argument 2 is invalid
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:80: error: ‘ManagedRenderable’ was not declared in this scope
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:98: error: template argument 2 is invalid
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:80: error: ‘ManagedRenderable’ was not declared in this scope
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:98: error: template argument 2 is invalid
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:80: error: ‘ManagedRenderable’ was not declared in this scope
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:98: error: template argument 2 is invalid
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:80: error: ‘ManagedRenderable’ was not declared in this scope
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:98: error: template argument 2 is invalid
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:80: error: ‘ManagedRenderable’ was not declared in this scope
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:98: error: template argument 2 is invalid
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:42: error: invalid use of template-name ‘std::pair’ without an argument list
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:51: error: expected ‘,’ or ‘...’ before ‘<’ token
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::enablePerspectiveProjection()’:
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:98:13: error: ‘input_handler_’ was not declared in this scope
input_handler_->EnablePerspectiveProjection();
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::enableOrthographicProjection()’:
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:103:13: error: ‘input_handler_’ was not declared in this scope
input_handler_->EnableOrthographicProjection();
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::toggleProjectionMode()’:
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:107:53: error: ‘input_handler_’ was not declared in this scope
inline Visualizer& toggleProjectionMode() { input_handler_->ToggleProjectionMode(); return this; }
^
CMakeFiles/cilantro.dir/build.make:559: recipe for target 'CMakeFiles/cilantro.dir/src/image_viewer.cpp.o' failed
make[2]: *** [CMakeFiles/cilantro.dir/src/image_viewer.cpp.o] Error 1
make[2]: *** 正在等待未完成的任务....
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp: In member function ‘bool cilantro::Visualizer::isRecording() const’:
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:170:52: error: ‘video_recorder_’ was not declared in this scope
inline bool isRecording() const { return !!video_recorder_; }
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp: In member function ‘pangolin::OpenGlRenderState cilantro::Visualizer::getRenderState() const’:
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:176:77: error: ‘gl_render_state_’ was not declared in this scope
inline pangolin::OpenGlRenderState* getRenderState() const { return gl_render_state_.get(); }
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp: In member function ‘cilantro::VisualizerHandler* cilantro::Visualizer::getInputHandler() const’:
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:178:68: error: ‘input_handler_’ was not declared in this scope
inline VisualizerHandler* getInputHandler() const { return input_handler_.get(); }
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp: In member function ‘bool cilantro::Visualizer::RenderPriorityComparator_::operator()(int) const’:
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:204:24: error: ‘o1’ was not declared in this scope
return o1.first > o2.first;
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:204:35: error: ‘o2’ was not declared in this scope
return o1.first > o2.first;
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In destructor ‘cilantro::Visualizer::~Visualizer()’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:14:22: error: ‘struct pangolin::PangolinGl’ has no member named ‘MakeCurrent’
gl_context_->MakeCurrent();
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘cilantro::RenderingProperties cilantro::Visualizer::getRenderingProperties(const string&) const’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:18:32: error: request for member ‘find’ in ‘((const cilantro::Visualizer*)this)->cilantro::Visualizer::renderables_’, which is of non-class type ‘const int’
auto it = renderables_.find(name);
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:19:32: error: request for member ‘end’ in ‘((const cilantro::Visualizer*)this)->cilantro::Visualizer::renderables_’, which is of non-class type ‘const int’
if (it == renderables_.end()) return RenderingProperties();
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::setRenderingProperties(const string&, const cilantro::RenderingProperties&)’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:24:32: error: request for member ‘find’ in ‘((cilantro::Visualizer*)this)->cilantro::Visualizer::renderables_’, which is of non-class type ‘int’
auto it = renderables_.find(name);
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:25:32: error: request for member ‘end’ in ‘((cilantro::Visualizer*)this)->cilantro::Visualizer::renderables_’, which is of non-class type ‘int’
if (it == renderables_.end()) return this;
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘bool cilantro::Visualizer::getVisibility(const string&) const’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:31:32: error: request for member ‘find’ in ‘((const cilantro::Visualizer)this)->cilantro::Visualizer::renderables_’, which is of non-class type ‘const int’
auto it = renderables_.find(name);
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:32:32: error: request for member ‘end’ in ‘((const cilantro::Visualizer*)this)->cilantro::Visualizer::renderables_’, which is of non-class type ‘const int’
if (it == renderables_.end()) return false;
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::setVisibility(const string&, bool)’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:37:32: error: request for member ‘find’ in ‘((cilantro::Visualizer*)this)->cilantro::Visualizer::renderables_’, which is of non-class type ‘int’
auto it = renderables_.find(name);
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:38:32: error: request for member ‘end’ in ‘((cilantro::Visualizer*)this)->cilantro::Visualizer::renderables_’, which is of non-class type ‘int’
if (it == renderables_.end()) return this;
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::toggleVisibility(const string&)’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:44:32: error: request for member ‘find’ in ‘((cilantro::Visualizer)this)->cilantro::Visualizer::renderables_’, which is of non-class type ‘int’
auto it = renderables_.find(name);
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:45:32: error: request for member ‘end’ in ‘((cilantro::Visualizer*)this)->cilantro::Visualizer::renderables_’, which is of non-class type ‘int’
if (it == renderables_.end()) return this;
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::clear()’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:51:22: error: ‘struct pangolin::PangolinGl’ has no member named ‘MakeCurrent’
gl_context_->MakeCurrent();
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:52:22: error: request for member ‘clear’ in ‘((cilantro::Visualizer)this)->cilantro::Visualizer::renderables_’, which is of non-class type ‘int’
renderables_.clear();
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::remove(const string&)’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:57:22: error: ‘struct pangolin::PangolinGl’ has no member named ‘MakeCurrent’
gl_context_->MakeCurrent();
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:58:22: error: request for member ‘erase’ in ‘((cilantro::Visualizer*)this)->cilantro::Visualizer::renderables_’, which is of non-class type ‘int’
renderables_.erase(name);
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::clearRenderArea()’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:63:22: error: ‘struct pangolin::PangolinGl’ has no member named ‘MakeCurrent’
gl_context_->MakeCurrent();
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:64:29: error: ‘gl_render_state_’ was not declared in this scope
display_->Activate(gl_render_state_);
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::render()’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:72:37: error: ‘gl_render_state_’ was not declared in this scope
pangolin::OpenGlMatrix mv = gl_render_state_->GetModelViewMatrix();
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:81:59: error: ‘ManagedRenderable’ was not declared in this scope
std::vector<std::pair<std::tuple<bool,bool,float>,ManagedRenderable>> visible_objects;
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:81:76: error: template argument 2 is invalid
std::vector<std::pair<std::tuple<bool,bool,float>,ManagedRenderable*>> visible_objects;
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:81:77: error: template argument 1 is invalid
std::vector<std::pair<std::tuple<bool,bool,float>,ManagedRenderable*>> visible_objects;
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:81:77: error: template argument 2 is invalid
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:82:25: error: request for member ‘reserve’ in ‘visible_objects’, which is of non-class type ‘int’
visible_objects.reserve(renderables_.size());
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:82:46: error: request for member ‘size’ in ‘((cilantro::Visualizer*)this)->cilantro::Visualizer::renderables_’, which is of non-class type ‘int’
visible_objects.reserve(renderables_.size());
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:83:37: error: request for member ‘begin’ in ‘((cilantro::Visualizer*)this)->cilantro::Visualizer::renderables_’, which is of non-class type ‘int’
for (auto it = renderables_.begin(); it != renderables_.end(); ++it) {
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:83:65: error: request for member ‘end’ in ‘((cilantro::Visualizer*)this)->cilantro::Visualizer::renderables_’, which is of non-class type ‘int’
for (auto it = renderables_.begin(); it != renderables_.end(); ++it) {
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:84:32: error: ‘obj’ was not declared in this scope
ManagedRenderable* obj = &(it->second);
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:86:33: error: request for member ‘emplace_back’ in ‘visible_objects’, which is of non-class type ‘int’
visible_objects.emplace_back(std::make_tuple(!obj->first->getDrawLast(), obj->first->getRenderingProperties().opacity == 1.0f, (R*(obj->first->getCentroid()) + t).squaredNorm()), obj);
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:90:35: error: request for member ‘begin’ in ‘visible_objects’, which is of non-class type ‘int’
std::sort(visible_objects.begin(), visible_objects.end(), RenderPriorityComparator_());
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:90:60: error: request for member ‘end’ in ‘visible_objects’, which is of non-class type ‘int’
std::sort(visible_objects.begin(), visible_objects.end(), RenderPriorityComparator_());
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:92:22: error: ‘struct pangolin::PangolinGl’ has no member named ‘MakeCurrent’
gl_context_->MakeCurrent();
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:98:48: error: request for member ‘size’ in ‘visible_objects’, which is of non-class type ‘int’
for (size_t i = 0; i < visible_objects.size(); i++) {
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:99:30: error: invalid types ‘int[size_t {aka long unsigned int}]’ for array subscript
visible_objects[i].second->first->updateGPUBuffersAndRender((visible_objects[i].second->second));
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:99:92: error: invalid types ‘int[size_t {aka long unsigned int}]’ for array subscript
visible_objects[i].second->first->updateGPUBuffersAndRender((visible_objects[i].second->second));
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:102:40: error: ‘video_recorder_’ was not declared in this scope
if (video_record_on_render_ && video_recorder_) {
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::finishFrame()’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:112:22: error: ‘struct pangolin::PangolinGl’ has no member named ‘MakeCurrent’
gl_context_->MakeCurrent();
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘std::vector<std::cxx11::basic_string > cilantro::Visualizer::getObjectNames() const’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:132:51: error: request for member ‘size’ in ‘((const cilantro::Visualizer*)this)->cilantro::Visualizer::renderables’, which is of non-class type ‘const int’
std::vectorstd::string res(renderables.size());
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:134:37: error: request for member ‘begin’ in ‘((const cilantro::Visualizer*)this)->cilantro::Visualizer::renderables_’, which is of non-class type ‘const int’
for (auto it = renderables_.begin(); it != renderables_.end(); ++it) {
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:134:65: error: request for member ‘end’ in ‘((const cilantro::Visualizer*)this)->cilantro::Visualizer::renderables_’, which is of non-class type ‘const int’
for (auto it = renderables_.begin(); it != renderables_.end(); ++it) {
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::setPerspectiveProjectionMatrix(size_t, size_t, pangolin::GLprecision, pangolin::GLprecision, pangolin::GLprecision, pangolin::GLprecision, pangolin::GLprecision, pangolin::GLprecision)’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:146:9: error: ‘input_handler_’ was not declared in this scope
input_handler_->SetPerspectiveProjectionMatrix(pangolin::ProjectionMatrix((int)w, (int)h, fu, fv, u0, v0, zNear, zFar));
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::setPerspectiveProjectionMatrix(size_t, size_t, const Matrix3f&, pangolin::GLprecision, pangolin::GLprecision)’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:155:9: error: ‘input_handler_’ was not declared in this scope
input_handler_->SetPerspectiveProjectionMatrix(pangolin::ProjectionMatrix((int)w, (int)h, intrinsics(0,0), intrinsics(1,1), intrinsics(0,2), intrinsics(1,2), zNear, zFar));
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::setOrthographicProjectionMatrix(pangolin::GLprecision, pangolin::GLprecision, pangolin::GLprecision, pangolin::GLprecision, pangolin::GLprecision, pangolin::GLprecision)’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:163:9: error: ‘input_handler_’ was not declared in this scope
input_handler_->SetOrthographicProjectionMatrix(left, right, bottom, top, near, far);
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::setOrthographicProjectionMatrix(pangolin::GLprecision, pangolin::GLprecision, pangolin::GLprecision)’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:171:9: error: ‘input_handler_’ was not declared in this scope
input_handler_->SetOrthographicProjectionMatrix(-heightaspect/2.0, heightaspect/2.0, -height/2.0, height/2.0, near, far);
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘const cilantro::Visualizer& cilantro::Visualizer::getCameraPose(Eigen::Ref<Eigen::Matrix<float, 4, 4> >) const’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:176:30: error: ‘ToEigen’ is not a member of ‘pangolin’
pose = cam_axes_rot_pangolin::ToEigen(gl_render_state_->GetModelViewMatrix());
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:176:48: error: expected primary-expression before ‘float’
pose = cam_axes_rot_pangolin::ToEigen(gl_render_state_->GetModelViewMatrix());
^
In file included from /home/gyc/桌面/3D/cilantro/src/common_renderables.cpp:1:0:
/home/gyc/桌面/3D/cilantro/include/cilantro/common_renderables.hpp:249:14: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
std::shared_ptrpangolin::GlFont glFont;
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::setCameraPose(const Vector3f&, const Vector3f&, const Vector3f&)’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:199:9: error: ‘gl_render_state_’ was not declared in this scope
gl_render_state_->SetModelViewMatrix(pangolin::ModelViewLookAt(position(0), position(1), position(2), look_at(0), look_at(1), look_at(2), up_direction(0), up_direction(1), up_direction(2)));
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::setCameraPose(float, float, float, float, float, float, float, float, float)’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:207:9: error: ‘gl_render_state_’ was not declared in this scope
gl_render_state_->SetModelViewMatrix(pangolin::ModelViewLookAt(pos_x, pos_y, pos_z, look_at_x, look_at_y, look_at_z, up_dir_x, up_dir_y, up_dir_z));
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::setCameraPose(const Eigen::Ref<const Eigen::Matrix<float, 4, 4> >&)’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:219:9: error: ‘gl_render_state_’ was not declared in this scope
gl_render_state_->SetModelViewMatrix(model_view);
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘const cilantro::Visualizer& cilantro::Visualizer::getDefaultCameraPose(Eigen::Ref<Eigen::Matrix<float, 4, 4> >) const’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:224:30: error: ‘ToEigen’ is not a member of ‘pangolin’
pose = cam_axes_rot_pangolin::ToEigen(input_handler_->default_model_view);
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:224:48: error: expected primary-expression before ‘float’
pose = cam_axes_rot_pangolin::ToEigen(input_handler_->default_model_view);
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::setDefaultCameraPose(const Vector3f&, const Vector3f&, const Vector3f&)’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:247:9: error: ‘input_handler_’ was not declared in this scope
input_handler_->default_model_view = pangolin::ModelViewLookAt(position(0), position(1), position(2), look_at(0), look_at(1), look_at(2), up_direction(0), up_direction(1), up_direction(2));
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::setDefaultCameraPose(float, float, float, float, float, float, float, float, float)’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:255:9: error: ‘input_handler_’ was not declared in this scope
input_handler_->default_model_view = pangolin::ModelViewLookAt(pos_x, pos_y, pos_z, look_at_x, look_at_y, look_at_z, up_dir_x, up_dir_y, up_dir_z);
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::setDefaultCameraPose(const Eigen::Ref<const Eigen::Matrix<float, 4, 4> >&)’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:267:9: error: ‘input_handler_’ was not declared in this scope
input_handler_->default_model_view = model_view;
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::registerKeyboardCallback(unsigned char, std::function<void()>)’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:272:9: error: ‘input_handler_’ was not declared in this scope
input_handler_->key_callback_map[key] = std::move(func);
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘pangolin::TypedImage cilantro::Visualizer::getRenderImage(float, bool)’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:277:22: error: ‘struct pangolin::PangolinGl’ has no member named ‘MakeCurrent’
gl_context_->MakeCurrent();
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:302:29: error: ‘PixelFormat’ in namespace ‘pangolin’ does not name a type
const pangolin::PixelFormat fmt = pangolin::PixelFormatFromString("RGBA32");
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:303:47: error: ‘fmt’ was not declared in this scope
pangolin::TypedImage buffer(w, h, fmt);
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:320:29: error: ‘PixelFormat’ in namespace ‘pangolin’ does not name a type
const pangolin::PixelFormat fmt = pangolin::PixelFormatFromString("RGB24");
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:321:47: error: ‘fmt’ was not declared in this scope
pangolin::TypedImage buffer(w, h, fmt);
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::saveRenderAsImage(const string&, float, float, bool)’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:342:61: error: no matching function for call to ‘SaveImage(pangolin::TypedImage&, pangolin::VideoPixelFormat&, const string&, bool, float&)’
SaveImage(image, image.fmt, file_name, true, quality);
^
In file included from /usr/local/include/pangolin/gl/gl.h:33:0,
from /usr/local/include/pangolin/pangolin.h:34,
from /home/gyc/桌面/3D/cilantro/include/cilantro/visualizer_handler.hpp:6,
from /home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:9,
from /home/gyc/桌面/3D/cilantro/src/visualizer.cpp:1:
/usr/local/include/pangolin/image/image_io.h:74:6: note: candidate: void pangolin::SaveImage(const pangolin::TypedImage&, const string&, bool)
void SaveImage(const TypedImage& image, const std::string& filename, bool top_line_first = true);
^
/usr/local/include/pangolin/image/image_io.h:74:6: note: candidate expects 3 arguments, 5 provided
In file included from /usr/local/include/pangolin/gl/gl.h:33:0,
from /usr/local/include/pangolin/pangolin.h:34,
from /home/gyc/桌面/3D/cilantro/include/cilantro/visualizer_handler.hpp:6,
from /home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:9,
from /home/gyc/桌面/3D/cilantro/src/visualizer.cpp:1:
/usr/local/include/pangolin/image/image_io.h:71:6: note: candidate: void pangolin::SaveImage(const pangolin::Image&, const pangolin::VideoPixelFormat&, const string&, bool)
void SaveImage(const Image& image, const pangolin::VideoPixelFormat& fmt, const std::string& filename, bool top_line_first = true);
^
/usr/local/include/pangolin/image/image_io.h:71:6: note: candidate expects 4 arguments, 5 provided
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::startVideoRecording(const string&, size_t, bool, float, bool)’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:361:9: error: ‘video_recorder_’ was not declared in this scope
video_recorder_.reset(new pangolin::VideoOutput(output_uri));
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:363:9: error: ‘PixelFormat’ is not a member of ‘pangolin’
pangolin::PixelFormat fmt(pangolin::PixelFormatFromString((rgba) ? "RGBA32" : "RGB24"));
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:368:95: error: ‘fmt’ was not declared in this scope
video_recorder_->SetStreams(std::vectorpangolin::StreamInfo(1, pangolin::StreamInfo(fmt, w, h, pitch)));
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::recordVideoFrame()’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:374:13: error: ‘video_recorder_’ was not declared in this scope
if (video_recorder_) {
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:377:67: error: no matching function for call to ‘pangolin::TypedImage::TypedImage(size_t&, size_t&, pangolin::VideoPixelFormat&)’
pangolin::TypedImage img_flipped(img.w, img.h, img.fmt);
^
In file included from /usr/local/include/pangolin/gl/gl.h:33:0,
from /usr/local/include/pangolin/pangolin.h:34,
from /home/gyc/桌面/3D/cilantro/include/cilantro/visualizer_handler.hpp:6,
from /home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:9,
from /home/gyc/桌面/3D/cilantro/src/visualizer.cpp:1:
/usr/local/include/pangolin/image/image_io.h:44:12: note: candidate: pangolin::TypedImage::TypedImage(size_t, size_t, size_t, unsigned char, const pangolin::VideoPixelFormat&)
inline TypedImage(size_t w, size_t h, size_t pitch, unsigned char ptr, const VideoPixelFormat& fmt)
^
/usr/local/include/pangolin/image/image_io.h:44:12: note: candidate expects 5 arguments, 3 provided
/usr/local/include/pangolin/image/image_io.h:39:12: note: candidate: pangolin::TypedImage::TypedImage()
inline TypedImage()
^
/usr/local/include/pangolin/image/image_io.h:39:12: note: candidate expects 0 arguments, 3 provided
/usr/local/include/pangolin/image/image_io.h:37:8: note: candidate: pangolin::TypedImage::TypedImage(const pangolin::TypedImage&)
struct TypedImage : public Image
^
/usr/local/include/pangolin/image/image_io.h:37:8: note: candidate expects 1 argument, 3 provided
/usr/local/include/pangolin/image/image_io.h:37:8: note: candidate: pangolin::TypedImage::TypedImage(pangolin::TypedImage&&)
/usr/local/include/pangolin/image/image_io.h:37:8: note: candidate expects 1 argument, 3 provided
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::stopVideoRecording()’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:388:13: error: ‘video_recorder_’ was not declared in this scope
if (video_recorder_) {
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp: In member function ‘void cilantro::Visualizer::init_(const string&, const string&)’:
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:397:23: error: ‘FindContext’ is not a member of ‘pangolin’
gl_context_ = pangolin::FindContext(window_name);
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:400:27: error: ‘FindContext’ is not a member of ‘pangolin’
gl_context_ = pangolin::FindContext(window_name);
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:402:22: error: ‘struct pangolin::PangolinGl’ has no member named ‘MakeCurrent’
gl_context_->MakeCurrent();
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:408:9: error: ‘gl_render_state_’ was not declared in this scope
gl_render_state_.reset(new pangolin::OpenGlRenderState(pangolin::ProjectionMatrix(640, 480, 525, 525, 319.5, 239.5, 0.1, 100), pangolin::ModelViewLookAt(0, 0, 0, 0, 0, 1, 0, -1, 0)));
^
/home/gyc/桌面/3D/cilantro/src/visualizer.cpp:409:9: error: ‘input_handler_’ was not declared in this scope
input_handler_.reset(new VisualizerHandler(this));
^
/home/gyc/桌面/3D/cilantro/src/common_renderables.cpp: In member function ‘virtual void cilantro::PointCloudRenderable::render(cilantro::GPUBufferObjects&)’:
/home/gyc/桌面/3D/cilantro/src/common_renderables.cpp:103:101: error: too many arguments to function ‘void pangolin::RenderVboCbo(pangolin::GlBuffer&, pangolin::GlBuffer&, bool)’
pangolin::RenderVboCbo(gl_buffers->pointBuffer, gl_buffers->colorBuffer, true, GL_POINTS);
^
In file included from /usr/local/include/pangolin/pangolin.h:36:0,
from /home/gyc/桌面/3D/cilantro/include/cilantro/common_renderables.hpp:7,
from /home/gyc/桌面/3D/cilantro/src/common_renderables.cpp:1:
/usr/local/include/pangolin/gl/glvbo.h:113:13: note: declared here
inline void RenderVboCbo(GlBuffer& vbo, GlBuffer& cbo, bool draw_color)
^
/home/gyc/桌面/3D/cilantro/src/common_renderables.cpp:108:101: error: too many arguments to function ‘void pangolin::RenderVboCbo(pangolin::GlBuffer&, pangolin::GlBuffer&, bool)’
pangolin::RenderVboCbo(gl_buffers->pointBuffer, gl_buffers->colorBuffer, true, GL_POINTS);
^
In file included from /usr/local/include/pangolin/pangolin.h:36:0,
from /home/gyc/桌面/3D/cilantro/include/cilantro/common_renderables.hpp:7,
from /home/gyc/桌面/3D/cilantro/src/common_renderables.cpp:1:
/usr/local/include/pangolin/gl/glvbo.h:113:13: note: declared here
inline void RenderVboCbo(GlBuffer& vbo, GlBuffer& cbo, bool draw_color)
^
/home/gyc/桌面/3D/cilantro/src/common_renderables.cpp:121:75: error: too many arguments to function ‘void pangolin::RenderVbo(pangolin::GlBuffer&)’
pangolin::RenderVbo(gl_buffers->normalEndPointBuffer, GL_LINES);
^
In file included from /usr/local/include/pangolin/pangolin.h:36:0,
from /home/gyc/桌面/3D/cilantro/include/cilantro/common_renderables.hpp:7,
from /home/gyc/桌面/3D/cilantro/src/common_renderables.cpp:1:
/usr/local/include/pangolin/gl/glvbo.h:99:13: note: declared here
inline void RenderVbo(GlBuffer& vbo)
^
/home/gyc/桌面/3D/cilantro/src/common_renderables.cpp: In member function ‘virtual void cilantro::PointCorrespondencesRenderable::render(cilantro::GPUBufferObjects&)’:
/home/gyc/桌面/3D/cilantro/src/common_renderables.cpp:166:69: error: too many arguments to function ‘void pangolin::RenderVbo(pangolin::GlBuffer&)’
pangolin::RenderVbo(gl_buffers->lineEndPointBuffer, GL_LINES);
^
In file included from /usr/local/include/pangolin/pangolin.h:36:0,
from /home/gyc/桌面/3D/cilantro/include/cilantro/common_renderables.hpp:7,
from /home/gyc/桌面/3D/cilantro/src/common_renderables.cpp:1:
/usr/local/include/pangolin/gl/glvbo.h:99:13: note: declared here
inline void RenderVbo(GlBuffer& vbo)
^
/home/gyc/桌面/3D/cilantro/src/common_renderables.cpp: In member function ‘virtual void cilantro::CoordinateFrameRenderable::render(cilantro::GPUBufferObjects&)’:
/home/gyc/桌面/3D/cilantro/src/common_renderables.cpp:186:9: error: ‘glDrawColoredVertices’ is not a member of ‘pangolin’
pangolin::glDrawColoredVertices<float,float>(6, verts, cols, GL_LINES, 3, 4);
^
/home/gyc/桌面/3D/cilantro/src/common_renderables.cpp:186:41: error: expected primary-expression before ‘float’
pangolin::glDrawColoredVertices<float,float>(6, verts, cols, GL_LINES, 3, 4);
^
/home/gyc/桌面/3D/cilantro/src/common_renderables.cpp: In member function ‘virtual void cilantro::CameraFrustumRenderable::render(cilantro::GPUBufferObjects&)’:
/home/gyc/桌面/3D/cilantro/src/common_renderables.cpp:205:9: error: ‘glDrawFrustum’ is not a member of ‘pangolin’
pangolin::glDrawFrustum(inverseIntrinsics, (int)width, (int)height, pose, scale);
^
In file included from /home/gyc/桌面/3D/cilantro/src/visualizer_handler.cpp:2:0:
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:25:14: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
std::shared_ptr addObject(const std::string &name, const std::shared_ptr &obj_ptr) {
^
In file included from /home/gyc/桌面/3D/cilantro/src/visualizer_handler.cpp:2:0:
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:33:14: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
std::shared_ptr addObject(const std::string &name, Args&&... args) {
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:41:14: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
std::shared_ptr getObject(const std::string &name) {
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:184:14: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
std::shared_ptrpangolin::OpenGlRenderState gl_render_state_;
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:185:14: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
std::shared_ptr input_handler_;
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:186:14: error: ‘shared_ptr’ in namespace ‘std’ does not name a template type
std::shared_ptrpangolin::VideoOutput video_recorder_;
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:194:27: error: ‘shared_ptr’ is not a member of ‘std’
typedef std::pairstd::shared_ptr,std::shared_ptr ManagedRenderable;
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:194:27: error: ‘shared_ptr’ is not a member of ‘std’
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:194:53: error: wrong number of template arguments (1, should be 2)
typedef std::pairstd::shared_ptr,std::shared_ptr ManagedRenderable;
^
In file included from /usr/include/c++/5/bits/stl_algobase.h:64:0,
from /usr/include/c++/5/bits/char_traits.h:39,
from /usr/include/c++/5/ios:40,
from /usr/include/c++/5/ostream:38,
from /usr/include/c++/5/iostream:39,
from /usr/local/include/pangolin/utils/type_convert.h:31,
from /usr/local/include/pangolin/image/image_common.h:32,
from /usr/local/include/pangolin/image/image_io.h:32,
from /usr/local/include/pangolin/gl/gl.h:33,
from /usr/local/include/pangolin/pangolin.h:34,
from /home/gyc/桌面/3D/cilantro/include/cilantro/visualizer_handler.hpp:6,
from /home/gyc/桌面/3D/cilantro/src/visualizer_handler.cpp:1:
/usr/include/c++/5/bits/stl_pair.h:96:12: note: provided for ‘template<class T1, class T2> struct std::pair’
struct pair
^
In file included from /home/gyc/桌面/3D/cilantro/src/visualizer_handler.cpp:2:0:
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:194:54: error: expected unqualified-id before ‘,’ token
typedef std::pairstd::shared_ptr,std::shared_ptr ManagedRenderable;
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:196:30: error: ‘ManagedRenderable’ was not declared in this scope
std::mapstd::string,ManagedRenderable renderables;
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:196:47: error: template argument 2 is invalid
std::mapstd::string,ManagedRenderable renderables;
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:196:47: error: template argument 4 is invalid
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:80: error: ‘ManagedRenderable’ was not declared in this scope
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:98: error: template argument 2 is invalid
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:80: error: ‘ManagedRenderable’ was not declared in this scope
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:98: error: template argument 2 is invalid
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:80: error: ‘ManagedRenderable’ was not declared in this scope
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:98: error: template argument 2 is invalid
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:80: error: ‘ManagedRenderable’ was not declared in this scope
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:98: error: template argument 2 is invalid
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:80: error: ‘ManagedRenderable’ was not declared in this scope
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:98: error: template argument 2 is invalid
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:80: error: ‘ManagedRenderable’ was not declared in this scope
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:98: error: template argument 2 is invalid
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:80: error: ‘ManagedRenderable’ was not declared in this scope
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:98: error: template argument 2 is invalid
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:80: error: ‘ManagedRenderable’ was not declared in this scope
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:98: error: template argument 2 is invalid
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:80: error: ‘ManagedRenderable’ was not declared in this scope
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:98: error: template argument 2 is invalid
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:42: error: invalid use of template-name ‘std::pair’ without an argument list
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:201:51: error: expected ‘,’ or ‘...’ before ‘<’ token
inline bool operator()(const std::pair<std::tuple<bool,bool,float>,ManagedRenderable*> &o1,
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::enablePerspectiveProjection()’:
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:98:13: error: ‘input_handler_’ was not declared in this scope
input_handler_->EnablePerspectiveProjection();
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::enableOrthographicProjection()’:
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:103:13: error: ‘input_handler_’ was not declared in this scope
input_handler_->EnableOrthographicProjection();
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp: In member function ‘cilantro::Visualizer& cilantro::Visualizer::toggleProjectionMode()’:
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:107:53: error: ‘input_handler_’ was not declared in this scope
inline Visualizer& toggleProjectionMode() { input_handler_->ToggleProjectionMode(); return this; }
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp: In member function ‘bool cilantro::Visualizer::isRecording() const’:
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:170:52: error: ‘video_recorder_’ was not declared in this scope
inline bool isRecording() const { return !!video_recorder_; }
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp: In member function ‘pangolin::OpenGlRenderState cilantro::Visualizer::getRenderState() const’:
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:176:77: error: ‘gl_render_state_’ was not declared in this scope
inline pangolin::OpenGlRenderState* getRenderState() const { return gl_render_state_.get(); }
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp: In member function ‘cilantro::VisualizerHandler* cilantro::Visualizer::getInputHandler() const’:
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:178:68: error: ‘input_handler_’ was not declared in this scope
inline VisualizerHandler* getInputHandler() const { return input_handler_.get(); }
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp: In member function ‘bool cilantro::Visualizer::RenderPriorityComparator_::operator()(int) const’:
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:204:24: error: ‘o1’ was not declared in this scope
return o1.first > o2.first;
^
/home/gyc/桌面/3D/cilantro/include/cilantro/visualizer.hpp:204:35: error: ‘o2’ was not declared in this scope
return o1.first > o2.first;
^
/home/gyc/桌面/3D/cilantro/src/visualizer_handler.cpp: In constructor ‘cilantro::VisualizerHandler::VisualizerHandler(cilantro::Visualizer*)’:
/home/gyc/桌面/3D/cilantro/src/visualizer_handler.cpp:21:50: error: ‘class cilantro::Visualizer’ has no member named ‘gl_render_state_’
perspective_projection(visualizer->gl_render_state_->GetProjectionMatrix()),
^
/home/gyc/桌面/3D/cilantro/src/visualizer_handler.cpp:22:46: error: ‘class cilantro::Visualizer’ has no member named ‘gl_render_state_’
default_model_view(visualizer->gl_render_state_->GetModelViewMatrix()),
^
/home/gyc/桌面/3D/cilantro/src/visualizer_handler.cpp:23:37: error: ‘class cilantro::Visualizer’ has no member named ‘gl_render_state_’
cam_state(visualizer->gl_render_state_.get()),
^
/home/gyc/桌面/3D/cilantro/src/visualizer_handler.cpp: In member function ‘virtual void cilantro::VisualizerHandler::Keyboard(pangolin::View&, unsigned char, int, int, bool)’:
/home/gyc/桌面/3D/cilantro/src/visualizer_handler.cpp:41:42: error: ‘struct pangolin::PangolinGl’ has no member named ‘MakeCurrent’
visualizer->gl_context_->MakeCurrent();
^
/home/gyc/桌面/3D/cilantro/src/visualizer_handler.cpp:42:57: error: request for member ‘begin’ in ‘((cilantro::VisualizerHandler*)this)->cilantro::VisualizerHandler::visualizer->cilantro::Visualizer::renderables_’, which is of non-class type ‘int’
for (auto it = visualizer->renderables_.begin(); it != visualizer->renderables_.end(); ++it) {
^
/home/gyc/桌面/3D/cilantro/src/visualizer_handler.cpp:42:97: error: request for member ‘end’ in ‘((cilantro::VisualizerHandler*)this)->cilantro::VisualizerHandler::visualizer->cilantro::Visualizer::renderables_’, which is of non-class type ‘int’
for (auto it = visualizer->renderables_.begin(); it != visualizer->renderables_.end(); ++it) {
^
/home/gyc/桌面/3D/cilantro/src/visualizer_handler.cpp:50:42: error: ‘struct pangolin::PangolinGl’ has no member named ‘MakeCurrent’
visualizer->gl_context_->MakeCurrent();
^
/home/gyc/桌面/3D/cilantro/src/visualizer_handler.cpp:51:57: error: request for member ‘begin’ in ‘((cilantro::VisualizerHandler*)this)->cilantro::VisualizerHandler::visualizer->cilantro::Visualizer::renderables_’, which is of non-class type ‘int’
for (auto it = visualizer->renderables_.begin(); it != visualizer->renderables_.end(); ++it) {
^
/home/gyc/桌面/3D/cilantro/src/visualizer_handler.cpp:51:97: error: request for member ‘end’ in ‘((cilantro::VisualizerHandler*)this)->cilantro::VisualizerHandler::visualizer->cilantro::Visualizer::renderables_’, which is of non-class type ‘int’
for (auto it = visualizer->renderables_.begin(); it != visualizer->renderables_.end(); ++it) {
^
/home/gyc/桌面/3D/cilantro/src/visualizer_handler.cpp:60:42: error: ‘struct pangolin::PangolinGl’ has no member named ‘MakeCurrent’
visualizer->gl_context_->MakeCurrent();
^
/home/gyc/桌面/3D/cilantro/src/visualizer_handler.cpp:61:57: error: request for member ‘begin’ in ‘((cilantro::VisualizerHandler*)this)->cilantro::VisualizerHandler::visualizer->cilantro::Visualizer::renderables_’, which is of non-class type ‘int’
for (auto it = visualizer->renderables_.begin(); it != visualizer->renderables_.end(); ++it) {
^
/home/gyc/桌面/3D/cilantro/src/visualizer_handler.cpp:61:97: error: request for member ‘end’ in ‘((cilantro::VisualizerHandler*)this)->cilantro::VisualizerHandler::visualizer->cilantro::Visualizer::renderables_’, which is of non-class type ‘int’
for (auto it = visualizer->renderables_.begin(); it != visualizer->renderables_.end(); ++it) {
^
/home/gyc/桌面/3D/cilantro/src/visualizer_handler.cpp:69:42: error: ‘struct pangolin::PangolinGl’ has no member named ‘MakeCurrent’
visualizer->gl_context_->MakeCurrent();
^
/home/gyc/桌面/3D/cilantro/src/visualizer_handler.cpp:70:57: error: request for member ‘begin’ in ‘((cilantro::VisualizerHandler*)this)->cilantro::VisualizerHandler::visualizer->cilantro::Visualizer::renderables_’, which is of non-class type ‘int’
for (auto it = visualizer->renderables_.begin(); it != visualizer->renderables_.end(); ++it) {
^
/home/gyc/桌面/3D/cilantro/src/visualizer_handler.cpp:70:97: error: request for member ‘end’ in ‘((cilantro::VisualizerHandler*)this)->cilantro::VisualizerHandler::visualizer->cilantro::Visualizer::renderables_’, which is of non-class type ‘int’
for (auto it = visualizer->renderables_.begin(); it != visualizer->renderables_.end(); ++it) {
^
/home/gyc/桌面/3D/cilantro/src/visualizer_handler.cpp:88:42: error: ‘struct pangolin::PangolinGl’ has no member named ‘MakeCurrent’
visualizer->gl_context_->MakeCurrent();
^
/home/gyc/桌面/3D/cilantro/src/visualizer_handler.cpp:89:57: error: request for member ‘begin’ in ‘((cilantro::VisualizerHandler*)this)->cilantro::VisualizerHandler::visualizer->cilantro::Visualizer::renderables_’, which is of non-class type ‘int’
for (auto it = visualizer->renderables_.begin(); it != visualizer->renderables_.end(); ++it) {
^
/home/gyc/桌面/3D/cilantro/src/visualizer_handler.cpp:89:97: error: request for member ‘end’ in ‘((cilantro::VisualizerHandler*)this)->cilantro::VisualizerHandler::visualizer->cilantro::Visualizer::renderables_’, which is of non-class type ‘int’
for (auto it = visualizer->renderables_.begin(); it != visualizer->renderables_.end(); ++it) {
^
/home/gyc/桌面/3D/cilantro/src/common_renderables.cpp: In member function ‘virtual void cilantro::TriangleMeshRenderable::render(cilantro::GPUBufferObjects&)’:
/home/gyc/桌面/3D/cilantro/src/common_renderables.cpp:405:105: error: too many arguments to function ‘void pangolin::RenderVboCbo(pangolin::GlBuffer&, pangolin::GlBuffer&, bool)’
pangolin::RenderVboCbo(gl_buffers->vertexBuffer, gl_buffers->colorBuffer, true, GL_TRIANGLES);
^
In file included from /usr/local/include/pangolin/pangolin.h:36:0,
from /home/gyc/桌面/3D/cilantro/include/cilantro/common_renderables.hpp:7,
from /home/gyc/桌面/3D/cilantro/src/common_renderables.cpp:1:
/usr/local/include/pangolin/gl/glvbo.h:113:13: note: declared here
inline void RenderVboCbo(GlBuffer& vbo, GlBuffer& cbo, bool draw_color)
^
/home/gyc/桌面/3D/cilantro/src/common_renderables.cpp:412:109: error: too many arguments to function ‘void pangolin::RenderVboCbo(pangolin::GlBuffer&, pangolin::GlBuffer&, bool)’
pangolin::RenderVboCbo(gl_buffers->vertexBuffer, gl_buffers->colorBuffer, true, GL_TRIANGLES);
^
In file included from /usr/local/include/pangolin/pangolin.h:36:0,
from /home/gyc/桌面/3D/cilantro/include/cilantro/common_renderables.hpp:7,
from /home/gyc/桌面/3D/cilantro/src/common_renderables.cpp:1:
/usr/local/include/pangolin/gl/glvbo.h:113:13: note: declared here
inline void RenderVboCbo(GlBuffer& vbo, GlBuffer& cbo, bool draw_color)
^
/home/gyc/桌面/3D/cilantro/src/common_renderables.cpp:417:109: error: too many arguments to function ‘void pangolin::RenderVboCbo(pangolin::GlBuffer&, pangolin::GlBuffer&, bool)’
pangolin::RenderVboCbo(gl_buffers->vertexBuffer, gl_buffers->colorBuffer, true, GL_TRIANGLES);
^
In file included from /usr/local/include/pangolin/pangolin.h:36:0,
from /home/gyc/桌面/3D/cilantro/include/cilantro/common_renderables.hpp:7,
from /home/gyc/桌面/3D/cilantro/src/common_renderables.cpp:1:
/usr/local/include/pangolin/gl/glvbo.h:113:13: note: declared here
inline void RenderVboCbo(GlBuffer& vbo, GlBuffer& cbo, bool draw_color)
^
/home/gyc/桌面/3D/cilantro/src/common_renderables.cpp:431:75: error: too many arguments to function ‘void pangolin::RenderVbo(pangolin::GlBuffer&)’
pangolin::RenderVbo(gl_buffers->normalEndPointBuffer, GL_LINES);
^
In file included from /usr/local/include/pangolin/pangolin.h:36:0,
from /home/gyc/桌面/3D/cilantro/include/cilantro/common_renderables.hpp:7,
from /home/gyc/桌面/3D/cilantro/src/common_renderables.cpp:1:
/usr/local/include/pangolin/gl/glvbo.h:99:13: note: declared here
inline void RenderVbo(GlBuffer& vbo)
^
/home/gyc/桌面/3D/cilantro/src/common_renderables.cpp: In member function ‘virtual void cilantro::TextRenderable::updateGPUBuffers(cilantro::GPUBufferObjects&)’:
/home/gyc/桌面/3D/cilantro/src/common_renderables.cpp:463:21: error: ‘struct cilantro::TextGPUBufferObjects’ has no member named ‘glFont’
gl_buffers->glFont.reset(new pangolin::GlFont(AnonymousPro_ttf, renderingProperties.fontSize));
^
/home/gyc/桌面/3D/cilantro/src/common_renderables.cpp:464:42: error: ‘struct cilantro::TextGPUBufferObjects’ has no member named ‘glFont’
gl_buffers->glText = gl_buffers->glFont->Text(text);
^
CMakeFiles/cilantro.dir/build.make:598: recipe for target 'CMakeFiles/cilantro.dir/src/visualizer_handler.cpp.o' failed
make[2]: *** [CMakeFiles/cilantro.dir/src/visualizer_handler.cpp.o] Error 1
CMakeFiles/cilantro.dir/build.make:585: recipe for target 'CMakeFiles/cilantro.dir/src/visualizer.cpp.o' failed
make[2]: *** [CMakeFiles/cilantro.dir/src/visualizer.cpp.o] Error 1
CMakeFiles/cilantro.dir/build.make:546: recipe for target 'CMakeFiles/cilantro.dir/src/common_renderables.cpp.o' failed
make[2]: *** [CMakeFiles/cilantro.dir/src/common_renderables.cpp.o] Error 1
CMakeFiles/Makefile2:143: recipe for target 'CMakeFiles/cilantro.dir/all' failed
make[1]: *** [CMakeFiles/cilantro.dir/all] Error 2
Makefile:132: recipe for target 'all' failed
make: *** [all] Error 2

it sames I can not read ply file?

coding:
" std::string file_path="data/test.ply";
cilantro::PointCloud3f cloud(file_path);"

when I was building,the output is
"/usr/local/include/cilantro/utilities/ply_io.hpp:11: undefined reference to tinyply::PlyFile::PlyFile()' /usr/local/include/cilantro/utilities/ply_io.hpp:12: undefined reference to tinyply::PlyFile::parse_header(std::istream&)'
/usr/local/include/cilantro/utilities/ply_io.hpp:11: undefined reference to `tinyply::PlyFile::~PlyFile()'...."

And when I try to use the visualizer,the output is :
" undefined reference to cilantro::Visualizer::Visualizer(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&)' /home/cidi/learning_code/myLocalization1/src/jiqunLocalization.cc:569: undefined reference to cilantro::Visualizer::spinOnce()'
/home/cidi/learning_code/myLocalization1/src/jiqunLocalization.cc:563: undefined reference to cilantro::Visualizer::~Visualizer()' /home/cidi/learning_code/myLocalization1/src/jiqunLocalization.cc:563: undefined reference to cilantro::Visualizer::~Visualizer()' "

the Pangolin is builded fine.

I can running your demo fine ,but it does not work in my project~
hope for you answer,thanks.

rigid icp merged not well

Hi I managed to run the rigid_icp example and get a very good result. However when i tried to import frame_1.ply and frame_2.ply into this demo (by changing some example code), I found that these two files are not merged well. It means this is a not small gab between the transformed data.

Could you help to explain. I do not like pcl because it is so heave and slow.

Linked libraries do not propagate properly to client projects

The dependency propagation mechanism from cilantro to client projects is based on Pangolin.

Unfortunately, the Eigen and Pangolin dependencies don't seem to propagate. If we compare the PangolinTargets.cmake file to the cilantroTargets.cmake file (both of which are generated and copied to the install location, inside /lib/cmake/{cilantro or Pangolin}/), here is what we see.

PangolinTargets.cmake (lines 56-60):

set_target_properties(pangolin PROPERTIES
  INTERFACE_INCLUDE_DIRECTORIES "/usr/include;/usr/include;/usr/include;/usr/include/eigen3;${_IMPORT_PREFIX}/include"
  INTERFACE_LINK_LIBRARIES "/usr/lib/x86_64-linux-gnu/libGL.so;/usr/lib/x86_64-linux-gnu/libGLU.so;/usr/lib/x86_64-linux-gnu/libGLEW.so;/usr/lib/x86_64-linux-gnu/libEGL.so;/usr/lib/x86_64-linux-gnu/libwayland-client.so;/usr/lib/x86_64-linux-gnu/libwayland-egl.so;/usr/lib/x86_64-linux-gnu/libwayland-cursor.so;EGL;xkbcommon;/usr/lib/x86_64-linux-gnu/libSM.so;/usr/lib/x86_64-linux-gnu/libICE.so;/usr/lib/x86_64-linux-gnu/libX11.so;/usr/lib/x86_64-linux-gnu/libXext.so;rt;pthread"
  INTERFACE_SYSTEM_INCLUDE_DIRECTORIES "/usr/include;/usr/include;/usr/include;/usr/include/eigen3"
)

Corresponding lines for cilantroTargets.cmake (line 56-58):

set_target_properties(cilantro PROPERTIES
  INTERFACE_COMPILE_OPTIONS "-O3;-march=native;-mtune=native;-fopenmp"
)

Hence, we're obviously missing some important stuff, like Pangolin itself and its dependencies.
Something small must be missing in the cilantro's CMakeLists.txt, not sure yet what.

Doesn't build with current Pangolin

I see the .travis.yml downloads a snapshot of an older Pangolin. Trying to build with the current version of Pangolin gives errors, as some files have moved, etc.

Convex hull functions

We need a function to calculate pointcloud convex hulls similarly to what PCL does here. We may not need 3D convex hull, but we at least need 2D.

complie smooth in ubuntu18.04,but not in win10 with VS2017

hi, Sorry to interrupt your life
This is a amazing project, i use and complies smooth in ubuntu18.04, but now i need complies this project in win10, so there is so many trouble when i use cmake and VS2017 complie, I have complied Eigen3 and Panolin in my computer successfully, and cilantro project succeeded in finding Eigen3 and Panolin like
image
But it still compiles with various errors ,so I add
#find_package(Pangolin QUIET) #if(Pangolin_FOUND) #set(HAVE_PANGOLIN ON) #set(HAVE_PANGOLIN OFF) #set(DEPENDS_Pangolin "find_dependency(Pangolin)") #endif()
I successfully compiled cilantro . but can't use in my project, the wrong message like:

Severity Code Description Project File Line Suppression State
Error LNK2019 unresolved external symbol "public: __cdecl tinyply::PlyFile::PlyFile(void)" (??0PlyFile@tinyply@@qeaa@XZ) referenced in function "public: __cdecl cilantro::PLYReader::PLYReader(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,bool)" (??0PLYReader@cilantro@@qeaa@AEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@_N@Z) FaceScanViewerApp E:\FaceScan\FaceScanViwer\FaceScanViewerApp\facealign.obj 1

Error LNK2019 unresolved external symbol "public: __cdecl tinyply::PlyFile::~PlyFile(void)" (??1PlyFile@tinyply@@qeaa@XZ) referenced in function "int public: __cdecl cilantro::PLYReader::PLYReader(class std::basic_string<char,struct std::char_traits<char>,class std::allocator<char> > const &,bool)'::1'::dtor$2" (?dtor$2@?0???0PLYReader@cilantro@@qeaa@AEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@_N@Z@4HA) FaceScanViewerApp E:\FaceScan\FaceScanViwer\FaceScanViewerApp\facealign.obj 1

Error LNK2019 unresolved external symbol "public: bool __cdecl tinyply::PlyFile::parse_header(class std::basic_istream<char,struct std::char_traits > &)" (?parse_header@PlyFile@tinyply@@QEAA_NAEAV?$basic_istream@DU?$char_traits@D@std@@@std@@@z) referenced in function "public: __cdecl cilantro::PLYReader::PLYReader(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,bool)" (??0PLYReader@cilantro@@qeaa@AEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@_N@Z) FaceScanViewerApp E:\FaceScan\FaceScanViwer\FaceScanViewerApp\facealign.obj 1

Error LNK2019 unresolved external symbol "public: void __cdecl tinyply::PlyFile::read(class std::basic_istream<char,struct std::char_traits > &)" (?read@PlyFile@tinyply@@QEAAXAEAV?$basic_istream@DU?$char_traits@D@std@@@std@@@z) referenced in function "public: void __cdecl cilantro::PLYReader::readData(void)" (?readData@PLYReader@cilantro@@QEAAXXZ) FaceScanViewerApp E:\FaceScan\FaceScanViwer\FaceScanViewerApp\facealign.obj 1

Error LNK2019 unresolved external symbol "public: class std::vector<struct tinyply::PlyElement,class std::allocator > __cdecl tinyply::PlyFile::get_elements(void)const " (?get_elements@PlyFile@tinyply@@qeba?AV?$vector@UPlyElement@tinyply@@v?$allocator@UPlyElement@tinyply@@@std@@@std@@xz) referenced in function "public: bool __cdecl cilantro::PLYReader::elementPropertyExists(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::vector<class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > > const &)const " (?elementPropertyExists@PLYReader@cilantro@@QEBA_NAEBV?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@aebv?$vector@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@v?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@4@@z) FaceScanViewerApp E:\FaceScan\FaceScanViwer\FaceScanViewerApp\facealign.obj 1

Error LNK2019 unresolved external symbol "public: class std::shared_ptr __cdecl tinyply::PlyFile::request_properties_from_element(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::vector<class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > >,unsigned int)" (?request_properties_from_element@PlyFile@tinyply@@qeaa?AV?$shared_ptr@UPlyData@tinyply@@@std@@aebv?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@4@V?$vector@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@v?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@4@I@Z) referenced in function "public: class std::shared_ptr __cdecl cilantro::PLYReader::requestData(class std::basic_string<char,struct std::char_traits,class std::allocator > const &,class std::vector<class std::basic_string<char,struct std::char_traits,class std::allocator >,class std::allocator<class std::basic_string<char,struct std::char_traits,class std::allocator > > > const &,unsigned int)" (?requestData@PLYReader@cilantro@@qeaa?AV?$shared_ptr@UPlyData@tinyply@@@std@@aebv?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@4@AEBV?$vector@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@v?$allocator@V?$basic_string@DU?$char_traits@D@std@@v?$allocator@D@2@@std@@@2@@4@I@Z) FaceScanViewerApp E:\FaceScan\FaceScanViwer\FaceScanViewerApp\facealign.obj 1

I know if i sucecss complie Eigen3 and Panolin in ubuntu18, cilantro also complie smoothly, but there is not in Win10. why?

performance comparisons to PCL

In your arxiv paper you have some graphs showing a performance improvement over PCL on a dataset. Do you have an explanation for why cilantro is faster, particularly for ICP? How much of the speed-up is due to multi-threading?

Additional scalar field attached to point cloud

Hey I'm very intersted by your lib.
Just one little question before I dug deeper into it...
I see that normals and RGB values are first class citizen in your PC data structure but for now what's the recommended way to deal with arbitrary additional data in cilantro?

Releases

Hi,

I would like to ask if you can make a release of the cilantro in github?
I see there is none in the current repo.

The reason to ask is to use "add_externalproject" in CMake of a Cilantro a specific version that will not change in future.

Avoid unnecessary data copy in ply reader

Current implementation of readPointCloudFromPLYFile first reads pointcloud data to local variables, and then copies this data to to a PointCloud data structure. A better implementation would avoid this unnecessary data copy and would write directly to the PointCloud.

assignment of the sigma in RBFKernelWeightEvaluator

Hi,

For the non-rigid icp, I am not pretty sure about two details in calculating the weightings.

First, in class DefaultCombinedMetricSparseWarpFieldICPEntities, control_weight_eval and reg_weight_eval_ are defined as RBFKernelWeightEvaluator, and their corresponding sigmas are assigned by the following code in non_rigid_icp.cpp.

float control_res = 0.025f;
float src_to_control_sigma = 0.5f*control_res;
float regularization_sigma = 3.0f*control_res;

icp.controlWeightEvaluator().setSigma(src_to_control_sigma);
icp.regularizationWeightEvaluator().setSigma(regularization_sigma);

It seems that the sigmas are basically based on the resolution of the control nodes.

Now I am trying to generate the control nodes by myself (ps. not to use the function cilantro::PointsGridDownsampler3f, and the distance between each control node is constant ), but the meanings of control_res and the 0.5f/3.0f in those sigmas are not very clear to me. Would you kindly give me some suggestion?

Second, the evaluators of the data terms (point-to-point and point-to-plane) are both UnityWeightEvaluator. I am considering replacing them with the RBFKernelWeightEvaluator, so the weighting of each correspondence would be different.
What do you think? Or are there some considerations of using the UnityWeightEvaluator in data terms?

Thank you very much!

openmp errors in visual studio

Hi, and thanks for this library! i have the lib built on windows, but am having trouble building the examples. I get OpenMP errors:

Severity	Code	Description	Project	File	Line	Suppression State
Error	C3001	'declare': expected an OpenMP directive name	rigid_icp	d:\thirdparty\cilantro\include\cilantro\omp_reductions.hpp	9	

Severity	Code	Description	Project	File	Line	Suppression State
Error	C3036	'max': invalid operator token in OpenMP 'reduction' clause	rigid_icp	d:\thirdparty\cilantro\include\cilantro\icp_warp_field_combined_metric_dense.hpp	154	

Do you have any ideas on what I might do to fix this?

thanks!

upsampling point clouds?

Does cilantro have this functionality? i need to upsample and smooth depth camera data. Thanks!

3D Convex Hull with Coplanar Points

Hi,

I find one problem when calling ConvexHull3fto compute the 3D convex hull given 3D data points in which some of them may be on the same plane. Instead of generating a convex hull with a unified plane in which all coplanar points are on it, this function generates several duplicative subplanes of this coplanar plane. Is there a function or module that I can use to enable this plane merge?

compiling errors regarding to omp

Hi kzampog,

I am trying to compile the latest version of the project.

It works well when I compile the branch released before 373cf70 (Various improvements and additions).

But unfortunately when I compile the branch 373cf70, there are some errors.

It seems like the codes added in include/cilantro/rigid_registration_utilities.hpp would trigger some error:

#pragma omp declare reduction (+: Eigen::Matrix<ScalarT,6,6>: omp_out = omp_out + omp_in) initializer(omp_priv = Eigen::Matrix<ScalarT,6,6>::Zero())
#pragma omp declare reduction (+: Eigen::Matrix<ScalarT,6,1>: omp_out = omp_out + omp_in) initializer(omp_priv = Eigen::Matrix<ScalarT,6,1>::Zero())

The errors are shown as follows:

In file included from /home/yogurtsea/all_libs/cilantro_0372204/include/cilantro/icp_rigid_point_to_point.hpp:4:0,
                 from /home/yogurtsea/all_libs/cilantro_0372204/include/cilantro/icp_common_instances.hpp:6,
                 from /home/yogurtsea/all_libs/cilantro_0372204/examples/non_rigid_icp.cpp:1:
/home/yogurtsea/all_libs/cilantro_0372204/include/cilantro/rigid_registration_utilities.hpp: In function ‘bool cilantro::estimateRigidTransformCombinedMetric3(cilantro::ConstVectorSetMatrixMap<PointT, 3l>&, cilantro::ConstVectorSetMatrixMap<PointT, 3l>&, cilantro::ConstVectorSetMatrixMap<PointT, 3l>&, cilantro::CorrespondenceSet<typename PointCorrWeightEvaluatorT::InputScalar>&, ScalarT, cilantro::CorrespondenceSet<typename PlaneCorrWeightEvaluatorT::InputScalar>&, ScalarT, cilantro::RigidTransformation<PointT, 3l>&, std::size_t, ScalarT, const PointCorrWeightEvaluatorT&, const PlaneCorrWeightEvaluatorT&)’:
/home/yogurtsea/all_libs/cilantro_0372204/include/cilantro/rigid_registration_utilities.hpp:80:61: error: default argument for template parameter for class enclosing ‘void cilantro::omp declare reduction operator+(Eigen::Matrix<ScalarT, 6, 6>&)’
 #pragma omp declare reduction (+: Eigen::Matrix<ScalarT,6,6>: omp_out = omp_out + omp_in) initializer(omp_priv = Eigen::Matrix<ScalarT,6,6>::Zero())
                                                             ^
In file included from /home/yogurtsea/all_libs/cilantro_0372204/include/cilantro/ransac_rigid_transformation_estimator.hpp:4:0,
                 from /home/yogurtsea/all_libs/cilantro_0372204/examples/ransac_rigid_transformation_estimator.cpp:2:
/home/yogurtsea/all_libs/cilantro_0372204/include/cilantro/rigid_registration_utilities.hpp: In function ‘bool cilantro::estimateRigidTransformCombinedMetric3(cilantro::ConstVectorSetMatrixMap<PointT, 3l>&, cilantro::ConstVectorSetMatrixMap<PointT, 3l>&, cilantro::ConstVectorSetMatrixMap<PointT, 3l>&, cilantro::CorrespondenceSet<typename PointCorrWeightEvaluatorT::InputScalar>&, ScalarT, cilantro::CorrespondenceSet<typename PlaneCorrWeightEvaluatorT::InputScalar>&, ScalarT, cilantro::RigidTransformation<PointT, 3l>&, std::size_t, ScalarT, const PointCorrWeightEvaluatorT&, const PlaneCorrWeightEvaluatorT&)’:
/home/yogurtsea/all_libs/cilantro_0372204/include/cilantro/rigid_registration_utilities.hpp:80:61: error: default argument for template parameter for class enclosing ‘void cilantro::omp declare reduction operator+(Eigen::Matrix<ScalarT, 6, 6>&)’
 #pragma omp declare reduction (+: Eigen::Matrix<ScalarT,6,6>: omp_out = omp_out + omp_in) initializer(omp_priv = Eigen::Matrix<ScalarT,6,6>::Zero())
                                                             ^
In file included from /home/yogurtsea/all_libs/cilantro_0372204/include/cilantro/icp_rigid_point_to_point.hpp:4:0,
                 from /home/yogurtsea/all_libs/cilantro_0372204/include/cilantro/icp_common_instances.hpp:6,
                 from /home/yogurtsea/all_libs/cilantro_0372204/examples/fusion.cpp:5:
/home/yogurtsea/all_libs/cilantro_0372204/include/cilantro/rigid_registration_utilities.hpp: In function ‘bool cilantro::estimateRigidTransformCombinedMetric3(cilantro::ConstVectorSetMatrixMap<PointT, 3l>&, cilantro::ConstVectorSetMatrixMap<PointT, 3l>&, cilantro::ConstVectorSetMatrixMap<PointT, 3l>&, cilantro::CorrespondenceSet<typename PointCorrWeightEvaluatorT::InputScalar>&, ScalarT, cilantro::CorrespondenceSet<typename PlaneCorrWeightEvaluatorT::InputScalar>&, ScalarT, cilantro::RigidTransformation<PointT, 3l>&, std::size_t, ScalarT, const PointCorrWeightEvaluatorT&, const PlaneCorrWeightEvaluatorT&)’:
/home/yogurtsea/all_libs/cilantro_0372204/include/cilantro/rigid_registration_utilities.hpp:80:61: error: default argument for template parameter for class enclosing ‘void cilantro::omp declare reduction operator+(Eigen::Matrix<ScalarT, 6, 6>&)’
 #pragma omp declare reduction (+: Eigen::Matrix<ScalarT,6,6>: omp_out = omp_out + omp_in) initializer(omp_priv = Eigen::Matrix<ScalarT,6,6>::Zero())

Is there any hint of how to solve this issue?

Thanks for your help and kind reply!

Different results depending on machine

Hi,

I am running the same example on two different machines (different hardware, same OS - ubuntu 18.04).
I have ENABLE_NON_DETERMINISTIC_PARALLELISM=OFF.
The results I get from each machine is slightly different. Is this expected behaviour?

Thanks

Installing on a local path

I tried to install the library on a local path, but it seems the library doesn't see use the prefix path correctly.
When I did cmake I set

CMAKE_INSTALL_PREFIX /home/fabio/Libraries/cilantro/installed

then when I did make install, it tried to install it in /usr/local/

:~/Libraries/cilantro/build$ make install
[ 64%] Built target cilantro
[ 66%] Built target kmeans_example
[ 68%] Built target normal_estimation_example
[ 70%] Built target voxel_grid_example
[ 73%] Built target principal_component_analysis_example
[ 75%] Built target rigid_transform_estimator_example
[ 77%] Built target kd_tree_example
[ 79%] Built target ply_io_example
[ 82%] Built target matrix_io_example
[ 84%] Built target visualizer_example
[ 86%] Built target space_region_example
[ 88%] Built target iterative_closest_point_example
[ 91%] Built target connected_component_segmentation_example
[ 93%] Built target image_viewer_example
[ 95%] Built target convex_hull_example
[ 97%] Built target plane_estimator_example
[100%] Built target image_point_cloud_conversions_example
Install the project...
-- Install configuration: "Release"
-- Installing: /usr/local/lib/libcilantro.so
-- Set runtime path of "/usr/local/lib/libcilantro.so" to ""
-- Up-to-date: /usr/local/include
CMake Error at cmake_install.cmake:72 (file):
file INSTALL cannot set permissions on "/usr/local/include"

Makefile:93: recipe for target 'install' failed
make: *** [install] Error 1

transform rgbd image to point cloud

Hi,

Thanks for the work, I try to use this library but meet some problem, I will appreciate if you can give me some suggestions:

1, I test the ransac plane estimation function with my own point cloud files (.ply) as following. I want to know if the function works, because it finds the 158492 out of 258733 points that belongs to a plane, the problems maybe the visualization. the original point clouds are shown in other format as fig 2. I also check the header of two files (.ply)
image
image
test.ply
format binary_little_endian 1.0
element vertex 573663
property float x
property float y
property float z
property uchar red
property uchar green
property uchar blue
property float nx
property float ny
property float nz
property float radius

0000_pcl.ply
format binary_little_endian 1.0
comment PCL generated
element vertex 258733
property float x
property float y
property float z
property uchar red
property uchar green
property uchar blue
element camera 1
property float view_px
property float view_py
property float view_pz
property float x_axisx
property float x_axisy
property float x_axisz
property float y_axisx
property float y_axisy
property float y_axisz
property float z_axisx
property float z_axisy
property float z_axisz
property float focal
property float scalex
property float scaley
property float centerx
property float centery
property int viewportx
property int viewporty
property float k1
property float k2

  1. it seems different, so I also try to load original rgbd images and want to converse to points cloud, when I just change the uri, I met the error with running, the second element of uri can not find the files...

Warning: Video Channels have unequal number of files
terminate called after throwing an instance of 'pangolin::VideoException'
what(): No files found for wildcard ' /path/data/depth_imgs/depth_*.png'
Aborted (core dumped)

3, I also try to split the uri try to load them in respectively, load the rgb image firstly, and use following code to load depth image:
// std::string uri2 = "/path/data/depth_imgs/depth_.png";
// std::unique_ptrpangolin::VideoInterface dok2 = pangolin::OpenVideo(uri2);
// unsigned char
img2 = new unsigned char[dok2->SizeBytes()];
// pangolin::Image depth_img((unsigned short )img2, w, h, wsizeof(unsigned short));
it works but the result can not read the depth image, Is there anything I do wrong?
image

Thanks for your time and suggestions.
Best regards,
Benchun

releases?

Will there be a release version. How long would author keep maintain this library?

Radius search using kdtree always returns sorted result.

Thank you for your great project!
When I use KDTree.radiusSearch() in a huge for loop, it always returns the sorted result, and the sorting feature slows down the for loop. Even I changed the sorted class member to false in the nanoflann::SearchParams, I still get the sorted result. Do you know some way to disable the sort. Thank you for your help!

Add multi-way registration example

In your technical report, you state: "Our modular design can be easily extended to accommodate less common ICP processes (e.g., for multi-way registration)." Unfortunately, it is not straight-forward for me to see how that would be done. So adding an example of that would be of great help to me.

Running examples

Hi,
I managed to compile and install the library without any problem, but whenever I try to run any example, I get the following error:
./ply_io: error while loading shared libraries: librealsense2.so.2.20: cannot open shared object file: No such file or directory
which is weird because librealsense is not even a requirement in the CMakeLists. Do you have any idea what might be creating this issue, and/or how to fix it?

GLEW not listed in cmake dependencies

Attempting to build under Visual Studio 2017 with both Eigen3 and Pangolin installed in my environment using Microsofts vcpkg source code package manager and while I was able to point CMake to there installed directories my build subsequently failed because GLEW was not found (specifically GL/glew.h) even though it is installed in the vcpkg system so I suppose for now I am going to need to update the project files by hand. I have posted a request to the vcpkg developers that they include support for Cilantro in the package manager which would mean a lot more cross platform use of your library under Visual Studio and am sure it would make there job a lot easier with the way the software works if that dependency was made explicit in the CMakeLists file.

Questions about using this library

Hi,
I would like to attempt using this library for estimating cylinder models with RANDAC.
I looked at the sample https://github.com/kzampog/cilantro/blob/master/examples/ransac_plane_estimator.cpp.
I was wondering if this was applicable for "cylinders" as well instead of "planes", similar to how Open3D and PCL offer these shapes for fitting the estimated models?

I'm also having problems viewing PLY points. Using the https://github.com/kzampog/cilantro/blob/master/examples/visualizer.cpp, I can only see blank windows as shown below, while the same file loads accordingly in CloudCompare, PCL, etc.
Is there something I'm doing incorrectly? I did not have any compilation issue, but I fail to see what could be the problem.
Thanks for any guidance.

image

win7 vs2015 compiler error

tips:
file: cilantro-master\include\cilantro/space_transformations.hpp
10line
error C2027: use of undefined type 'Eigen::Transform<ScalarT,EigenDim,1,0>'
I Try some ,but it still not work

Eigen3.4 (declared implicitly) cannot be referenced -- it is a deleted function

When I compile surfelwarp project, get error:

1>D:/dev3rdparty/cilantro/install/lib/cmake/cilantro/../../../include\cilantro/image_point_cloud_conversions.hpp(409): **error** : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, -1, 0, 3, -1>, 3, 1, true> &) [with XprType=Eigen::Matrix<float, 3, -1, 0, 3, -1>, BlockRows=3, BlockCols=1, InnerPanel=true]" (declared implicitly) cannot be referenced -- it is a deleted function
1>
1>D:/dev3rdparty/cilantro/install/lib/cmake/cilantro/../../../include\cilantro/image_point_cloud_conversions.hpp(472): **error** : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, -1, 0, 3, -1>, 3, 1, true> &) [with XprType=Eigen::Matrix<float, 3, -1, 0, 3, -1>, BlockRows=3, BlockCols=1, InnerPanel=true]" (declared implicitly) cannot be referenced -- it is a deleted function
1>
1>D:/dev3rdparty/cilantro/install/lib/cmake/cilantro/../../../include\cilantro/image_point_cloud_conversions.hpp(583): **error** : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, -1, 0, 3, -1>, 3, 1, true> &) [with XprType=Eigen::Matrix<float, 3, -1, 0, 3, -1>, BlockRows=3, BlockCols=1, InnerPanel=true]" (declared implicitly) cannot be referenced -- it is a deleted function
1>
1>D:/dev3rdparty/cilantro/install/lib/cmake/cilantro/../../../include\cilantro/image_point_cloud_conversions.hpp(697): **error** : function "Eigen::Block<XprType, BlockRows, BlockCols, InnerPanel>::operator=(const Eigen::Block<Eigen::Matrix<float, 3, -1, 0, 3, -1>, 3, 1, true> &) [with XprType=Eigen::Matrix<float, 3, -1, 0, 3, -1>, BlockRows=3, BlockCols=1, InnerPanel=true]" (declared implicitly) cannot be referenced -- it is a deleted function
1>
1>4 errors detected in the compilation of "C:/Users/F47/AppData/Local/Temp/tmpxft_00003c08_00000000-8_data_transfer.cpp4.ii".
1>data_transfer.cu
1>CMake Error at common_lib_generated_data_transfer.cu.obj.Release.cmake:280 (message):
1>  Error generating file
1>  D:/0.unity_prj/surfelwarp/build/common/CMakeFiles/common_lib.dir//Release/common_lib_generated_data_transfer.cu.obj

My evironment:
Visualization_library=cilantro
VS2017
CUDA10.0
Compiled Pangolin with Eigen3.4
Compiled cilantro with Eigen3.4

KDTree Search problem!

Hi
I need a short guide with cilantro . T.T
I follow example/kd_tree.cpp and there is my code

        cilantro::PointCloud3f icp_out = src.transformed(tf_est);
        cilantro::Timer tree_timer;
        tree_timer.start();
        cilantro::KDTree3f<> tree(icp_out.points);
        for(int k = 0;k<dst.size();k++)
        {
            cilantro::NeighborSet<float> nn = tree.kNNSearch(Eigen::Vector3f(icp_out.points(k,0), icp_out.points(k,1), icp_out.points(k,2)), 1);

            std::cout<<"search::  "<< k<<std::endl;
            //std::cout << Eigen::Vector3f(icp_out.points(k,0), icp_out.points(k,1), icp_out.points(k,2)) <<std::endl;
            std::cout << "Neighbor indices: ";
//            for (int m= 0; m < nn.siz
            std::cout<<"result::";

            std::cout << nn[0].index << std::endl;
            //std::cout << Eigen::Vector3f(icp_out.points(nn[0].index,0), icp_out.points(nn[0].index,1), icp_out.points(nn[0].index,2)) <<std::endl;
            std::cout << std::endl;

            std::cout << "Neighbor distances: ";
            std::cout << nn[0].value << " ";
            std::cout << std::endl;

        }
        tree_timer.stop();

I build a tree with icp_out and i search with icp_out,I want to get icp_out.points(k,0) own subscript k to verify the correctness of kdtree, But no matter what my input is, the index output will always be 434 and 663
image
What mistake did I make? please~

Need some favors about adding the ARAP term to the non-rigid energy function

Hi,

Here is my fork based on your commit db7e511.

We modified the regularization term in the file warp_field_estimation.hpp in order to realize As Rigid As Possible(ARAP) Term described in the paper ” As-Rigid-As-Possible Surface Modeling”, which is also introduced in the well-known paper “ VolumeDeform : Real-time Volumetric Non-Rigid Reconstruction”.

We didn’t get comparable result against the original regularization term at first when the ARAP term was implemented (commit aa77969).
2019-01-13 00-54-25

So, we tried to comment out the offset swapping step (commit 53222e7). Better results are showed below, but some points still drifted backward.
2019-01-13 00-59-09
2019-01-13 01-01-45

After made the following two separate changes, the result turned out to be quite good:

  1. Change the sign of the partial derivative of the rotation of the neighboring control nodes from positive to negative (commit b84e303).
    2019-01-13 01-10-22
    2019-01-13 01-11-27
    Though the partial derivative of the rotation is supposed to be positive, yet better result is achieved by turning the sign from positive to negative.

  2. In non_rigid_icp.cpp, increase the regularization weight from 200 to 2000 (commit fabe65d).
    2019-01-13 01-14-48
    2019-01-13 01-16-10

We are not pretty sure if our implementation of ARAP term is correct, please give us some advice. Thank you for your help and look forward to your kind reply.

non-rigid registration speed

Hello,

The Cilantro non-rigid registration looks quite interesting. But how to make it faster? I tried to reduce the point amount to some thousands. But it still needs about a second. Possible with 10000 points , within 100 ms?

Thank you!

A error in non_rigid_icp.cpp for Example 2: Compute a densely supported warp field

when i make non_rigid_icp.cpp for Example 2: Compute a densely supported warp field, i get some error,like :
cilantro-master/examples/non_rigid_icp.cpp:123:23: error: missing template arguments before ‘(’ token cilantro::KDTree3f(src.points).search(src.points, cilantro::kNNNeighborhood ^ /home/eva/Documents/cilantro-master/examples/non_rigid_icp.cpp:123:55: error: ‘kNNNeighborhood’ is not a member of ‘cilantro’ cilantro::KDTree3f(src.points).search(src.points, cilantro::kNNNeighborhood ^ /home/eva/Documents/cilantro-master/examples/non_rigid_icp.cpp:123:81: error: expected primary-expression before ‘float’ ::KDTree3f(src.points).search(src.points, cilantro::kNNNeighborhood<float>(12), ^ examples/CMakeFiles/non_rigid_icp.dir/build.make:82: recipe for target 'examples/CMakeFiles/non_rigid_icp.dir/non_rigid_icp.cpp.o' failed make[2]: *** [examples/CMakeFiles/non_rigid_icp.dir/non_rigid_icp.cpp.o] Error 1 CMakeFiles/Makefile2:810: recipe for target 'examples/CMakeFiles/non_rigid_icp.dir/all' failed make[1]: *** [examples/CMakeFiles/non_rigid_icp.dir/all] Error 2 Makefile:149: recipe for target 'all' failed make: *** [all] Error 2
how to modify the code, thank you very much!!

The old versions of ffmpeg libraries are not available on for Ubuntu20

There are several libraries as:
libavformat-ffmpeg.so.56 => not found
libavutil-ffmpeg.so.54 => not found
libswscale-ffmpeg.so.3 => not found
libavdevice-ffmpeg.so.56 => not found

which are not available on Ubuntu 20 after installing the Pangolin recommended ffmpeg dependency. Is there any workaround to change these libraries for Cilantro's example applications?

Problems when the same program runs differently time.

Hi , this is a awesome project, I am studying it recently. But recently there has been a problem that bothers me . I use Qt creator programming , and I created a window to display multiple point clouds together, Sometimes it runs correctly, sometimes it just quits the program after Visualizer quick popup.
just like a visualizer window quick popup which no point cloud data and exit .
Qt only show me : The program has unexpectedly finished.
Terminal show like everything goes right : Press to close this window...

There is show window that i want

image

When not running successfully, it just like
image

This is the problematic code segment
image

My running environment is ubuntu16 . Can you give me some suggestions? This is very uncomfortable to debug the code

compilation

I had successfully build using the instructions but how would i compile the example you have given.

Compilation issues in Win + VS

Lots of issues with OpenMP like

Error C3031 'Atb': variable in 'reduction' clause must have scalar arithmetic type fusion D:\cilantro_src\include\cilantro\registration\transform_estimation.hpp 266

or

Severity Code Description Project File Line Suppression State
Error C3001 'declare': expected an OpenMP directive name flat_convex_hull D:\cilantro_src\include\cilantro\core\covariance.hpp 52

or

Severity Code Description Project File Line Suppression State
Error C3016 'i': index variable in OpenMP 'for' statement must have signed integral type fusion D:\cilantro_src\include\cilantro\core\space_transformations.hpp 186

or

Severity Code Description Project File Line Suppression State
Error C3036 'max': invalid operator token in OpenMP 'reduction' clause non_rigid_icp D:\cilantro_src\include\cilantro\registration\icp_warp_field_combined_metric_sparse.hpp 171

TODO

  • Visualization
  • KD Tree
  • Normal estimation
  • Voxel Grid
  • PCA

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.