【问题标题】:How to combine multiple .pcd files into a single .pcd file which contains point cloud data (python)?如何将多个 .pcd 文件组合成一个包含点云数据的单个 .pcd 文件(python)?
【发布时间】:2020-11-03 03:12:55
【问题描述】:

网上有使用“laser_scan_assembler”的建议,但我不知道如何实施。

【问题讨论】:

    标签: python ros point-cloud-library point-clouds


    【解决方案1】:

    您可以使用 PCL 库简单地连接点云:

    typedef pcl::PointXYZ PointType;
    typedef pcl::PointCloud<PointType> CloudType;
    
    // Load the PCD files
    CloudType::Ptr cloud1(new CloudType);
    CloudType::Ptr cloud2(new CloudType);
    pcl::io::loadPCDFile("cloud1.pcd", *cloud1);
    pcl::io::loadPCDFile("cloud2.pcd", *cloud2);
    
    // Put in one output cloud
    CloudType::Ptr output(new CloudType);
    *output += *cloud1;
    *output += *cloud2;
    
    // Save the output file
    pcl::io::savePCDFileASCII("output.pcd", *output);
    

    请注意,这只是连接点。输入云必须在同一坐标系中,否则需要先注册。

    您还可以使用 bash 可执行文件 pcl_concatenate_points_pcd 连接多个 PCD 文件。

    【讨论】:

      猜你喜欢
      • 1970-01-01
      • 1970-01-01
      • 2020-06-19
      • 2018-04-14
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 1970-01-01
      • 2022-08-17
      相关资源
      最近更新 更多