Repository navigation
Step 1: stationary segments, merge or skip map update - #688
Merged
Merged
Conversation
Optional (merge_stationary_segments, off by default). Step 1 finds the stretches at rest from the accelerometer (VQF's rest detection fed a zero gyroscope: the Mandeye gyro bias of 3-4 deg/s is over VQF's 2 deg/s bias clip, so with the gyroscope VQF never detects rest). The whole chunks of a stretch of at least stationary_min_duration (10 s) become one node: - every pose of the node is one pose: the last optimized pose before it - no prediction and no LIO optimization; its points enter the map once - consistency holds its poses fixed - it is a scan_lio_N of its own, so steps 2 and 3 move it as one rigid body - stationary_segments.json in the step 1 output lists the segments The rest detection moves from mandeye_raw_data_viewer into core/imu_rest_detection (ImuRestDetector), shared by both tools; the raw viewer's motionless segments are now from the accelerometer alone too. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
merge_stationary_segments becomes stationary_mode, a three-way setting: - off: no rest detection (default) - merge: as before, one node with one fixed pose per stop - skip_map_update: odometry runs on the stop as usual, but its points stay out of the map and of points_global stationary_segments.json records the mode, and each segment now has handled and scan_indices instead of merged and scan_index. The GUI has a Parameters -> Stationary segments submenu and a combo box in the panel. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Contributor
Author
michalpelka
marked this pull request as ready for review
December 5, 2026 01:25
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

What
A new option for
lidar_odometry_step_1: what to do when the device stands still.stationary_modeisoffby default, and the two other values are:merge: LIO stops adding nodes. The whole standstill becomes one node with one fixed pose.skip_map_update: LIO runs as usual on the standstill, but its points stay out of the odometry map.compute_step_1, both modes). The stretches at rest come from the accelerometer, using VQF's rest detection with a zero gyroscope input. With the gyroscope, VQF never detects rest on Mandeye IMUs: their gyro bias of 3–4 °/s is over VQF's fixed 2 °/s bias clip.plan_nodes, both modes). A stretch at rest is handled if it lasts at leaststationary_min_duration(10 s) and at least two chunks lie entirely inside it. Chunks only partly at rest, at the edges of the stop, stay ordinary chunks.merge:scan_lio_Nof its own, so the step 2 and step 3 pose graphs and loop closures move the standstill as one rigid body. They need no code change.skip_map_update: the chunks stay ordinary chunks, with normal LIO and normal consistency. Their points go into neither the map norpoints_global, the buffer the map is rebuilt from at the sliding-window reset. Output scans are split as usual.The rest detection moves from
mandeye_raw_data_viewerintocore/(ImuRestDetectorinCore/imu_rest_detection.h) and is shared by both tools.Changes users will notice
offby default. It is in Parameters → Stationary segments in the main menu (Off / Merge / Skip map update), and in the parameter panel (non-simple GUI) as a combo box together with the thresholds. New TOML section:stationary_segments.jsonin the step 1 output, written only when the mode isn'toff. It holdsstationary_mode, the detector parameters and, for each segment:t_start,t_end,duration,handledandscan_indices(thescan_lio_Nthe stop ended up in: one withmerge, usually several withskip_map_update). The wiki's File Formats page needs an entry.merge, such motion during a "stop" is frozen out. Withskip_map_update, LIO still tracks it.Results unchanged with the option off
With
off, the chunking is exactly the old one (plan_nodeswith no segments) and no chunk is marked. No default changes. Locally,offon calibration-room/trial-1 gives 0.37 mm ATE against the Linux golden (limit 1 mm).Test
Two recordings, each run with all three modes. Linux, default parameters otherwise.
motionless_continousScanning_0143: handheld, 26 chunks, five stops: 8.6 s (start of the recording, under 10 s so not handled), 11.9 s, 48.1 s, 35.6 s and 22.0 s. No ground truth.trial-1/ground-truth/ground_truth.tum: same 76060 timestamps, compared after a rigid alignment with no scale.scan_liofilesmergefreezes the stops: inside each merged scan, every pose matches the scan's first pose to within 2e-12. On calibration room, it is slightly closer to the ground truth thanoff.merge): in the first second after each stop, the pose-to-pose steps are the same as withoff, to within 0.6 mm. The large steps there are the real start of motion.skip_map_updatechanges almost nothing with the default parameters, because the existing code already skips map updates at rest. Withablation_study_use_hierarchical_rgd = true(the default),process_worker_step_update_rgd_afteralready skips the map update when the chunk moved less than half an indoor bucket since the last update. What this mode adds is keeping the stop out ofpoints_global, which matters only at the sliding-window rebuild (200 m by default). On motionless, the trajectory is identical tooff. On calibration room, it differs from pose 52161 on, after the rebuild: 0.33 mm on average, 11 mm at most.merge: without merging, the chunks move around slightly while the device stands still, and that jitter counts as distance.ImuRestDetector,plan_nodes(with and without merging) andparse_stationary_mode.Speed over time, per mode
Speed over 0.1 s steps, one panel per mode. Grey: stops that were handled. Hatched: stops under 10 s, not handled.
offandskip_map_updatecreep at 1.9 cm/s on average (8.4 cm/s at most). That adds up to 2.16 m of travel that never happened, nearly all of the 2.4 m difference in trajectory length. Withmerge, the speed is exactly 0 for each stop.offandskip_map_update"move" at about 0.1 m/s, andmergeholds still.Plot script: https://gist.github.com/michalpelka/399e226fadf5d6e1510e4bb1acaff64d (
python3 plot_velocity.py <out.png> <title> <label>=<step1_output_dir> ..., one panel per run; it readssession_poses.mrp,trajectory_lio_N.csvandstationary_segments.json).Pros and cons of each mode
off(default)mergescan_lio_N, so the step 2 and step 3 loop closures cannot deform it.offto within 0.6 mm.skip_map_updateoff).ablation_study_use_hierarchical_rgdis off.off), there is no speedup, and output scans are split as usual, so steps 2 and 3 can still deform a stop.Not yet tested: the consistency pass with a mode on (GUI only), a Windows build, and a long stop with
merge. During such a stop, all of its points are held in memory at once.🤖 Generated with Claude Code