Skip to content

Commit abfb636

Browse files
author
Andrea Censi
committed
ignoring build directory
2 parents 4486768 + 069926f commit abfb636

File tree

8 files changed

+23
-60
lines changed

8 files changed

+23
-60
lines changed

.gitignore

Lines changed: 0 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,29 +2,6 @@ CTestTestfile.cmake
22
CMakeCache.txt
33
Makefile
44
CMakeFiles
5-
sm/log2pdf
6-
sm/pkg-config/cmake_install.cmake
7-
sm/pkg-config/csm.pc
8-
sm/json2carmen
9-
sm/json2matlab
10-
sm/json_decimate
11-
sm/json_extract
12-
sm/json_extract_field
13-
sm/json_pipe
14-
sm/json_split
155
cmake_install.cmake
166
install_manifest.txt
17-
sm/carmen2json
18-
sm/lib/egsl/egsl_test
19-
sm/lib/egsl/egsl_test_allocation
20-
sm/lib/gpc/libgpc.a
21-
sm/lib/json-c/config.hsm/lib/json-c/libjson-c.a
22-
sm/lib/json-c/test2
23-
sm/lib/options/liboptions.a
24-
sm/lib/options/test_options
25-
sm/libcsm-static.a
26-
sm/libcsm.dylib
27-
sm/lib/egsl/libegsl.a
28-
sm/lib/json-c/config.h
29-
sm/lib/json-c/libjson-c.a
307
sm

README.md

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1,8 @@
1-
For more information about theC(canonical) Scan Matcher, see the webpage: http://purl.org/censi/2007/csm.
1+
For more information about the C(anonical) Scan Matcher, see the webpage: http://purl.org/censi/2007/csm.
2+
3+
Note: there are two branches on the repository. The "master" branch uses GSL.
4+
5+
This is the ``csm_eigen`` branch, which uses the ``eigen`` library.
6+
This branch is the work of people working at U. Freiburg and Kuka,
7+
including [Christoph Sprunk](http://www.informatik.uni-freiburg.de/~sprunkc/)
8+
and [Rainer Kuemmerle](http://www.informatik.uni-freiburg.de/~kuemmerl/).

src/CMakeLists.txt

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,13 @@ set(CMAKE_C_FLAGS_RELEASE "-O3")
88
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -Wall")
99
set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -Wall")
1010

11+
if(WIN32)
12+
add_definitions(-DWINDOWS)
13+
if(MSVC)
14+
# SSE2 optimizations
15+
ADD_DEFINITIONS("/arch:SSE2")
16+
endif()
17+
endif()
1118

1219
#SET(CMAKE_BUILD_TYPE Debug)
1320
SET(CMAKE_BUILD_TYPE RelWithDebInfo)

src/csm/math_utils.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
#include "csm_all.h"
55

66
int minmax(int from, int to, int x) {
7-
return std::max(std::min(x,to),from);
7+
return (std::max)((std::min)(x,to),from);
88
}
99

1010
void possible_interval(
@@ -186,7 +186,7 @@ double dist_to_segment_d(const double a[2], const double b[2], const double x[2]
186186
/* the projection is inside the segment */
187187
return distance;
188188
} else
189-
return sqrt(std::min( distance_squared_d(a,x), distance_squared_d(b,x)));
189+
return sqrt((std::min)( distance_squared_d(a,x), distance_squared_d(b,x)));
190190
}
191191

192192
int count_equal(const int*v, int n, int value) {

src/gpc/gpc.cpp

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,5 @@
11
/* GPC: A library for the solution of General Point Correspondence problems.
22
Copyright (C) 2006 Andrea Censi (andrea at censi dot org)
3-
4-
This program is free software; you can redistribute it and/or
5-
modify it under the terms of the GNU General Public License
6-
as published by the Free Software Foundation; either version 2
7-
of the License, or (at your option) any later version.
8-
9-
This program is distributed in the hope that it will be useful,
10-
but WITHOUT ANY WARRANTY; without even the implied warranty of
11-
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12-
GNU General Public License for more details.
13-
14-
You should have received a copy of the GNU General Public License
15-
along with this program; if not, write to the Free Software
16-
Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
173
*/
184

195
#include <math.h>
@@ -39,7 +25,7 @@ using namespace std;
3925
//New version: have static Eigen variables and use pointers to these for compatibility
4026
#define TAGME(name, tag) name##tag
4127
#define M(matrix, rows, col) static Eigen::MatrixXd TAGME(matrix,_mem)(rows, col); static gsl_matrix* matrix=&TAGME(matrix,_mem);
42-
#define MF(matrix)
28+
#define MF(matrix) (void)(matrix)
4329

4430

4531
int gpc_solve(int K, const std::vector<gpc_corr>& c,

src/gpc/gpc.h

Lines changed: 0 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,6 @@
11
/*
22
// GPC: A library for the solution of General Point Correspondence problems.
33
// Copyright (C) 2006 Andrea Censi (andrea at censi dot org)
4-
5-
// This program is free software; you can redistribute it and/or
6-
// modify it under the terms of the GNU General Public License
7-
// as published by the Free Software Foundation; either version 2
8-
// of the License, or (at your option) any later version.
9-
10-
// This program is distributed in the hope that it will be useful,
11-
// but WITHOUT ANY WARRANTY; without even the implied warranty of
12-
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13-
// GNU General Public License for more details.
14-
15-
// You should have received a copy of the GNU General Public License
16-
// along with this program; if not, write to the Free Software
17-
// Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
184
*/
195

206
#ifndef H_GENERAL_POINT_CORRESPONDENCE

src/icp/icp.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -160,8 +160,8 @@ void sm_icp(struct sm_params*params, struct sm_result*res) {
160160
//egsl_print_spectrum("cov0_x", cov0_x);
161161

162162
val fim = ld_fisher0(laser_ref);
163-
val ifim = inv(fim);
164163
egsl_print("fim", fim);
164+
//val ifim = inv(fim);
165165
//egsl_print_spectrum("ifim", ifim);
166166
}
167167
}

src/icp/icp_outliers.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ void kill_outliers_double(struct sm_params*params) {
5959
if(!ld_valid_corr(laser_sens, i)) continue;
6060
int j1 = laser_sens->corr[i].j1;
6161
dist2_i[i] = laser_sens->corr[i].dist2_j1;
62-
dist2_j[j1] = std::min(dist2_j[j1], dist2_i[i]);
62+
dist2_j[j1] = (std::min)(dist2_j[j1], dist2_i[i]);
6363
}
6464

6565
int nkilled = 0;
@@ -121,7 +121,7 @@ void kill_outliers_trim(struct sm_params*params, double*total_error) {
121121
/* two errors limits are defined: */
122122
/* In any case, we don't want more than outliers_maxPerc% */
123123
int order = (int)floor(k*(params->outliers_maxPerc));
124-
order = std::max(0, std::min(order, k-1));
124+
order = (std::max)(0, (std::min)(order, k-1));
125125

126126
/* The dists for the correspondence are sorted
127127
in ascending order */
@@ -131,10 +131,10 @@ void kill_outliers_trim(struct sm_params*params, double*total_error) {
131131
/* Then we take a order statics (o*K) */
132132
/* And we say that the error must be less than alpha*dist(o*K) */
133133
int order2 = (int)floor(k*params->outliers_adaptive_order);
134-
order2 = std::max(0, std::min(order2, k-1));
134+
order2 = (std::max)(0, (std::min)(order2, k-1));
135135
double error_limit2 = params->outliers_adaptive_mult*dist2[order2];
136136

137-
double error_limit = std::min(error_limit1, error_limit2);
137+
double error_limit = (std::min)(error_limit1, error_limit2);
138138

139139
#if 0
140140
double error_limit1_ho = hoare_selection(dist2_copy, 0, k-1, order);

0 commit comments

Comments
 (0)