Closed kushantp58 closed 4 months ago
Never mind, figured it out using pcl-ros. Thanks !!
@kushantp58, how did you save the scan?
So you use pcl_ros to save it .
sudo apt intall ros-noetic-pcl-ros
.rosrun pcl_ros pointcloud_to_pcd input:=/current_scan
Thank you @kushantp58. I did record each scan with pcl_ros, but will the resultant merged scan have redundant points? Please share the script.
``import open3d as o3d import os , re
print("Current working directory: ", os.getcwd()) print("Changing working directory to the data folder ...") print("Testing IO for point cloud ...") folder = "/home/kuspatel/data/2024_07_09_15_38_45/2024_07_09_15_38_45/ig_lio/scans/" #replace this with your folder name
pcds = [] for file in os.listdir(folder): if file.endswith(".pcd"): print("Reading file: ", file) pcds.append(file)
print("Saving concatenated point cloud ...")
pd = o3d.geometry.PointCloud() for file in pcds: pcd_temp = o3d.io.read_point_cloud(folder + file) pd += pcd_temp
o3d.io.write_point_cloud(folder + "merged.ply", pd) ``
How do you save scans like you could do it for LIO SLAMs ?
I tried using this in config.yaml -
pcd_save: interval: -1
pcd_save_en: true
Didn't work, any help would be appreciated !