From 25e393e0a29f7e5c02a1493a8441025c4825bbfb Mon Sep 17 00:00:00 2001 From: senselessDev Date: Fri, 14 Jan 2022 12:47:56 +0100 Subject: [PATCH] fix QUAT type registration after clang-format (#562) * fix QUAT type registration after clang-format * fix QUAT type registration in interactive_slam example --- .../interactive_slam/g2o_interactive/types_online.cpp | 7 +++++-- g2o/types/slam3d/types_slam3d.cpp | 7 +++++-- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/g2o/examples/interactive_slam/g2o_interactive/types_online.cpp b/g2o/examples/interactive_slam/g2o_interactive/types_online.cpp index ebb81594d..472846fc1 100644 --- a/g2o/examples/interactive_slam/g2o_interactive/types_online.cpp +++ b/g2o/examples/interactive_slam/g2o_interactive/types_online.cpp @@ -35,7 +35,10 @@ G2O_REGISTER_TYPE_GROUP(online); G2O_REGISTER_TYPE(ONLINE_EDGE_SE2, OnlineEdgeSE2); G2O_REGISTER_TYPE(ONLINE_VERTEX_SE2, OnlineVertexSE2); -G2O_REGISTER_TYPE(ONLINE_VERTEX_SE3 : QUAT, OnlineVertexSE3); -G2O_REGISTER_TYPE(ONLINE_EDGE_SE3 : QUAT, OnlineEdgeSE3); +// clang-format off +// otherwise it will result in non-working "ONLINE_VERTEX_SE3 : QUAT" +G2O_REGISTER_TYPE(ONLINE_VERTEX_SE3:QUAT, OnlineVertexSE3); +G2O_REGISTER_TYPE(ONLINE_EDGE_SE3:QUAT, OnlineEdgeSE3); +// clang-format on } // namespace g2o diff --git a/g2o/types/slam3d/types_slam3d.cpp b/g2o/types/slam3d/types_slam3d.cpp index 84c4242b2..246c0f756 100644 --- a/g2o/types/slam3d/types_slam3d.cpp +++ b/g2o/types/slam3d/types_slam3d.cpp @@ -35,8 +35,11 @@ namespace g2o { G2O_REGISTER_TYPE_GROUP(slam3d); -G2O_REGISTER_TYPE(VERTEX_SE3 : QUAT, VertexSE3); -G2O_REGISTER_TYPE(EDGE_SE3 : QUAT, EdgeSE3); +// clang-format off +// otherwise it will result in non-working "VERTEX_SE3 : QUAT" +G2O_REGISTER_TYPE(VERTEX_SE3:QUAT, VertexSE3); +G2O_REGISTER_TYPE(EDGE_SE3:QUAT, EdgeSE3); +// clang-format on G2O_REGISTER_TYPE(VERTEX_TRACKXYZ, VertexPointXYZ); G2O_REGISTER_TYPE(PARAMS_SE3OFFSET, ParameterSE3Offset);