@@ -147,6 +147,26 @@ std::unordered_map<std::string, Sophus::SE3d> constructCadForDvtLarge() {
147
147
148
148
return cadMapT_Device_Sensor;
149
149
}
150
+
151
+ // A helper function for constructing CAD extrinsics for DVT-MARIA
152
+ std::unordered_map<std::string, Sophus::SE3d> constructCadForDvtmAria () {
153
+ std::unordered_map<std::string, Sophus::SE3d> cadMapT_Device_Sensor;
154
+
155
+ const std::vector<std::string> cadCsvLines = {
156
+ " camera-slam-left, 0.034514, 0.018218, 0.031484, 0.706941, -0.000074, -0.707273, 0.579394, 0.573576, 0.579062" ,
157
+ " camera-slam-right, -0.034514, 0.018218, 0.031484, 0.706941, 0.000074, 0.707273, -0.579394, 0.573576, 0.579062" ,
158
+ " camera-rgb, 0.0000, 0.021863, 0.033201, 1.000000, 0.000000, 0.000000, 0.000000, 0.573576, 0.819152" ,
159
+ " imu-left, 0.021263 ,0.014650, 0.033979, 0, -1, 0, 0, 0, 1" ,
160
+ " imu-right, -0.023299, 0.016315, 0.034099, 1, 0, 0, 0, 0, 1" };
161
+ for (const auto & line : cadCsvLines) {
162
+ const auto maybeLabelAndPose = readSingleCsvLine (line);
163
+ XR_CHECK (maybeLabelAndPose.has_value (), " Reading csv line has failed: {}" , line);
164
+ cadMapT_Device_Sensor.emplace (
165
+ maybeLabelAndPose.value ().first , maybeLabelAndPose.value ().second );
166
+ }
167
+
168
+ return cadMapT_Device_Sensor;
169
+ }
150
170
} // namespace
151
171
152
172
DeviceCadExtrinsics::DeviceCadExtrinsics (
@@ -157,8 +177,7 @@ DeviceCadExtrinsics::DeviceCadExtrinsics(
157
177
} else if (deviceSubType == " DVT-L" ) {
158
178
labelToT_Cpf_Sensor_ = constructCadForDvtLarge ();
159
179
} else if (deviceSubType == " DVT-MARIA" ) {
160
- XR_LOGW (" No CAD available for mAria device" );
161
- return ;
180
+ labelToT_Cpf_Sensor_ = constructCadForDvtmAria ();
162
181
} else if (deviceSubType == " SimulatedDevice" ) {
163
182
XR_LOGW (" No CAD available for simulated device" );
164
183
return ;
@@ -177,7 +196,7 @@ std::optional<Sophus::SE3d> DeviceCadExtrinsics::getT_Device_Sensor(
177
196
if (maybePose != labelToT_Cpf_Sensor_.end ()) {
178
197
return T_Device_Cpf_ * maybePose->second ;
179
198
} else {
180
- return std::nullopt ;
199
+ return {} ;
181
200
}
182
201
}
183
202
0 commit comments