feat(src): added imu params: assembly error, temperature error

This commit is contained in:
Osenberg
2019-03-15 17:00:52 +08:00
parent 3f80c8bbff
commit b3e41de62c
8 changed files with 152 additions and 16 deletions

View File

@@ -3,18 +3,26 @@
version: "1.2"
in_accel:
scale: [ 1., 0., 0., 0., 1., 0., 0., 0., 1. ]
assembly: [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]
drift: [ 0., 0., 0. ]
noise: [ 1.6925432397973516e-02, 1.6735310195561025e-02,
1.7452487504590969e-02 ]
bias: [ 1.9031356589714596e-04, 1.6996777864587261e-04,
5.4490537096493644e-04 ]
x: [ 0.0, 0.0 ]
y: [ 0.0, 0.0 ]
z: [ 0.0, 0.0 ]
in_gyro:
scale: [ 1., 0., 0., 0., 1., 0., 0., 0., 1. ]
assembly: [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]
drift: [ 0., 0., 0. ]
noise: [ 1.0848026158819934e-03, 1.2466367883501759e-03,
1.1003229919806443e-03 ]
bias: [ 2.3404834136742844e-05, 2.3596771567764949e-05,
1.4970418056326829e-05 ]
x: [ 0.0, 0.0 ]
y: [ 0.0, 0.0 ]
z: [ 0.0, 0.0 ]
ex_left_to_imu:
rotation: [ -6.4662000000000001e-03, -9.9994994000000004e-01,
-7.6356499999999999e-03, 9.9997908999999996e-01,

View File

@@ -3,18 +3,26 @@
version: "1.2"
in_accel:
scale: [ 1., 0., 0., 0., 1., 0., 0., 0., 1. ]
assembly: [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]
drift: [ 0., 0., 0. ]
noise: [ 1.6925432397973516e-02, 1.6735310195561025e-02,
1.7452487504590969e-02 ]
bias: [ 1.9031356589714596e-04, 1.6996777864587261e-04,
5.4490537096493644e-04 ]
x: [ 0.0, 0.0 ]
y: [ 0.0, 0.0 ]
z: [ 0.0, 0.0 ]
in_gyro:
scale: [ 1., 0., 0., 0., 1., 0., 0., 0., 1. ]
assembly: [ 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0, 0.0 ]
drift: [ 0., 0., 0. ]
noise: [ 1.0848026158819934e-03, 1.2466367883501759e-03,
1.1003229919806443e-03 ]
bias: [ 2.3404834136742844e-05, 2.3596771567764949e-05,
1.4970418056326829e-05 ]
x: [ 0.0, 0.0 ]
y: [ 0.0, 0.0 ]
z: [ 0.0, 0.0 ]
ex_left_to_imu:
rotation: [ -6.4662000000000001e-03, -9.9994994000000004e-01,
-7.6356499999999999e-03, 9.9997908999999996e-01,

View File

@@ -157,11 +157,20 @@ cv::FileStorage &operator<<(cv::FileStorage &fs, const ImuIntrinsics &in) {
scales.push_back(in.scale[i][j]);
}
}
std::vector<double> assembly;
for (std::size_t i = 0; i < 3; i++) {
for (std::size_t j = 0; j < 3; j++) {
assembly.push_back(in.assembly[i][j]);
}
}
fs << "{"
<< "scale" << scales << "drift"
<< "scale" << scales << "assembly" << assembly << "drift"
<< std::vector<double>(in.drift, in.drift + 3) << "noise"
<< std::vector<double>(in.noise, in.noise + 3) << "bias"
<< std::vector<double>(in.bias, in.bias + 3) << "}";
<< std::vector<double>(in.bias, in.bias + 3) << "x"
<< std::vector<double>(in.x, in.x + 2) << "y"
<< std::vector<double>(in.y, in.y + 2) << "z"
<< std::vector<double>(in.z, in.z + 2) << "}";
return fs;
}
@@ -343,6 +352,11 @@ void operator>>(const cv::FileNode &n, ImuIntrinsics &in) {
in.scale[i][j] = n["scale"][3 * i + j];
}
}
for (std::size_t i = 0; i < 3; i++) {
for (std::size_t j = 0; j < 3; j++) {
in.assembly[i][j] = n["assembly"][3 * i + j];
}
}
for (std::size_t i = 0; i < 3; i++) {
in.drift[i] = n["drift"][i];
}
@@ -352,6 +366,15 @@ void operator>>(const cv::FileNode &n, ImuIntrinsics &in) {
for (std::size_t i = 0; i < 3; i++) {
in.bias[i] = n["bias"][i];
}
for (std::size_t i = 0; i < 2; i++) {
in.x[i] = n["x"][i];
}
for (std::size_t i = 0; i < 2; i++) {
in.y[i] = n["y"][i];
}
for (std::size_t i = 0; i < 2; i++) {
in.z[i] = n["z"][i];
}
}
void operator>>(const cv::FileNode &n, Extrinsics &ex) {