rosbag解析出pcd(ascll),不回放,c++,基于ros

#include 
#include 
#include 
#include 
#include 
#include 
#include 
#include "pcl_ros/transforms.h"
#include 
#include 

typedef sensor_msgs::PointCloud2 PointCloud;
typedef PointCloud::Ptr PointCloudPtr;
typedef PointCloud::ConstPtr PointCloudConstPtr;

int main (int argc, char** argv)
{
  ros::init (argc, argv, "rosbag_to_pcd");
  if (argc < 4)
  {
    std::cerr << "Syntax is: " << argv[0] << "    []" << std::endl;
    std::cerr << "Example: " << argv[0] << " data.bag /laser_tilt_cloud ./pointclouds /base_link" << std::endl;
    return (-1);
  }

  // TF
  tf::TransformListener tf_listener;
  tf::TransformBroadcaster t

你可能感兴趣的:(自动驾驶)