Skip to content

Commit 6ccb8d0

Browse files
switch to system compiler (GCC/Clang) (#55)
1 parent 7fddc8e commit 6ccb8d0

File tree

3 files changed

+20
-22
lines changed

3 files changed

+20
-22
lines changed

SConstruct

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -19,8 +19,6 @@ cpppath = [
1919

2020
env = Environment(
2121
ENV=os.environ,
22-
CC='clang',
23-
CXX='clang++',
2422
CCFLAGS=[
2523
"-g",
2624
"-fPIC",
@@ -42,7 +40,7 @@ env = Environment(
4240

4341
# Cython build enviroment
4442
envCython = env.Clone()
45-
envCython["CCFLAGS"] += ["-Wno-#warnings", "-Wno-shadow", "-Wno-deprecated-declarations"]
43+
envCython["CCFLAGS"] += ["-Wno-#warnings", "-Wno-cpp", "-Wno-shadow", "-Wno-deprecated-declarations"]
4644

4745
envCython["LIBS"] = []
4846
if arch == "Darwin":

rednose/helpers/ekf_sym.cc

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,41 +4,41 @@
44
using namespace EKFS;
55
using namespace Eigen;
66

7-
EKFSym::EKFSym(std::string name, Map<MatrixXdr> Q, Map<VectorXd> x_initial, Map<MatrixXdr> P_initial, int dim_main,
8-
int dim_main_err, int N, int dim_augment, int dim_augment_err, std::vector<int> maha_test_kinds,
9-
std::vector<int> quaternion_idxs, std::vector<std::string> global_vars, double max_rewind_age)
7+
EKFSym::EKFSym(std::string name_, Map<MatrixXdr> Q_, Map<VectorXd> x_initial, Map<MatrixXdr> P_initial, int dim_main_,
8+
int dim_main_err_, int N_, int dim_augment_, int dim_augment_err_, std::vector<int> maha_test_kinds_,
9+
std::vector<int> quaternion_idxs_, std::vector<std::string> global_vars_, double max_rewind_age_)
1010
{
1111
// TODO: add logger
12-
this->ekf = ekf_lookup(name);
12+
this->ekf = ekf_lookup(name_);
1313
assert(this->ekf);
1414

15-
this->msckf = N > 0;
16-
this->N = N;
17-
this->dim_augment = dim_augment;
18-
this->dim_augment_err = dim_augment_err;
19-
this->dim_main = dim_main;
20-
this->dim_main_err = dim_main_err;
15+
this->msckf = N_ > 0;
16+
this->N = N_;
17+
this->dim_augment = dim_augment_;
18+
this->dim_augment_err = dim_augment_err_;
19+
this->dim_main = dim_main_;
20+
this->dim_main_err = dim_main_err_;
2121

2222
this->dim_x = x_initial.rows();
2323
this->dim_err = P_initial.rows();
2424

2525
assert(dim_main + dim_augment * N == dim_x);
2626
assert(dim_main_err + dim_augment_err * N == this->dim_err);
27-
assert(Q.rows() == P_initial.rows() && Q.cols() == P_initial.cols());
27+
assert(Q_.rows() == P_initial.rows() && Q_.cols() == P_initial.cols());
2828

2929
// kinds that should get mahalanobis distance
3030
// tested for outlier rejection
31-
this->maha_test_kinds = maha_test_kinds;
31+
this->maha_test_kinds = maha_test_kinds_;
3232

3333
// quaternions need normalization
34-
this->quaternion_idxs = quaternion_idxs;
34+
this->quaternion_idxs = quaternion_idxs_;
3535

36-
this->global_vars = global_vars;
36+
this->global_vars = global_vars_;
3737

3838
// Process noise
39-
this->Q = Q;
39+
this->Q = Q_;
4040

41-
this->max_rewind_age = max_rewind_age;
41+
this->max_rewind_age = max_rewind_age_;
4242
this->init_state(x_initial, P_initial, NAN);
4343
}
4444

rednose/helpers/kalmanfilter.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@
55

66
class KalmanFilter:
77
name = "<name>"
8-
initial_x = np.zeros((0, 0))
9-
initial_P_diag = np.zeros((0, 0))
10-
Q = np.zeros((0, 0))
8+
initial_x: np.ndarray = np.zeros(0)
9+
initial_P_diag: np.ndarray = np.zeros(0)
10+
Q: np.ndarray = np.zeros((0, 0))
1111
obs_noise: dict[int, Any] = {}
1212

1313
# Should be initialized when initializating a KalmanFilter implementation

0 commit comments

Comments
 (0)