@@ -61,14 +61,15 @@ std::string ObjectVisualizer::printInfo() const { return config::toString(config
6161
6262void ObjectVisualizer::call (uint64_t timestamp_ns,
6363 const kimera_pgmo::MeshDelta& delta,
64- const std::vector<size_t >& active,
6564 const LabelIndices& label_indices) const {
6665 pubs_.publish (" active_vertices" , [&]() {
6766 auto msg = std::make_unique<Marker>();
6867 msg->header .stamp = rclcpp::Time (timestamp_ns);
6968 msg->header .frame_id = GlobalInfo::instance ().getFrames ().odom ;
7069 msg->ns = " active_vertices" ;
7170 msg->id = 0 ;
71+ std::vector<size_t > active (delta.getNumActiveVertices ());
72+ std::iota (active.begin (), active.end (), delta.getNumArchivedVertices ());
7273 fillMarkerFromCloud (delta, active, *msg);
7374 return msg;
7475 });
@@ -101,15 +102,15 @@ void ObjectVisualizer::fillMarkerFromCloud(const kimera_pgmo::MeshDelta& delta,
101102 msg.points .reserve (indices.size ());
102103 msg.colors .reserve (indices.size ());
103104 for (const auto idx : indices) {
104- const auto & p = delta.vertex_updates -> at (idx);
105+ const auto & p = delta.getVertex (idx);
105106 auto & point = msg.points .emplace_back ();
106- point.x = p.x ;
107- point.y = p.y ;
108- point.z = p.z ;
107+ point.x = p.pos . x () ;
108+ point.y = p.pos . y () ;
109+ point.z = p.pos . z () ;
109110 auto & color = msg.colors .emplace_back ();
110- color.r = p.r / 255 .0f ;
111- color.g = p.g / 255 .0f ;
112- color.b = p.b / 255 .0f ;
111+ color.r = p.traits . color [ 0 ] / 255 .0f ;
112+ color.g = p.traits . color [ 1 ] / 255 .0f ;
113+ color.b = p.traits . color [ 2 ] / 255 .0f ;
113114 color.a = config.point_alpha ;
114115 }
115116}
0 commit comments