30 if (model !=
nullptr) {
34 sigmas = robust->noise()->sigmas();
36 sigmas = model->sigmas();
39 size_t n = sigmas.size();
44 else if (n == 3 || n == 6) {
48 throw std::runtime_error(
"Can only convert isotropic rotation noise");
54 throw std::runtime_error(
"Can only convert Pose2/Pose3 noise models");
58 auto isoModel = noiseModel::Isotropic::Sigma(d, sigma);
61 return noiseModel::Robust::Create(
62 noiseModel::mEstimator::Huber::Create(1.345), isoModel);
64 return std::move(isoModel);
noiseModel::Diagonal::shared_ptr model
SharedNoiseModel ConvertNoiseModel(const SharedNoiseModel &model, size_t d, bool defaultToUnit)
Various factors that minimize some Frobenius norm.
static const double sigma
noiseModel::Base::shared_ptr SharedNoiseModel