New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to reproduce results for NCLT #28
Comments
Hi @nachovizzo, We are indeed using the velodyne_hits.bin file, which we decode into a sequence of scans, std::vector<ct_icp::Point3D> DoNext(bool jump_frame = false) {
std::vector<ct_icp::Point3D> points;
// Normalize timestamps
double min_timestamp = std::numeric_limits<double>::infinity(), max_timestamp = std::numeric_limits<double>::lowest();
for (int iter(0); iter < num_aggregated_pc_; ++iter) {
if (!HasNext())
break;
auto next_batch = NextBatch(jump_frame);
if (jump_frame)
continue;
auto old_size = points.size();
if (!next_batch.empty()) {
auto timestamp = next_batch[0].timestamp;
if (timestamp < min_timestamp)
min_timestamp = timestamp;
if (timestamp > max_timestamp)
max_timestamp = timestamp;
}
points.resize(old_size + next_batch.size());
std::copy(next_batch.begin(), next_batch.end(), points.begin() + old_size);
}
for (auto &point: points)
point.alpha_timestamp = (point.timestamp - min_timestamp) / (max_timestamp - min_timestamp);
return points;
} The method To respond to the evaluation part of your question, I think we used But it would be much more convenient to integrate the ground truth for NCLT to this code base, |
Thanks for such a detailed response (and fast), highly appreciated. May I ask why you choose Thanks! |
Well, first I am not 100% sure that the batch exactly correspond to a velodyne packet, But this is the separation of the file into batches as described by the author in http://robots.engin.umich.edu/nclt/python/read_vel_hits.py 220 is the number we found convenient to have almost a full revolution of the sensor |
Ok, thanks. By the way, I love this line: if not verify_magic(magic):
print "Could not verify magic" |
Hi, I commited major changes on both branches Now you should be able to run
(You should either create a symbolic link to .nclt root dataset, or change the parameter in the config), I haven't had a chance to run the full sequence, so don't hesitate to tell me if there are some problems / failures. I should say, that there is quite a bit of difference with the code from the article (from the release |
Hum, that is strange, the build manages to work cleanly with github actions (https://github.com/jedeschaud/ct_icp/runs/7555918389?check_suite_focus=true), I created an issue for this #32 Can you provide on the issue your initial problem ? (first amongst the list ?) |
I just ran NCLT with the config |
After running for hours the pipeline did finish, but I can't see any metric, or any trajectory. /* ------------------------------------------------------------------------ */
REGISTRATION OF FRAME number 42759 (Fid:42759) with CERES solver
Number of points in sub-sampled frame: 638
Initial ego-motion distance: 0.00479226
Trajectory correction [begin(t) - end(t-1)]: 0
Final ego-motion distance: 0.0128866
Elapsed Time: 189.805 (ms)
Inserting points in the Map: Skipped Frames [0 / 5] Total Insertions: 40903
Cumulative Orientation: 0.253408°
Cumulative Distance: 0.0210918m
Ego Orientation: 0.860687°
[CT-ICP] Logged Values:
-- icp_duration_neighborhood: 53.51
-- icp_duration_solve: 127.073
-- icp_num_iters: 20
-- icp_total_duration: 187.021
-- odometry_duration_sampling: 0.28555
-- odometry_initialization: 0.339338
-- odometry_initialization(ms): 2.11022
-- odometry_map_update(ms): 8.70454
-- odometry_num_keypoints: 527
-- odometry_total: 200.214
-- odometry_total_duration(ms): 189.805
-- odometry_transform(ms): 1.36332
-- odometry_try_register: 187.668
Saving Trajectory to /home/ivizzo/dev/slam/ct_icp/install/CT_ICP/bin/.outputs/2022-07-29_16:10:21/NCLT_2012-01-08.PLY The trajectory can't be opened with standard tools. How can I run the system? |
Well I am pretty sure that this means it worked ! The trajectory is outputted as a PLY file, which can be seen in cloud compare (see the last line) It's a pretty long sequence more than 40 000 frames, so in real time it should be more than an hour long acquisition any way, but because it is a challenging sequence, we set conservative parameters (which yield better result at the cost of running slower), but if you want I can try and find parameters to run it faster. The runtime on your PC seems slower than on mine, but again the set of parameters was chosen for precision not online processing as mentioned in the paper. To compute the metrics, you can use the library with a ground truth CSV file provided by the dataset. Either make sure that the ground truth poses is located on disk at the right sport and rerun the slam, Or you can look at SlamCore/io.h and SlamCore/eval.h to compute metrics on your own c++ main script (using the library SlamCore you just installed) |
Note, again that if you want to have a direct feedback on the Slam, you can either use ROS or the visualization (WITH_VIZ3D) (our own ugly little gui) |
Thanks again for the reply. I still can't run the system and get the poses file :( I20220730 09:53:47.427917 1915860 dataset.cpp:1089] Could not load ground truth for sequence 2012-01-08. Expected at location "/home/ivizzo/data/NCLT/2012-01-08_vel/groundtruth_2012-01-08$ .csv" But the file it is there $ cat /home/ivizzo/data/NCLT/2012-01-08_vel/groundtruth_2012-01-08.csv | wc -l
835469 |
Ho, my bad, it should be located at
The error message is confusing, I'll fix it, Also, in the This will make the output of the console more readable (you should in particular, have regularly the computation of the metrics performed) What confuses me, is the filename filename = "groundtruth_" + sequence_info.sequence_name + ".csv"; |
Hi, thanks for all the support. I can run the dataset, but I still need more help from your side :) Is there any way to use the "normal" velodyne data. As far as I read on the NCLT paper that data is "motion-compensated" although they say later that due to the max 1 m/s speed of the segway there is no motion distortion.... I would like to have the ground truth poses that matches your pose estimates, which indeed double the number of scans in the Apparently, you are interpolating the estimated poses to match the amount of poses available in the ground truth... I'm still confused about this particular evaluation. To summarize: Velodyne dataIs there any way to run CT-ICP on the original data? without using this gigantic GT posesIs there any way to obtain a I'm trying to evaluate the results (which looks amazing, by the way) with some scripts that can not accept different size in the amount of gt poses. Other baselines I'm running can process the "normal" velodyne point clouds, and I'm actually trying to replicate the same way you load data here Basically, I would like to have a gt_poses.txt with Thanks a lot! |
Original Velodyne DataI wouldn't use the Now there is indeed a way, to run the SLAM on the Also, when running with sync folder, you should not use the Continuous Time aspect of CT-ICP, but rather the standard rigid transform (see Then you can write a script very similar to GT PosesIn this library, if you wan to interpolate the poses at the timestamps of the frames,
std::vector<slam::Pose> ReadNCLTPoses(const std::string &file_path);
std::vector<double> timestamps; #< The timestamps you want to sample
# ... Select the timestamps to sample, for example by reading all frames from the NCLT Dataset Iterator (and selecting min / max timestamp for each frame)
# Or using the poses saved by the SLAM as PLY files which should contain timestamps for each pose
auto nclt_poses = ct_icp::ReadNCLTPoses(nclt_poses_file);
auto linear_trajectory = slam::LinearContinuousTrajectory::Create(std::move(nclt_poses));
std::vector<slam::Pose> poses_sampled;
for(double t : timestamps)
poses_sampled.push_back(linear_trajectory.InterpolatePose(t)); |
Hello @jedeschaud, sorry to disturb you.
We are trying to reproduce the results for ct-icp on the NCLT dataset, and we couldn't succeed so far. How can I get this number?
Checking the implementation, and using the original
velodyne_hits.bin
file, I also see that you are processing42764
in total, where thevelodyne_sync
folder contains only28127
scans. How did you guys evaluate the results of the system?Moreover, which ground truth poses were used to carry on the evaluation? According to the implementation,
ct_icp/src/ct_icp/dataset.cpp
Line 151 in 1ba7ce7
Thanks a lot in advance
The text was updated successfully, but these errors were encountered: