File tree Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Expand file tree Collapse file tree 1 file changed +3
-8
lines changed Original file line number Diff line number Diff line change @@ -229,15 +229,10 @@ std::shared_ptr<HybridGaussianFactor> HybridGaussianConditional::likelihood(
229
229
if (Cgm_Kgcm == 0.0 ) {
230
230
return {likelihood_m, 0.0 };
231
231
} else {
232
- // Add a constant factor to the likelihood in case the noise models
232
+ // Add a constant to the likelihood in case the noise models
233
233
// are not all equal.
234
- GaussianFactorGraph gfg;
235
- gfg.push_back (likelihood_m);
236
- Vector c (1 );
237
- c << std::sqrt (2.0 * Cgm_Kgcm);
238
- auto constantFactor = std::make_shared<JacobianFactor>(c);
239
- gfg.push_back (constantFactor);
240
- return {std::make_shared<JacobianFactor>(gfg), 0.0 };
234
+ double c = 2.0 * Cgm_Kgcm;
235
+ return {likelihood_m, c};
241
236
}
242
237
});
243
238
return std::make_shared<HybridGaussianFactor>(
You can’t perform that action at this time.
0 commit comments