From f3dca666a89f64264933eff4662f41a2b8e2cf52 Mon Sep 17 00:00:00 2001 From: Joan Sola <jsola@iri.upc.edu> Date: Wed, 5 Jan 2022 10:16:12 +0100 Subject: [PATCH] Add quaternion to marker to avoid rviz warning --- include/publisher_graph.h | 1 - src/publisher_graph.cpp | 6 ++++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/include/publisher_graph.h b/include/publisher_graph.h index 7722dd7..a71c03c 100644 --- a/include/publisher_graph.h +++ b/include/publisher_graph.h @@ -93,7 +93,6 @@ class PublisherGraph: public Publisher // auxiliar variables unsigned int landmark_max_hits_; - double viz_period_; ros::Time last_markers_publish_; std::set<std::string> factors_drawn_; diff --git a/src/publisher_graph.cpp b/src/publisher_graph.cpp index 3e980bb..e55327c 100644 --- a/src/publisher_graph.cpp +++ b/src/publisher_graph.cpp @@ -589,6 +589,12 @@ void PublisherGraph::fillFactorMarker(FactorBaseConstPtr fac, fac_marker.points.push_back(point1); fac_marker.points.push_back(point2); + // initialize quaternion to avoid RVIZ warning + fac_marker.pose.orientation.w = 1.0; + fac_marker.pose.orientation.x = 0.0; + fac_marker.pose.orientation.y = 0.0; + fac_marker.pose.orientation.z = 0.0; + // colors ------------------------------------------------------ auto color = factor_abs_color_; if (fac->getTopology() == TOP_ABS) -- GitLab