mirror of
https://github.com/introlab/rtabmap.git
synced 2026-09-09 21:10:19 +08:00
Fixed list not defined error in util3d_surface.h. Updated rgbd_mapping example with Freenect2, zed and realsense options
This commit is contained in:
@@ -29,6 +29,7 @@ SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
|
||||
#include "rtabmap/core/Rtabmap.h"
|
||||
#include "rtabmap/core/RtabmapThread.h"
|
||||
#include "rtabmap/core/CameraRGBD.h"
|
||||
#include "rtabmap/core/CameraStereo.h"
|
||||
#include "rtabmap/core/CameraThread.h"
|
||||
#include "rtabmap/core/OdometryThread.h"
|
||||
#include "rtabmap/core/Graph.h"
|
||||
@@ -44,7 +45,7 @@ void showUsage()
|
||||
{
|
||||
printf("\nUsage:\n"
|
||||
"rtabmap-rgbd_mapping driver\n"
|
||||
" driver Driver number to use: 0=OpenNI-PCL, 1=OpenNI2, 2=Freenect, 3=OpenNI-CV, 4=OpenNI-CV-ASUS\n\n");
|
||||
" driver Driver number to use: 0=OpenNI-PCL, 1=OpenNI2, 2=Freenect, 3=OpenNI-CV, 4=OpenNI-CV-ASUS, 5=Freenect2, 6=ZED SDK, 7=RealSense\n\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
@@ -62,9 +63,9 @@ int main(int argc, char * argv[])
|
||||
else
|
||||
{
|
||||
driver = atoi(argv[argc-1]);
|
||||
if(driver < 0 || driver > 4)
|
||||
if(driver < 0 || driver > 7)
|
||||
{
|
||||
UERROR("driver should be between 0 and 4.");
|
||||
UERROR("driver should be between 0 and 7.");
|
||||
showUsage();
|
||||
}
|
||||
}
|
||||
@@ -112,6 +113,33 @@ int main(int argc, char * argv[])
|
||||
}
|
||||
camera = new CameraOpenNICV(true, 0, opticalRotation);
|
||||
}
|
||||
else if (driver == 5)
|
||||
{
|
||||
if (!CameraFreenect2::available())
|
||||
{
|
||||
UERROR("Not built with Freenect2 support...");
|
||||
exit(-1);
|
||||
}
|
||||
camera = new CameraFreenect2(0, CameraFreenect2::kTypeColor2DepthSD, 0, opticalRotation);
|
||||
}
|
||||
else if (driver == 6)
|
||||
{
|
||||
if (!CameraStereoZed::available())
|
||||
{
|
||||
UERROR("Not built with ZED SDK support...");
|
||||
exit(-1);
|
||||
}
|
||||
camera = new CameraStereoZed(0, 2, 1, 1, 100, false, 0, opticalRotation);
|
||||
}
|
||||
else if (driver == 7)
|
||||
{
|
||||
if (!CameraRealSense::available())
|
||||
{
|
||||
UERROR("Not built with RealSense support...");
|
||||
exit(-1);
|
||||
}
|
||||
camera = new CameraRealSense(0, 0, 0, 0, opticalRotation);
|
||||
}
|
||||
else
|
||||
{
|
||||
camera = new rtabmap::CameraOpenni("", 0, opticalRotation);
|
||||
|
||||
Reference in New Issue
Block a user