use upper 3x3 sub-block of covariance matrix for converting BetweenFactor to BinaryMeasurement, and use Isotropic in ShonanAveraging2
parent
838e74dbc8
commit
5fee983ff1
|
|
@ -955,7 +955,7 @@ static BinaryMeasurement<Rot2> convertPose2ToBinaryMeasurementRot2(
|
|||
"parseMeasurements<Rot2> can only convert Pose2 measurements "
|
||||
"with Gaussian noise models.");
|
||||
const Matrix3 M = gaussian->covariance();
|
||||
auto model = noiseModel::Gaussian::Covariance(M.block<1, 1>(2, 2));
|
||||
auto model = noiseModel::Isotropic::Variance(1, M(2, 2));
|
||||
return BinaryMeasurement<Rot2>(f->key1(), f->key2(), f->measured().rotation(),
|
||||
model);
|
||||
}
|
||||
|
|
@ -1001,7 +1001,7 @@ static BinaryMeasurement<Rot3> convert(
|
|||
"parseMeasurements<Rot3> can only convert Pose3 measurements "
|
||||
"with Gaussian noise models.");
|
||||
const Matrix6 M = gaussian->covariance();
|
||||
auto model = noiseModel::Gaussian::Covariance(M.block<3, 3>(3, 3));
|
||||
auto model = noiseModel::Gaussian::Covariance(M.block<3, 3>(0, 0));
|
||||
return BinaryMeasurement<Rot3>(f->key1(), f->key2(), f->measured().rotation(),
|
||||
model);
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue