#include <sstream>
#include <boost/filesystem.hpp>
#include <rosbag/bag.h>
#include <rosbag/view.h>
#include <pcl/io/io.h>
#include <pcl/io/pcd_io.h>
#include <pcl_conversions/pcl_conversions.h>
#include "pcl_ros/transforms.h"
#include <tf/transform_listener.h>
#include <tf/transform_broadcaster.h>
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] << " <file_in.bag> <topic> <output_directory> [<target_frame>]" << std::endl;
std::cerr << "Example: " << argv[0] << " data.bag /laser_tilt_cloud ./pointclouds /base_link" << std::endl;
return (-1);
}
// TF
tf::TransformLi
rosbag解析出pcd(ascll),不回放,c++,基于ros
最新推荐文章于 2022-07-19 18:18:09 发布
#include <sstream>#include <boost/filesystem.hpp>#include <rosbag/bag.h>#include <rosbag/view.h>#include <pcl/io/io.h>#include <pcl/io/pcd_io.h>#include <p...
摘要由CSDN通过智能技术生成