Fix the conflict

This commit is contained in:
kalman
2018-11-24 16:43:38 +08:00
264 changed files with 29737 additions and 970 deletions

View File

@@ -1,10 +1,10 @@
%YAML:1.0
---
device_name: MYNT-EYE-S1000
device_name: MYNT-EYE-S210A
serial_number: "0386322C0009070E"
firmware_version: "2.0"
hardware_version: "2.0"
spec_version: "1.0"
firmware_version: "1.0"
hardware_version: "1.0"
spec_version: "1.1"
lens_type: "0000"
imu_type: "0000"
nominal_baseline: 120

View File

@@ -43,7 +43,7 @@ in_right_map:
model: 0
coeffs: [ 2.2904330559241560e-02, -2.9561990079971841e-02,
3.9725942760981507e-03, -3.9689073214945591e-03, 0. ]
ex_left_to_right:
ex_right_to_left:
rotation: [ 9.9998850083695123e-01, -1.9263678722299450e-03,
-4.3917309443490191e-03, 1.8166060642710027e-03,
9.9968925981619028e-01, -2.4861290203142431e-02,

View File

@@ -1,15 +1,15 @@
%YAML:1.0
---
in_accel:
scale: [ 0., 0., 0., 0., 0., 0., 0., 0., 0. ]
drift: [ 0., 0., 0. ]
noise: [ 0., 0., 0. ]
bias: [ 0., 0., 0. ]
scale: [ 1., 0., 0., 0., 1., 0., 0., 0., 1. ]
drift: [ 0.0, 0.0, 0.0 ]
noise: [ 0.016925432397973516, 0.016735310195561025, 0.017452487504590969 ]
bias: [ 0.00019031356589714596, 0.00016996777864587261, 0.00054490537096493644 ]
in_gyro:
scale: [ 0., 0., 0., 0., 0., 0., 0., 0., 0. ]
scale: [ 1., 0., 0., 0., 1., 0., 0., 0., 1. ]
drift: [ 0., 0., 0. ]
noise: [ 0., 0., 0. ]
bias: [ 0., 0., 0. ]
noise: [ 0.0010848026158819934, 0.0012466367883501759, 0.0011003229919806443 ]
bias: [ 0.000023404834136742844, 0.000023596771567764949, 0.000014970418056326829 ]
ex_left_to_imu:
rotation: [ 0., 0., 0., 0., 0., 0., 0., 0., 0. ]
translation: [ 0., 0., 0. ]
rotation: [ -0.0064662, -0.99994994, -0.00763565, 0.99997909, -0.00646566, -0.00009558, 0.0000462, -0.00763611, 0.99997084 ]
translation: [ 0.00533646, -0.04302922, 0.02303124 ]

View File

@@ -11,10 +11,9 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "mynteye/glog_init.h"
#include "mynteye/device.h"
#include "mynteye/utils.h"
#include "mynteye/logger.h"
#include "mynteye/device/device.h"
#include "mynteye/device/utils.h"
#include "writer/device_writer.h"

View File

@@ -13,17 +13,14 @@
// limitations under the License.
#include "writer/device_writer.h"
#include <opencv2/core/core.hpp>
#include <map>
#include <vector>
#include "mynteye/device.h"
#include "mynteye/files.h"
#include "mynteye/logger.h"
#include "mynteye/types.h"
#include <opencv2/core/core.hpp>
#include "internal/types.h"
#include "mynteye/logger.h"
#include "mynteye/device/device.h"
#include "mynteye/util/files.h"
MYNTEYE_BEGIN_NAMESPACE
@@ -75,7 +72,7 @@ bool DeviceWriter::WriteImgParams(const img_params_t &params) {
LOG(INFO) << "Write img params success";
// LOG(INFO) << "Intrinsics left: {" << params.in_left << "}";
// LOG(INFO) << "Intrinsics right: {" << params.in_right << "}";
LOG(INFO) << "Extrinsics left to right: {" << params.ex_left_to_right
LOG(INFO) << "Extrinsics left to right: {" << params.ex_right_to_left
<< "}";
return true;
} else {
@@ -202,7 +199,7 @@ bool DeviceWriter::SaveImgParams(
if (params.in_left_map.size() == params.in_right_map.size()) {
fs << "version" << info.spec_version.to_string() << "in_left_map"
<< params.in_left_map << "in_right_map" << params.in_right_map
<< "ex_left_to_right" << params.ex_left_to_right;
<< "ex_right_to_left" << params.ex_right_to_left;
fs.release();
return true;
} else {
@@ -329,8 +326,8 @@ DeviceWriter::dev_info_t DeviceWriter::LoadDeviceInfo(
LOG(FATAL) << "Failed to load file: " << filepath;
}
DeviceInfo info;
info.lens_type = Type(fs["lens_type"].string());
info.imu_type = Type(fs["imu_type"].string());
info.lens_type = Type(std::string(fs["lens_type"]));
info.imu_type = Type(std::string(fs["imu_type"]));
fs["nominal_baseline"] >> info.nominal_baseline;
fs.release();
return info;
@@ -369,25 +366,25 @@ DeviceWriter::img_params_t DeviceWriter::LoadImgParams(
w, h, m, M1, D1, &params.in_left_map[Resolution::RES_752x480]);
to_intrinsics(
w, h, m, M2, D2, &params.in_right_map[Resolution::RES_752x480]);
to_extrinsics(R, T, &params.ex_left_to_right);
to_extrinsics(R, T, &params.ex_right_to_left);
} else {
fs["in_left"][0] >> params.in_left_map[Resolution::RES_752x480];
fs["in_right"][0] >> params.in_right_map[Resolution::RES_752x480];
fs["ex_left_to_right"] >> params.ex_left_to_right;
fs["ex_right_to_left"] >> params.ex_right_to_left;
}
} else {
// TODO(Kalman): Is there a more reasonable way?
if (static_cast<std::string>(fs["version"]) == "1.0") {
fs["in_left_map"][0] >> params.in_left_map[Resolution::RES_752x480];
fs["in_right_map"][0] >> params.in_right_map[Resolution::RES_752x480];
fs["ex_left_to_right"] >> params.ex_left_to_right;
fs["ex_right_to_left"] >> params.ex_right_to_left;
}
if (static_cast<std::string>(fs["version"]) == "1.1") {
fs["in_left_map"][0] >> params.in_left_map[Resolution::RES_1280x400];
fs["in_left_map"][1] >> params.in_left_map[Resolution::RES_2560x800];
fs["in_right_map"][0] >> params.in_right_map[Resolution::RES_1280x400];
fs["in_right_map"][1] >> params.in_right_map[Resolution::RES_2560x800];
fs["ex_left_to_right"] >> params.ex_left_to_right;
fs["ex_right_to_left"] >> params.ex_right_to_left;
}
}
fs.release();

View File

@@ -19,9 +19,8 @@
#include <string>
#include "mynteye/mynteye.h"
#include "internal/channels.h"
#include "internal/types.h"
#include "mynteye/device/channels.h"
#include "mynteye/device/types.h"
MYNTEYE_BEGIN_NAMESPACE

View File

@@ -11,10 +11,9 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "mynteye/glog_init.h"
#include "mynteye/device.h"
#include "mynteye/utils.h"
#include "mynteye/logger.h"
#include "mynteye/device/device.h"
#include "mynteye/device/utils.h"
#include "writer/device_writer.h"

View File

@@ -11,10 +11,9 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "mynteye/glog_init.h"
#include "mynteye/device.h"
#include "mynteye/utils.h"
#include "mynteye/logger.h"
#include "mynteye/device/device.h"
#include "mynteye/device/utils.h"
#include "writer/device_writer.h"

View File

@@ -11,10 +11,9 @@
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
// See the License for the specific language governing permissions and
// limitations under the License.
#include "mynteye/glog_init.h"
#include "mynteye/device.h"
#include "mynteye/utils.h"
#include "mynteye/logger.h"
#include "mynteye/device/device.h"
#include "mynteye/device/utils.h"
#include "writer/device_writer.h"