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);
SharedNoiseModel ConvertNoiseModel(const SharedNoiseModel &model, size_t d, bool defaultToUnit)
noiseModel::Diagonal::shared_ptr model
static const double sigma
Various factors that minimize some Frobenius norm.
noiseModel::Base::shared_ptr SharedNoiseModel