atenpas / gpd

Detect 6-DOF grasp poses in point clouds
BSD 2-Clause "Simplified" License
606 stars 233 forks source link

Feature request: Delete old markers before publishing new ones. #60

Closed hauff closed 4 years ago

hauff commented 5 years ago

If possible, something like this would be nice.

void GraspPlotter::drawGrasps(const std::vector<Grasp>& hands, const std::string& frame)
{
  for (size_t i = 0; i < markers_.markers.size(); i++)
    markers_.markers[i].action = visualization_msgs::Marker::DELETE;

  rviz_pub_.publish(markers_);
  markers_ = convertToVisualGraspMsg(hands, frame);
  rviz_pub_.publish(markers_);
}
atenpas commented 5 years ago

Could you submit a pull request?