libpointmatcher安装和使用
libpointmatcher介绍:
libpointmatcher is a modular library implementing the Iterative Closest Point (ICP) algorithm for aligning point clouds. It has applications in robotics and computer vision.
安装:
1、提前准备
a. Installing Boost
安装命令 sudo apt-get install libboost-all-dev
b. Installing Git
安装命令 sudo apt-get install git-core
c. Installing CMake
sudo apt-get install cmake cmake-gui
2、正式安装
a .Installing Eigen
安装命令 sudo apt-get install libeigen3-dev
b. Installing libnabo
git clone git://github.com/ethz-asl/libnabo.git
cd libnabo
gedit install.sh
复制如下的命令到文件里面
#!/bin/bash echo start SRC_DIR=`pwd` BUILD_DIR=${SRC_DIR}/build mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR} cmake -DCMAKE_BUILD_TYPE=RelWithDebInfo ${SRC_DIR} make sudo make install echo done!
执行./install.sh
c. Compiling the Documentation
安装命令 sudo apt-get install doxygen
安装命令 sudo apt-get install texlive-full
d. Installing libpointmatcher
cd ~/Libraries/
git clone git://github.com/ethz-asl/libpointmatcher.git
cd libpointmatcher
gedit install.sh
复制如下的命令到文件里面
#!/bin/bash echo start SRC_DIR=`pwd` BUILD_DIR=${SRC_DIR}/build mkdir -p ${BUILD_DIR} && cd ${BUILD_DIR} cmake -D CMAKE_BUILD_TYPE=RelWithDebInfo ${SRC_DIR} make sudo make install echo done!
执行./install.sh
编译用例:
在libpointmatcher的example目录下
修改CMakeLists.txt为
cmake_minimum_required(VERSION 3.5) add_compile_options(-std=c++11) find_package(Boost 1.45.0 COMPONENTS system filesystem regex) #if(Boost_FOUND) include_directories(${Boost_INCLUDE_DIRS}) add_executable(pmicp icp.cpp) target_link_libraries(pmicp pointmatcher ${Boost_LIBRARIES}) install(TARGETS pmicp RUNTIME DESTINATION bin) add_executable(icp_simple icp_simple.cpp) target_link_libraries(icp_simple pointmatcher ${Boost_LIBRARIES}) add_executable(align_sequence align_sequence.cpp) target_link_libraries(align_sequence pointmatcher ${Boost_LIBRARIES}) add_executable(list_modules list_modules.cpp) target_link_libraries(list_modules pointmatcher ${Boost_LIBRARIES}) add_executable(build_map build_map.cpp) target_link_libraries(build_map pointmatcher ${Boost_LIBRARIES}) add_executable(compute_overlap compute_overlap.cpp) target_link_libraries(compute_overlap pointmatcher ${Boost_LIBRARIES}) add_executable(icp_advance_api icp_advance_api.cpp) target_link_libraries(icp_advance_api pointmatcher ${Boost_LIBRARIES}) add_executable(icp_customized icp_customized.cpp) target_link_libraries(icp_customized pointmatcher ${Boost_LIBRARIES}) #endif()
进入example的build文件夹下执行make,会在当先目录下生成可执行文件
添加环境变量:
gedit /etc/profile
在最后面添加 export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:/usr/local/lib/
source /etc/profile
执行用例:
在build目录下执行 ./icp_simple ../../examples/data/car_cloud400.csv ../../examples/data/car_cloud401.csv
执行结果:
Final transformation:
0.983804 -0.179247 -0.0575061
0.179247 0.983804 -0.228765
0 0 1
无报错成功!
推荐阅读
-
PHP字符串比较函数strcmp()和strcasecmp()使用总结,strcmpstrcasecmp_PHP教程
-
使用JavaScript创建新样式表和新样式规则_php实例
-
PHP在XP下IIS和Apache2服务器上的安装_php基础
-
php中的curl使用入门教程和常见用法实例_php实例
-
mysql 安装使用小记_MySQL
-
JavaEE基础day02 1.定义Java中的变量 四类八种 2.变量定义和使用的注意事项 3.数据类型的转换、强制数据类型转换4.算数运算符、比较运算符、逻辑运算符、赋值运算符、三元运算符
-
使用Python实现在Windows下安装Django
-
C#中事件的定义和使用
-
Svn服务器的安装和配置,svn服务器配置
-
Python爬虫之pandas基本安装与使用方法示例