Mobile Robot Programming Toolkit (MRPT)

2019-07-12 17:28发布

转自:http://www.cnblogs.com/feisky/archive/2009/11/24/1609587.html 顾名思义,MRPT就是用来开发移动机器人软件的一个库,和大名顶顶的OpenCV相比,可能用的人少许多,但也确实相比OpenCV提供了很多在机器人开发中用到的算法。 先来段官网的介绍: The Mobile Robot Programming Toolkit (MRPT) is an extensive, cross-platform, and open source C++ library aimed to help robotics researchers to design and implement algorithms (mainly) in the fields of Simultaneous Localization and Mapping (SLAM), computer vision, and motion planning (obstacle avoidance). The priorities are efficiency and reusability of code. 

The libraries include classes for easily managing 3D(6D) geometry, probability density functions (pdfs) over many predefined variables (points and poses, landmarks, maps), Bayesian inference (Kalman filters, particle filters), image processing, path planning and obstacle avoidance, 3D visualization of all kind of maps (points, occupancy grids, landmarks,...), etc. 

Gathering, manipulating and inspecting very large robotic datasets (Rawlogs) efficiently is another goal of MRPT, supported by several classes and applications. 

A proper and up-to-date documentation is another of the major goals of MRPT developers. Currently there are dozens of examples and several single-topic tutorials. A currently on-going project is devoted to write a "MRPT book" tutorial. 

The MRPT is free software and it is released under the GPL.

官方网站:http://sourceforge.net/projects/mrpt/               http://babel.isa.uma.es/mrpt/index.php/Main_Page
官方网站提供MRPT-BOOK,正在学习中...
在VS2008下的配置(由于我想使用OpenCV2.0和MRPT,而OpenCV2.0居然不支持VC6.0,而且MRPT库提供的编译好的库也是vs2008下的,所以只好采用庞大的VS2008了,无奈): 1.下载MRPT-0.7.1-win32.exe:Source code and precompiled executables and (DLL) libraries for Windows 32bit and Visual Studio 2008,直接安装到D:Program Filesmrpt-0.7.1 2.配置VS2008:在Includes添加:D:Program Filesmrpt-0.7.1include                        在Library添加:D:Program Filesmrpt-0.7.1lib 3.将D:Program Filesmrpt-0.7.1includemrptmrpt-configmrpt目录下的config.h和version.h复制到D:Program Filesmrpt-0.7.1includemrpt目录下。(不知道这是不是MRPT的一个Bug,如果不复制的话,好多其他文件中引用了这两个头文件,编译一堆的错误) 4.OK,可以编写你的第一个程序了。 // mrpttest.cpp : Defines the entry point for the console application. // #include "stdafx.h" #include #include using namespace mrpt::utils; using namespace mrpt::poses; using namespace std; int _tmain(int argc, _TCHAR* argv[]) { // Robot pose : 2D ( x , y , phi ) CPose2D R(2 , 1 , DEG2RAD( 45.0 ) ) ; // Camera pose relative to the robot : 6D ( x , y , z , yaw , pitch , roll) . CPose3D C( 0.5 , 0.5 , 1.5 , DEG2RAD(-90.0) ,DEG2RAD( 0 ) ,DEG2RAD(-90.0) ) ; cout <<"R: " << R << endl ; cout <<"C: " << C << endl ; cout << "R+C: " << (R+C) << endl ; cout << "|R-C|" << R.distanceTo (C) << endl ; return 0; }