Skip to content

Commit

Permalink
mulran dataset: generate per-point RING id
Browse files Browse the repository at this point in the history
  • Loading branch information
jlblancoc committed Feb 3, 2024
1 parent cb12be7 commit 084ac8d
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions mola_input_mulran_dataset/src/MulranDataset.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -358,17 +358,18 @@ void MulranDataset::load_lidar(timestep_t step) const

const size_t nPts = pts->size();
ASSERT_EQUAL_(nPts, 1024 * 64);
pts->resize_XYZIRT(nPts, true /*i*/, false /*R*/, true /*t*/);
pts->resize_XYZIRT(nPts, true /*i*/, true /*R*/, true /*t*/);

// Fixed to 10 Hz rotation in this dataset:
const double sweepDuration = 0.1; // [s]
const double At = -0.5 * sweepDuration;

for (size_t i = 0; i < nPts; i++)
{
// const int row = i % 64;
const int row = i % 64;
const int col = i / 64;
pts->setPointTime(i, At + sweepDuration * col / 1024.0);
pts->setPointRing(i, row);
}

// Pose:
Expand Down

0 comments on commit 084ac8d

Please sign in to comment.