Giter VIP home page Giter VIP logo

mv-lm-icp's Introduction

mv-lm-icp - Multiview Levenberg-Marquardt ICP

The Iterative Closest Point (ICP) Algorithm extended to the multiview setting. Point-to-point and point-to-plane metrics.

A C++ implementation of Section 3.3.2 in:

Using nanoflann for the kd-tree and Ceres for the actual minimization.

Rotation parameterization options:
  • Angle axis (Ceres)
  • Unit quaternion (Eigen)
  • Lie algebra (Sophus)
For evaluation, we compare against the results
  • from g2o (pairwise, multiview) using GICP edges mimicking point-to-point, point-to-plane
  • and the closed-form ICP solutions (only pairwise) to point-to-point, point-to-plane

Documentation

Multiview ICP technical report, August 2015

Background: ICP Variants

point-to-point:

point-to-plane:

Previous work

Installation

Dependencies

Linux (Debian-based e.g. Ubuntu 18.04)

sudo apt install xorg-dev
sudo apt install cmake libeigen3-dev libceres-dev

xorg-dev is needed for glfw on linux

optional g2o

g2o is not available in the official Ubuntu repositories, you have two options to install it:

  1. : For long-term releases it can be installed via a ROS installation as libg2o. E.g. for Ubuntu 14.04 install ROS Indigo. Then
sudo apt install ros-indigo-libg2o
  1. : Compile and install yourself:
git clone https://github.com/RainerKuemmerle/g2o.git
git checkout 20170730_git
cd g2o && mkdir build && cd build
cmake -DG2O_BUILD_APPS=OFF -DG2O_BUILD_EXAMPLES=OFF ..
sudo make install

Mac OSX (>=El Capitan)

The easiest way is by first installing homebrew package manager:

/usr/bin/ruby -e "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/master/install)"

The science tap has all our dependencies:

brew tap homebrew/science
brew install cmake eigen ceres-solver g2o

Windows (7 / 10)

Building

git checkout https://github.com/adrelino/mv-lm-icp.git
cd mv-lm-icp
git submodule update --init

mkdir build && cd build
cmake .. && make

Execution

pairwise

./pairwise 
-0.076899 -0.081785     0.421	-0.226502 -0.628639 -0.743983
-0.076716 -0.080814      0.42	-0.167658 -0.600136  -0.78213
-0.076716 -0.080037      0.42	-0.270241  -0.48616 -0.831035
-0.076533 -0.079071     0.419	-0.305349 -0.342155 -0.888646
-0.076533 -0.078296     0.419	-0.373175  -0.41905 -0.827731
-0.076533 -0.077521     0.419	-0.342708 -0.344125 -0.874145
-0.076351 -0.076562     0.418	-0.436854 -0.442649 -0.783084
-0.076351 -0.075789     0.418	-0.436506 -0.404281 -0.803753
-0.076168 -0.074836     0.417	-0.438123 -0.443576  -0.78185
-0.076168 -0.074065     0.417	-0.437831 -0.405047 -0.802647

=====  TIMING[closed] is 0.712000 s


=====  TIMING[g2o] is 0.88537000 s


=====  TIMING[ceres CeresAngleAxis] is 0.74449000 s


=====  TIMING[ceres EigenQuaternion] is 0.85321000 s

analytic diff sophusSE3 local parameterization

=====  TIMING[ceres SophusSE3] is 0.83088000 s

=====  TIMINGS ====
ceres CeresAngleAxis:	0.074
ceres EigenQuaternion:	0.085
ceres SophusSE3     :	0.083
closed              :	0.001
g2o                 :	0.089

=====  Accurracy ====
ceres CeresAngleAxis	 diff_tra:7.76957e-11	 diff_rot_degrees:1.70755e-06

ceres EigenQuaternion	 diff_tra:6.31278e-11	 diff_rot_degrees:1.70755e-06

ceres SophusSE3    	 diff_tra:6.31278e-11	 diff_rot_degrees:1.70755e-06

closed form      	 diff_tra:6.5958e-15	 diff_rot_degrees:2.41484e-06

g2o              	 diff_tra:6.43487e-17	 diff_rot_degrees:0

multiview

./multiview
...
Visualize construct
graph adjacency matrix == block structure
0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1
1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1 0
0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0 1
1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 1 0

multiview-init

press q to start optimization

multiview-final

mv-lm-icp's People

Contributors

adrelino 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

mv-lm-icp's Issues

how to compile on ubuntu 18.04

I am trying to compile your code for ubuntu 18.04. It get the following windows related compilation error:

~/mv-lm-icp/include/dirent.h:19:10: fatal error: windows.h: No such file or directory
#include <windows.h>

I tried to comment windows.h in dirent.h. But may other errors related to windows started popping up.
How do I remove these windows related errors? Is there any old commit that works fine with linux/ubuntu?

How to implement multiple pointclouds registration?

Hi, sir ,i am new to pcl, when i learn about how to incrementally register pair of clouds in pcl tutorial , i meet some problems;
In general ,i want to register one pair of clouds ,then register other one ,until all clouds. Thus i can obtain all transform matrixs of each pair of clouds , then i incrementally multiply matrixs ,finally get global matrix of any clouds.

i test with standford buddha model;( originally, i only use ndt ,but it always has a little error ,)
First problem:
i use ndt algorithm to get a Initial registration,then i use icp to register pair of clouds,but still has a little error ,for example buddha's foot can't register perfect, i can't adjust parameters well manually!

Seconde problem:
when i just only multiply matrixs to obtain global matrix ,this operation is not good , because each matrix has some error ,finally global matrix has big error! my friend tell me that i should use g2o,but i don't learn how to use it !

So ,i hope sir can help me ,give me some idea about multiple pointclouds registration ,thanks !

Generate error

When I build the project, the severity code indicates that
the project file line does not display the status
Error (active) E0135 class "Eigen::Map< const Sophus::SE3d, 0, Eigen::Stride< 0, 0> >" No member "internalJacobian" multiview D:\ku\mv-lm-icp-master\mv-lm-icp-master\include\sophus_se3.h 49
How to solve this?

pairwise runs great, multiview crashes...

Hi, and thank you for making this code available. I am running it on my own data, from a depth camera, and no matter what i do, I get a crash here:

  static ceres::CostFunction* Create(const Eigen::Vector3d& dst, const Eigen::Vector3d& src) {
        return (new ceres::AutoDiffCostFunction<PointToPointErrorGlobal, 3, 4, 3, 4, 3>(new PointToPointErrorGlobal(dst, src)));
    }

with the error:

Exception thrown: read access violation.
dst was 0x2164D6CB740.

Could you point me in the right direction to solve this?

thank you again!

Compile on Windows

I saw you have recently updated this, but I still have an issue in cmake with the gflw external:

---------------GLFW-------------------
Looking for pthread.h
Looking for pthread.h - not found
Found Threads: TRUE
Could NOT find Vulkan (missing: VULKAN_LIBRARY VULKAN_INCLUDE_DIR)
Using Win32 for window creation
CMake Error at ext/glfw/CMakeLists.txt:403 (install):
install INSTALL(EXPORT) given keyword "EXPORT_LINK_INTERFACE_LIBRARIES",
but target "glfw" does not have policy CMP0022 set to NEW.

This may be an issue with which version gets downloaded into the /ext folder ?

Can you help ?

BTW - I used vcpkg to build ceres (very easy), and then just make sure you have the -DTOOLCHAIN flag set in cmake to point to vcpk when building the solution. This makes the Ceres issue on Windows a pice of cake!

The interface is not displayed

After compiling, the main_multiview.cpp file can run normally, but the interface is always white and no point cloud is displayed。
May I ask what is the reason and where should I modify it。
image

Compile on Linux

After merging the compile-on-windows branch, it doesn't work anymore for Linux.

The last time I compiled it on Linux was on an Ubuntu 14.04 LTS release, but at the moment I want it to compile on a recent Ubuntu release 17.10 / 18.04 LTS once released since the Ceres package there is much more up-to-date.

g2o has to be compiled from source or installed via ros on linux.

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.