From a7a6280ad7921fb62799cf9a34445970eee596c8 Mon Sep 17 00:00:00 2001
From: Arnaud Degroote <arnaud.degroote@laas.fr>
Date: Wed, 13 Nov 2013 16:27:24 +0100
Subject: [PATCH] [wip/rtslam-genom] Upgrade to 0.2

- adapt for multi-camera
- improve handling of errors
- export properly pom position
---
 rtslam-genom/Makefile         | 11 +++++-
 rtslam-genom/depend.mk        |  4 ++
 rtslam-genom/distinfo         |  7 ++--
 rtslam-genom/patches/patch-aa | 74 -----------------------------------
 4 files changed, 16 insertions(+), 80 deletions(-)
 delete mode 100644 rtslam-genom/patches/patch-aa

diff --git a/rtslam-genom/Makefile b/rtslam-genom/Makefile
index 74ccf737..a0f9a8ba 100644
--- a/rtslam-genom/Makefile
+++ b/rtslam-genom/Makefile
@@ -1,7 +1,9 @@
+# robotpkg Makefile for:	localization/rtslam-genom
+# Created:			Arnaud Degroote on Tue, 19 Mar 2013
+#
 
 DISTNAME=		rtslam-genom-${VERSION}
-VERSION=		0.1
-PKGREVISION=		2
+VERSION=		0.2
 CATEGORIES=		localization
 MASTER_SITES=		${MASTER_SITE_OPENROBOTS:=rtslam-genom/}
 MASTER_REPOSITORY=	${MASTER_REPOSITORY_OPENROBOTS}rtslam-genom
@@ -19,6 +21,11 @@ endef
 GENOM_MODULE=		rtslam
 include ../../architecture/genom/depend.mk
 
+# Use O2, it seems 10% more efficient that O3 on various tested platform, in
+# particular our robots. While here, add the NDEBUG flag pour boost::ublas
+CXX_COMPILER_FLAGS_NDEBUG=-O2 -DNDEBUG -DBOOST_UBLAS_NDEBUG
+C_COMPILER_FLAGS_NDEBUG=-O2 -DNDEBUG -DBOOST_UBLAS_NDEBUG
+
 include ../../interfaces/genBasic-genom/depend.mk
 include ../../localization/pom-genom/depend.mk
 include ../../mk/language/c.mk
diff --git a/rtslam-genom/depend.mk b/rtslam-genom/depend.mk
index f603e603..351f5ec2 100644
--- a/rtslam-genom/depend.mk
+++ b/rtslam-genom/depend.mk
@@ -1,3 +1,7 @@
+# robotpkg depend.mk for:	localization/rtslam-genom
+# Created:			Arnaud Degroote on Tue, 19 Mar 2013
+#
+
 DEPEND_DEPTH:=		${DEPEND_DEPTH}+
 RTSLAM_GENOM_DEPEND_MK:=	${RTSLAM_GENOM_DEPEND_MK}+
 
diff --git a/rtslam-genom/distinfo b/rtslam-genom/distinfo
index 8a5853a2..f9de70da 100644
--- a/rtslam-genom/distinfo
+++ b/rtslam-genom/distinfo
@@ -1,4 +1,3 @@
-SHA1 (rtslam-genom-0.1.tar.gz) = 0be2e3807022dbfb3e79064eb54689da6e91e2ad
-RMD160 (rtslam-genom-0.1.tar.gz) = 9d05b234798f71aafc6b4d33a0dcc92221f1f83e
-Size (rtslam-genom-0.1.tar.gz) = 6468 bytes
-SHA1 (patch-aa) = 26c99ce5289b540444fb2bcaa0fc5a6f95864798
+SHA1 (rtslam-genom-0.2.tar.gz) = 8ddb8e8912d35bf8f40e31586bdb34f1135828b1
+RMD160 (rtslam-genom-0.2.tar.gz) = 88bb8e9d034632ac8c0ff007a14a9091a564207a
+Size (rtslam-genom-0.2.tar.gz) = 7680 bytes
diff --git a/rtslam-genom/patches/patch-aa b/rtslam-genom/patches/patch-aa
deleted file mode 100644
index 1c486909..00000000
--- a/rtslam-genom/patches/patch-aa
+++ /dev/null
@@ -1,74 +0,0 @@
-diff --git a/codels/rtslamMainTaskCodels.cc b/codels/rtslamMainTaskCodels.cc
-index 3eb62f8..fd11b73 100644
---- codels/rtslamMainTaskCodels.cc
-+++ codels/rtslamMainTaskCodels.cc
-@@ -124,13 +124,14 @@ rtslamInitMain(RtslamInitParams *init_params, int *report)
- 	intOpts[iVerbose] = 5;
- 	intOpts[iMap] = (int)init_params->map;
- 	intOpts[iRobot] = (int)init_params->robot;
--	intOpts[iCamera] = 10;
-+	intOpts[iCamera] = (int)init_params->camera;
- 	intOpts[iTrigger] = (int)init_params->trigger;
- 	intOpts[iGps] = (int)init_params->gps;
- 	intOpts[iOdom] = (int)init_params->odo;
- 	intOpts[iExtloc] = (int)init_params->extloc;
- 	intOpts[iSimu] = 0;
- 	intOpts[iExport] = 0;
-+	intOpts[iCamsFilter] = 100000;
- 	
- 	floatOpts[fFreq] = (double)init_params->freq;
- 	floatOpts[fShutter] = (double)init_params->shutter;
-diff --git a/rtslam.gen b/rtslam.gen
-index c0daec8..ca9cf37 100644
---- rtslam.gen
-+++ rtslam.gen
-@@ -97,9 +97,11 @@ request Init {
- 		RTSLAM_ROBOT_CONSTVEL::"Robot type",
- 		60.0::"Camera acquisition frequency (Hz)",
- 		0.0::"Camera shutter time (s); 0. = auto; absolute for TRIGGER_EXTERNAL_M1, relative else",
-+		RTSLAM_CAM_MONO_RAW::"Camera count and type",
- 		RTSLAM_TRIGGER_INTERNAL::"Camera trigger type",
- 		RTSLAM_GPS_OFF::"Use GPS",
- 		RTSLAM_ODO_OFF::"Use Odometry",
-+		RTSLAM_EXTLOC_DISABLED::"Use external localization",
- 		RTSLAM_OFF::"Dump data to disk",
- 		RTSLAM_DISPLAY_OFF::"Display",
- 		"."::"Path where to save logs and dumps",
-diff --git a/rtslamStruct.h b/rtslamStruct.h
-index d1d8190..893c79b 100644
---- rtslamStruct.h
-+++ rtslamStruct.h
-@@ -35,6 +35,10 @@ typedef enum RtslamRobotType {
- 	RTSLAM_ROBOT_CONSTVEL = 0, RTSLAM_ROBOT_INERTIAL = 1
- } RtslamRobotType;
- 
-+typedef enum RtslamCameraType {
-+	RTSLAM_CAM_LEFT_RAW = 10, RTSLAM_CAM_RIGHT_RAW = 20, RTSLAM_CAM_BI_RAW = 30
-+} RtslamCameraType;
-+
- typedef enum RtslamTriggerType {
- 	RTSLAM_TRIGGER_INTERNAL = 0, RTSLAM_TRIGGER_EXTERNAL_M1 = 1, RTSLAM_TRIGGER_EXTERNAL_M0 = 2, RTSLAM_TRIGGER_EXTERNAL_M14 = 3
- } RtslamTriggerType;
-@@ -66,13 +70,14 @@ typedef struct RtslamInitParams {
- 	RtslamRobotType robot;
- 	double freq;
- 	double shutter;
-+	RtslamCameraType camera;
- 	RtslamTriggerType trigger;
- 	RtslamGpsType gps;
- 	RtslamOdoType odo;
- 	RtslamExtlocType extloc;
- 	RtslamEnable dump;
- 	RtslamDisplayType display;
--	char data_path[RTSLAM_FILE_LENGTH];
-+	char data_path[RTSLAM_FILE_LENGTH+4];
- 	char log_file[RTSLAM_FILE_LENGTH];
- 	char config_setup[RTSLAM_FILE_LENGTH];
- 	char config_estimation[RTSLAM_FILE_LENGTH];
-@@ -131,4 +136,4 @@ typedef struct RtslamStatus
- 
- 
- 
--#endif
-\ No newline at end of file
-+#endif
-- 
GitLab