6D Pose export as PCD
Hello,
I have 6D-Pose data that I want to save, originating from a processed LiDAR sensor. Specifically x,y,z,roll,pitch,yaw. I need to save the data later (possibly PCD Format?)
According to some documentation I've found, I need to use the Narf36 format to save as PCD. What would be the correct way of implementing this? I already have the data as rosbags, but I would like to have them preferably as PCD.
Im thinking:
pubKey6DPoses = nh.advertise<sensor_msgs::PointCloud2>("/key_6D_pose_origin", 2);
ros::Publisher pubKey6DPoses;
cloudKeyPoses6D->points[i].x = cloudKeyPoses3D->points[i].x;
cloudKeyPoses6D->points[i].y = cloudKeyPoses3D->points[i].y;
cloudKeyPoses6D->points[i].z = cloudKeyPoses3D->points[i].z;
cloudKeyPoses6D->points[i].roll = isamCurrentEstimate.at<Pose3>(i).rotation().pitch();
cloudKeyPoses6D->points[i].pitch = isamCurrentEstimate.at<Pose3>(i).rotation().yaw();
cloudKeyPoses6D->points[i].yaw = isamCurrentEstimate.at<Pose3>(i).rotation().roll();
pcl::PointCloud<pcl::Narf36> cloudMsg6DTemp;
pcl::toROSMsg(*cloudKeyPoses6D, cloudMsg6DTemp);
cloudMsgTemp.header.stamp = ros::Time().fromSec(timeLaserOdometry);
cloudMsgTemp.header.frame_id = "camera_init";
pubKey6DPoses.publish(cloudMsgTemp);
Can pointcloud2 be used? Is PCD the best format for 6D poses? Thank you in advance for your help.