diff --git a/gtsam/slam/simulated3D.h b/gtsam/slam/simulated3D.h index a386736a1..7b4dfce37 100644 --- a/gtsam/slam/simulated3D.h +++ b/gtsam/slam/simulated3D.h @@ -86,7 +86,7 @@ struct PointPrior3D: public NoiseModelFactor1 { * @return Vector error between prior value and x (Dimension: 3) */ Vector evaluateError(const Point3& x, boost::optional H = - boost::none) { + boost::none) const { return (prior(x, H) - measured_).vector(); } }; @@ -118,7 +118,7 @@ struct Simulated3DMeasurement: public NoiseModelFactor2 { * @return vector error between measurement and prediction (Dimension: 3) */ Vector evaluateError(const Point3& x1, const Point3& x2, - boost::optional H1 = boost::none, boost::optional H2 = boost::none) { + boost::optional H1 = boost::none, boost::optional H2 = boost::none) const { return (mea(x1, x2, H1, H2) - measured_).vector(); } };