Skip to content

Commit

Permalink
Fix registration of types in g2opy
Browse files Browse the repository at this point in the history
The base class type was missing after using the fixed sized edge as base
class for some types.
  • Loading branch information
RainerKuemmerle committed Mar 13, 2024
1 parent 9d5bd81 commit 06c57fe
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
7 changes: 5 additions & 2 deletions python/types/slam2d/py_edge_se2.h
Original file line number Diff line number Diff line change
Expand Up @@ -67,10 +67,13 @@ inline void declareEdgeSE2(py::module& m) {
.def("initial_estimate_possible", &EdgeSE2Prior::initialEstimatePossible)
.def("initial_estimate", &EdgeSE2Prior::initialEstimate);

templatedBaseFixedSizedEdge<4, Vector4, VertexSE2, VertexPointXY,
VertexPointXY>(
m, "_4_Vector4_VertexSE2_VertexPointXY_VertexPointXY");
py::class_<
EdgeSE2TwoPointsXY,
BaseFixedSizedEdge<4, Vector4, VertexSE2, VertexPointXY, VertexPointXY>>(
m, "EdgeSE2TwoPointsXY")
BaseFixedSizedEdge<4, Vector4, VertexSE2, VertexPointXY, VertexPointXY>,
std::shared_ptr<EdgeSE2TwoPointsXY>>(m, "EdgeSE2TwoPointsXY")
.def(py::init<>())
.def("compute_error", &EdgeSE2TwoPointsXY::computeError)
.def("set_measurement_from_state",
Expand Down
3 changes: 2 additions & 1 deletion python/types/slam2d/py_edge_se2_pointxy.h
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,8 @@ inline void declareEdgeSE2PointXY(py::module& m) {
// class G2O_TYPES_SLAM2D_API EdgeSE2PointXYBearingWriteGnuplotAction: public
// WriteGnuplotAction class G2O_TYPES_SLAM2D_API
// EdgeSE2PointXYBearingDrawAction: public DrawAction

templatedBaseFixedSizedEdge<2, Vector2, VertexSE2, VertexPointXY, VertexSE2>(
m, "_2_Vector2_VertexSE2_VertexPointXY_VertexSE2");
py::class_<
EdgeSE2PointXYCalib,
BaseFixedSizedEdge<2, Vector2, VertexSE2, VertexPointXY, VertexSE2>,
Expand Down

0 comments on commit 06c57fe

Please sign in to comment.