Repository navigation
Add LIO-SAM as an odometry strategy - #1684
Conversation
…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.
|
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. |
- 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.
|
@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.
|
@matlabbe addressed your comment. |
Perfect, thank you! |
Can we get this merged ? |
|
I am trying the PR with one of the LIO-SAM datasets using the launch file in this new example: introlab/rtabmap_ros#1415 It seems LIO-SAM is not able to initialize: 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? |
|
I added some debug logs, I think the problem is from how In this dataset, the PointCloud2's header is the stamp of the starting rotation of the sensor, with the time channel varying from |
Thank you for getting this merged! |
Summary:
Odom/Strategy 14) that uses the lio_sam_core library for lidar-inertial odometry, with loop closure disabled (deferred to rtabmap)kXYZIRTLaserScan format (x,y,z,intensity,ring,time) so per-point ring and time fields survive the scan pipeline end-to-endkXYZIRT, preserving ring data through the correctionDetails
Build system (
CMakeLists.txt,Version.h.in,corelib/src/CMakeLists.txt)WITH_LIOSAMoption gated behindfind_package(lio_sam)lio_sam_corelibrary; definesRTABMAP_LIOSAMwhen foundNew odometry backend
OdometryLIOSAM.h/OdometryLIOSAM.cpp— wrapslio_sam::LioSamCorecanProcessAsyncIMU(), feedsaddImu()onevery IMU sample
kXYZIRTscans; splits them into the three parallel buffers(PointXYZI + ring vector + time vector) that LIO-SAM expects
linear/angular output variance
OdomLIOSAM/*) for sensor type, scangeometry, IMU noise, and feature thresholds
Registration in odometry factory
Odometry.h:kTypeLIOSAM = 14Odometry.cpp: factorycreate()caseParameters.h/Parameters.cpp: strategy description updated,OdomLIOSAM/*params declared,--infooutput addedNew scan format
kXYZIRTLaserScan.h/LaserScan.cpp: enum value 12, 6-channel, withhasRing()/getRingOffset()/isScanHasRing()accessors;getTimeOffset()corrected for per-format channel layout; validationassertions updated
util3d.h:PointXYZIRTPCL struct +POINT_CLOUD_REGISTER_POINT_STRUCTutil3d.cpp:laserScanFromPointCloud(PointXYZIRT)overloads,laserScanToPointCloud2routing forkXYZIRTDeskewing
deskew()format check relaxed from== kXYZITtohasTime()post-correction
kXYZITpath unchanged