Skip to content

Add LIO-SAM as an odometry strategy - #1684

Merged
matlabbe merged 6 commits into
introlab:masterfrom
abhi2198:master
Apr 13, 2026
Merged

matlabbe merged 6 commits into
introlab:masterfrom
abhi2198:master

Conversation

@abhi2198

@abhi2198 abhi2198 commented Apr 6, 2026 •

Copy link
Copy Markdown
Contributor

Summary:

  1. Add LIO-SAM as a new odometry strategy (Odom/Strategy 14) that uses the lio_sam_core library for lidar-inertial odometry, with loop closure disabled (deferred to rtabmap)
  2. Introduce kXYZIRT LaserScan format (x,y,z,intensity,ring,time) so per-point ring and time fields survive the scan pipeline end-to-end
  3. Extend deskewing to support kXYZIRT, preserving ring data through the correction

Details

Build system (CMakeLists.txt, Version.h.in, corelib/src/CMakeLists.txt)

  • WITH_LIOSAM option gated behind find_package(lio_sam)
  • Links lio_sam_core library; defines RTABMAP_LIOSAM when found
  • Status message at configure time

New odometry backend

  • OdometryLIOSAM.h / OdometryLIOSAM.cpp — wraps lio_sam::LioSamCore
  • Accepts async IMU via canProcessAsyncIMU(), feeds addImu() on
    every IMU sample
  • Requires kXYZIRT scans; splits them into the three parallel buffers
    (PointXYZI + ring vector + time vector) that LIO-SAM expects
  • Force-disables base-class deskewing since LIO-SAM handles it internally
  • Returns incremental transform in base frame, with configurable
    linear/angular output variance
  • Exposes LIO-SAM parameters (OdomLIOSAM/*) for sensor type, scan
    geometry, IMU noise, and feature thresholds

Registration in odometry factory

  • Odometry.h: kTypeLIOSAM = 14
  • Odometry.cpp: factory create() case
  • Parameters.h / Parameters.cpp: strategy description updated,
    OdomLIOSAM/* params declared, --info output added

New scan format kXYZIRT

  • LaserScan.h / LaserScan.cpp: enum value 12, 6-channel, with
    hasRing() / getRingOffset() / isScanHasRing() accessors;
    getTimeOffset() corrected for per-format channel layout; validation
    assertions updated
  • util3d.h: PointXYZIRT PCL struct + POINT_CLOUD_REGISTER_POINT_STRUCT
  • util3d.cpp: laserScanFromPointCloud(PointXYZIRT) overloads,
    laserScanToPointCloud2 routing for kXYZIRT

Deskewing

  • deskew() format check relaxed from == kXYZIT to hasTime()
  • Ring channel preserved through deskew when present; time zeroed
    post-correction
  • Existing kXYZIT path unchanged

…ration

Introduce PointXYZIRT point type and kXYZIRT LaserScan format (x,y,z,
intensity,ring,time) so that ring indices survive the scan pipeline.
Update OdometryLIOSAM to require kXYZIRT and properly split ring/time
into the parallel buffers LIO-SAM expects. Extend deskewing to preserve
ring data and disable base-class deskew in OdometryLIOSAM since LIO-SAM
handles it internally.
Comment thread corelib/src/odometry/OdometryLIOSAM.cpp Resolved
Comment thread corelib/src/odometry/OdometryLIOSAM.cpp Resolved
@matlabbe

matlabbe commented Apr 6, 2026

Copy link
Copy Markdown
Member

Thank you for this PR! Overall it looks good! I've already put some comments. I'll be pretty busy this week on a field test trip but I can make the suggested changes next weekend/week if you don't have time to do it this week.

abhi2198 and others added 2 commits April 8, 2026 23:29
- Add OdomLIOSAM/ConfigPath parameter to load LIO-SAM settings from a
  YAML file. When set, individual params are ignored. Extrinsics from
  sensor local transforms always override config file values.
- Defer LioSamCore initialization until both IMU and lidar local
  transforms are available, computing T_lidar_imu from sensor data.
  IMU samples are buffered and replayed after init.
- Fix deferred init for scan-only messages that arrive after IMU
  local transform is already cached.
- Add LIO-SAM entry to odometry strategy combo box (index 14) with
  full PreferencesDialog panel including config path browse button
  and all parameter widgets.
@abhi2198

abhi2198 commented Apr 9, 2026 •

Copy link
Copy Markdown
Contributor Author

@matlabbe I have addressed all the PR comments. I have updated the Lio_sam fork with a paramserver as well. Let me know if I missed anything. Liosam refactored repo - https://github.com/abhi2198/liosam_library

Comment thread corelib/src/odometry/OdometryLIOSAM.cpp Resolved
@matlabbe

matlabbe commented Apr 11, 2026 •

Copy link
Copy Markdown
Member

@matlabbe I have addressed all the PR comments. I have updated the Lio_sam fork with a paramserver as well. Let me know if I missed anything. Liosam refactored repo - https://github.com/abhi2198/liosam_library

Thanks, looks great! I added one last comment

Capture the deskewed cloud produced by LIO-SAM's image projection
stage and replace the raw scan on SensorData with it, so loop closure
registration and other downstream stages operate on the motion-
compensated points instead of the raw pre-deskew input.
@abhi2198

Copy link
Copy Markdown
Contributor Author

@matlabbe addressed your comment.

@matlabbe

Copy link
Copy Markdown
Member

@matlabbe addressed your comment.

Perfect, thank you!

@abhi2198

Copy link
Copy Markdown
Contributor Author

@matlabbe addressed your comment.

Perfect, thank you!

Can we get this merged ?

@matlabbe

matlabbe commented Apr 12, 2026 •

Copy link
Copy Markdown
Member

I am trying the PR with one of the LIO-SAM datasets using the launch file in this new example: introlab/rtabmap_ros#1415

$ roslaunch rtabmap_examples liosam_datasets.launch liosam:=true
$ rosbag play --clock  campus_large_dataset.bag

It seems LIO-SAM is not able to initialize:

[ INFO] (2026-04-12 23:45:25.207) OdometryLIOSAM.cpp:114::init() No LIO-SAM config file provided, using rtabmap parameters
[ INFO] (2026-04-12 23:45:25.207) OdometryLIOSAM.cpp:206::init() LIO-SAM extrinsics (T_lidar_imu) computed from sensor local transforms: xyz=0.000000,0.000000,0.000000 rpy=0.000000,-0.000000,0.000000
[WARN] [1776037525.207350231, 1572807422.272497852]:  in allocate mem
[ INFO] (2026-04-12 23:45:25.209) OdometryLIOSAM.cpp:231::init() Replaying 69 buffered IMU samples into LIO-SAM
[DEBUG] (2026-04-12 23:45:25.209) OdometryLIOSAM.cpp:389::computeTransform() Scan split: 0.002250s, points=22883
[DEBUG] (2026-04-12 23:45:25.210) OdometryLIOSAM.cpp:399::computeTransform() LIO-SAM process: 0.000553s
[DEBUG] (2026-04-12 23:45:25.210) OdometryLIOSAM.cpp:467::computeTransform() LIO-SAM processScan returned false (may be initializing)
[ INFO] (2026-04-12 23:45:25.210) OdometryLIOSAM.cpp:470::computeTransform() LIO-SAM odom update time = 0.002852s, lost=false

It keeps saying "LIO-SAM processScan returned false (may be initializing)". I checked the ring and time channels, printed them just before calling liosam and they look fine. Is there a way inside lio-sam code to print more debug logs?

Did you test it with a dataset (if so, which one?) or with a real sensor?

@abhi2198

Copy link
Copy Markdown
Contributor Author

I am trying the PR with one of the LIO-SAM datasets using the launch file in this new example: introlab/rtabmap_ros#1415

$ roslaunch rtabmap_examples liosam_datasets.launch liosam:=true
$ rosbag play --clock  campus_large_dataset.bag

It seems LIO-SAM is not able to initialize:

[ INFO] (2026-04-12 23:45:25.207) OdometryLIOSAM.cpp:114::init() No LIO-SAM config file provided, using rtabmap parameters
[ INFO] (2026-04-12 23:45:25.207) OdometryLIOSAM.cpp:206::init() LIO-SAM extrinsics (T_lidar_imu) computed from sensor local transforms: xyz=0.000000,0.000000,0.000000 rpy=0.000000,-0.000000,0.000000
[WARN] [1776037525.207350231, 1572807422.272497852]:  in allocate mem
[ INFO] (2026-04-12 23:45:25.209) OdometryLIOSAM.cpp:231::init() Replaying 69 buffered IMU samples into LIO-SAM
[DEBUG] (2026-04-12 23:45:25.209) OdometryLIOSAM.cpp:389::computeTransform() Scan split: 0.002250s, points=22883
[DEBUG] (2026-04-12 23:45:25.210) OdometryLIOSAM.cpp:399::computeTransform() LIO-SAM process: 0.000553s
[DEBUG] (2026-04-12 23:45:25.210) OdometryLIOSAM.cpp:467::computeTransform() LIO-SAM processScan returned false (may be initializing)
[ INFO] (2026-04-12 23:45:25.210) OdometryLIOSAM.cpp:470::computeTransform() LIO-SAM odom update time = 0.002852s, lost=false

It keeps saying "LIO-SAM processScan returned false (may be initializing)". I checked the ring and time channels, printed them just before calling liosam and they look fine. Is there a way inside lio-sam code to print more debug logs?

Did you test it with a dataset (if so, which one?) or with a real sensor?

I did test it with the campus small dataset with a custom test script. I can take a look at this later today. But of the top of my mind could you maybe try setting the config file path?

@matlabbe

Copy link
Copy Markdown
Member

I added some debug logs, I think the problem is from how icp_odometry node buffers and feeds IMU data to liosam internally. It holds the point cloud until it receives IMU with stamp greater than scan stamp (in header, not header.stamp+max time in scan data), then it sends all imu topics and the laser scan afterwards. However, in liosam, the deskewing expects imu topics from laser scan stamp to 100 ms in the future.

[ INFO] (2026-04-13 00:08:01.354) OdometryLIOSAM.cpp:471::computeTransform() LIO-SAM odom update time = 0.000384s, lost=false
[INFO] [1776038881.355409658, 1572807438.391450849]: Odom: ratio=0.000000, std dev=0.000000m|0.000000rad, update time=0.000821s, delay=0.101847s
[WARN] [1776038881.355711506, 1572807438.391450849]: Reseting point cloud assembler as null odometry has been received.
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.291478
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.292468
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.296480
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.297467
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.298467
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.302483
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.303539
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.304530
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.308551
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.309536
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.310536
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.314548
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.315483
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.316535
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.320549
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.321536
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.322533
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.326555
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.327482
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.328460
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.332553
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.333538
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.334540
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.338568
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.339483
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.340539
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.344563
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.351523
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.352476
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.353548
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.354538
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.355540
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.356555
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.357533
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.358484
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.362557
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.363537
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.364529
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.368551
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.369541
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.370543
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.374554
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.375483
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.376531
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.380546
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.381539
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.382540
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.386550
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.387547
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.388553
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.392558
[DEBUG] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:390::computeTransform() Scan split: 0.000169s, points=22321
[WARN] [1776038881.465884658, 1572807438.502177501]: Waiting for IMU data ...
[WARN] [1776038881.465904308, 1572807438.502177501]: processScanDirect: deskewInfo failed, skipping scan
[WARN] [1776038881.465943006, 1572807438.502177501]: failed projOk! projOk=0 extractedCloud=0 size=0 stamp=1572807438.390632 next=1572807438.490632 cloudIRT=22321
[DEBUG] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:400::computeTransform() LIO-SAM process: 0.000194s
[DEBUG] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:468::computeTransform() LIO-SAM processScan returned false (may be initializing)
[ INFO] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:471::computeTransform() LIO-SAM odom update time = 0.000373s, lost=false
[INFO] [1776038881.466399807, 1572807438.502177501]: Odom: ratio=0.000000, std dev=0.000000m|0.000000rad, update time=0.000803s, delay=0.111545s

In this dataset, the PointCloud2's header is the stamp of the starting rotation of the sensor, with the time channel varying from 0.0 to 0.100562 s. So the bug would be on icp_odometry side. I hard-coded a +100 ms to confirm this, and it seems to work now. I'll merge this PR and refactor icp_odometry node afterwards (doing something similar to what MsgConversion::deskew_impl() node is doing).

@matlabbe
matlabbe merged commit a9f63bd into introlab:master Apr 13, 2026
9 checks passed
@abhi2198

Copy link
Copy Markdown
Contributor Author

I added some debug logs, I think the problem is from how icp_odometry node buffers and feeds IMU data to liosam internally. It holds the point cloud until it receives IMU with stamp greater than scan stamp (in header, not header.stamp+max time in scan data), then it sends all imu topics and the laser scan afterwards. However, in liosam, the deskewing expects imu topics from laser scan stamp to 100 ms in the future.

[ INFO] (2026-04-13 00:08:01.354) OdometryLIOSAM.cpp:471::computeTransform() LIO-SAM odom update time = 0.000384s, lost=false
[INFO] [1776038881.355409658, 1572807438.391450849]: Odom: ratio=0.000000, std dev=0.000000m|0.000000rad, update time=0.000821s, delay=0.101847s
[WARN] [1776038881.355711506, 1572807438.391450849]: Reseting point cloud assembler as null odometry has been received.
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.291478
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.292468
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.296480
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.297467
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.298467
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.302483
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.303539
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.304530
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.308551
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.309536
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.310536
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.314548
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.315483
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.316535
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.320549
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.321536
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.322533
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.326555
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.327482
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.328460
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.332553
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.333538
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.334540
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.338568
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.339483
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.340539
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.344563
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.351523
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.352476
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.353548
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.354538
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.355540
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.356555
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.357533
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.358484
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.362557
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.363537
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.364529
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.368551
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.369541
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.370543
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.374554
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.375483
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.376531
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.380546
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.381539
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.382540
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.386550
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.387547
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.388553
[ WARN] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:309::computeTransform() ADD imu 1572807438.392558
[DEBUG] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:390::computeTransform() Scan split: 0.000169s, points=22321
[WARN] [1776038881.465884658, 1572807438.502177501]: Waiting for IMU data ...
[WARN] [1776038881.465904308, 1572807438.502177501]: processScanDirect: deskewInfo failed, skipping scan
[WARN] [1776038881.465943006, 1572807438.502177501]: failed projOk! projOk=0 extractedCloud=0 size=0 stamp=1572807438.390632 next=1572807438.490632 cloudIRT=22321
[DEBUG] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:400::computeTransform() LIO-SAM process: 0.000194s
[DEBUG] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:468::computeTransform() LIO-SAM processScan returned false (may be initializing)
[ INFO] (2026-04-13 00:08:01.465) OdometryLIOSAM.cpp:471::computeTransform() LIO-SAM odom update time = 0.000373s, lost=false
[INFO] [1776038881.466399807, 1572807438.502177501]: Odom: ratio=0.000000, std dev=0.000000m|0.000000rad, update time=0.000803s, delay=0.111545s

In this dataset, the PointCloud2's header is the stamp of the starting rotation of the sensor, with the time channel varying from 0.0 to 0.100562 s. So the bug would be on icp_odometry side. I hard-coded a +100 ms to confirm this, and it seems to work now. I'll merge this PR and refactor icp_odometry node afterwards (doing something similar to what MsgConversion::deskew_impl() node is doing).

Thank you for getting this merged!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants