fix: dimos map global and dimos map replay to use tf#2690
Draft
jeff-hykin wants to merge 22 commits into
Draft
Conversation
…ved, in-cloud ts aligned to recording time
Drive PointCloud/Odometry world-registration off each message's frame_id instead of a baked-in per-observation pose. World-frame messages render directly; non-world frames are looked up in the recording's `tf` stream via a read-only DbTf (no loop closure) and skipped with a warning if unplaceable. DbTf uses an unbounded time tolerance so once-published static transforms (mounts, world<-map) latch across the whole recording, while densely sampled dynamic transforms still resolve to their nearest sample.
❌ 2 Tests Failed:
View the full list of 2 ❄️ flaky test(s)
To view more test analytics, go to the Test Analytics Dashboard |
…er loop) Regenerated pointlio_lidar + pointlio_odometry via pcap_to_db --rate 2.0 on china_office.pcap, timestamps re-anchored to the recording epoch and tf tree rebuilt (static mounts + odom->base_link). Reproduces the known-good __rate2 trajectory; 2x packs denser scans per Point-LIO wall-clock accumulation window than 1x, yielding a tighter loop closure.
Recordings can reference Python classes not present in the current checkout. summary/replay now warn and skip those streams instead of crashing; requesting an unresolvable stream by name still raises.
Remove the 4 ground-truth pointlio streams (all worse than the 1.5x replay), copy the six surf*/map* config runs' odometry from the grid sweep, and align every pointlio_odometry* stream (including the __rate* variants) to the canonical recording anchor so they overlay the tf tree and lidar.
pointlio_odometry, tf, and pointlio_lidar are pulled from the 1x regen (unfrozen odom, correctly-recorded 5-edge tf tree) and shifted onto the June-12 data clock so they align with the kept color_image / gtsam_odom / raw_april_tags streams. Intermediate checkpoint before PGO.
jnav_pgo added gt_pointlio_odometry, gt_pointlio_lidar, and the exotic-payload streams (gt_tf_deformation_nodes, pose_graph, tf_graph). The map/replay CLI registers clouds into the `world` frame, but the regen tf tree was rooted at `map`, so every lidar frame was dropped (empty global map). Inject a static `world <- map` identity transform so the full chain resolves. Validated: map summary/global/replay all succeed, global reconstructs 94/94 frames.
test_sqlite_summary_skips_unresolvable_types opens a SqliteStore, which loads the sqlite_vec extension. sqlite_vec has no working wheel on macOS or Linux ARM (the aarch64 runner loads a wrong-arch vec0.so → ELFCLASS32), so mark it with the same skipif_macos/skipif_aarch64 markers the other sqlite_vec tests use.
leshy
reviewed
Jul 2, 2026
| try: | ||
| stream: Stream[Any] = self.stream(name) | ||
| except (ImportError, AttributeError, ValueError) as error: | ||
| logger.warning(f"skipping stream {name!r}: unresolved payload type ({error})") |
Member
There was a problem hiding this comment.
why do we have unreslovable type in the database now?
Member
Author
There was a problem hiding this comment.
If people save custom types (ex: Graph3D on my gsc_pgo branch) it would be nice for the map to still load the db and ignore those unknown types
dimos map global and dimos map replay to use tf
Point-LIO runs with extrinsic_r=identity, so its odom->body pose (and the mid360_link-stamped clouds) are in the sensor's own frame. The recorded body->base_link identity edge made the tf chain apply the 44 degree mount pitch a second time, smearing `dimos map global` whenever the robot rotated. Rewrote body->base_link to (base_link->mid360_link)^-1 so the chain cancels: world<-mid360_link resolves to the sensor pose and base_link becomes the true trunk pose.
Point-LIO runs with identity extrinsics, so its odometry child IS the mid360 sensor frame. Name it honestly (odom->mid360_link) and hang the robot off it via a derived inverse-mount static (mid360_link->base_link), giving world->map->odom->mid360_link-> base_link->front_camera->camera_optical. Relabel china_office.db to match (pure renames, no pose changes).
SqliteStore.stream() silently registers a typo'd name as a new empty stream, so a wrong --lidar-stream/--odom-stream replayed zero frames with no error (only the static goal point rendered).
Drop the frame_id="world" override so recordings carry the same moving edge (odom -> mid360_link) as existing datasets; world/map identity edges are a localization concern, not the recorder's.
Publish identity world -> map -> odom edges from the static tf so a fresh recording matches existing datasets (world-rooted tree with pointlio's odom -> mid360_link as the moving edge).
The puck is mounted sideways: pitched down 44 deg AND rotated -90 deg about its own z. With pitch-only compensation base_link sat 61.7 deg off level (measured against gravity in the china_office recording); with the composed rotation it is level to ~4 deg.
- delete pose_graph, gtsam_odom, and the empty lidar stream - rename gt_tf_deformation_nodes -> tf_deformation_nodes - rename raw_april_tags -> april_tags_raw - replace april_tags with the denser april_tags_dense detections - stamp april_tags / april_tags_raw with frame_id=camera_optical so they resolve through the tf tree into world
Tag poses are placed into world via the recording's tf tree (frame_id lookup through WorldRegistrar), colored per marker_id, and drawn with a short pin and visible label.
…ix/map # Conflicts: # dimos/hardware/sensors/lidar/pointlio/module.py
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.
Vibed extraction of some of my existing map/db changes. Will check soon.
Examples
Rebuild the global map from a recording (registers clouds into
worldvia the recording's tf tree, renders april tags if anapril_tagsstream is present):Plan on the reconstructed map and write a planning .rrd: