bool PointCloudVisualization::visualize(const grid_map::GridMap& map)
{
  if (pointCloudPublisher_.getNumSubscribers () < 1) return true;

  sensor_msgs::PointCloud2 pointCloud;

  map.toPointCloud(pointCloud, pointType_);

  pointCloudPublisher_.publish(pointCloud);
  return true;
}
コード例 #2
0
bool PointCloudVisualization::visualize(const grid_map::GridMap& map)
{
  if (pointCloudPublisher_.getNumSubscribers () < 1) return true;

  sensor_msgs::PointCloud2 pointCloud;

  // FIXME(cfo): segfaults when pointtype is not set!
  map.toPointCloud(pointCloud, pointType_);

  pointCloudPublisher_.publish(pointCloud);
  return true;
}