43 #ifndef EDGE_VIA_POINT_H_
44 #define EDGE_VIA_POINT_H_
49 #include "g2o/core/base_unary_edge.h"
66 class EdgeViaPoint :
public BaseTebUnaryEdge<1, const Eigen::Vector2d*, VertexPose>
83 ROS_ASSERT_MSG(
cfg_ && _measurement,
"You must call setTebConfig(), setViaPoint() on EdgeViaPoint()");
84 const VertexPose* bandpt =
static_cast<const VertexPose*
>(_vertices[0]);
86 _error[0] = (bandpt->position() - *_measurement).norm();
88 ROS_ASSERT_MSG(std::isfinite(_error[0]),
"EdgeViaPoint::computeError() _error[0]=%f\n",_error[0]);
97 _measurement = via_point;
105 void setParameters(
const TebConfig& cfg,
const Eigen::Vector2d* via_point)
108 _measurement = via_point;
112 EIGEN_MAKE_ALIGNED_OPERATOR_NEW