Closed shaoxh closed 8 months ago
Remember to remap topic name points_raw and imu_raw to /velodyne_points and /imu/data respectively when playing the ROS_Bag.
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.
I used the provided Velodyne data, but found it not suitable. After a whole day work on it, finally figure the problem out.
This code requires that a point cloud in ROS topic MUST has fields named x-y-z-intensity-time, like here: `void Preprocess::velodyne_handler(const sensor_msgs::PointCloud2::ConstPtr &msg) { pl_surf.clear(); pl_corn.clear(); pl_full.clear();
for (int i = 0; i < plsize; i++) { PointType added_pt; // cout<<"!!!!!!"<<i<<" "<<plsize<<endl;
`
However, the so-provided velodyne data in ReadMe.md is made by the python file. This python file does NOT process intensity but refer to a RING field, like here:
` for i in range(num_hits): x = struct.unpack('<H', f_vel.read(2))[0] y = struct.unpack('<H', f_vel.read(2))[0] z = struct.unpack('<H', f_vel.read(2))[0] i = struct.unpack('B', f_vel.read(1))[0] l = struct.unpack('B', f_vel.read(1))[0]
and here: `if utime - last_time > 1e5:
print(last_time / 1e6)
This explains it! No Intensity on the provided ros bag file, and the FASTLIO keep throwing errors like these:
Failed to find match for field 'intensity'. Failed to find match for field 'intensity'. Failed to find match for field 'intensity'.
Do not know the reason they offer this wired codes and wrong test data. https://drive.google.com/drive/folders/1blQJuAB4S80NwZmpM6oALyHWvBljPSOE Write here in case someone else confront with the same issue. Good luck!