Repository navigation
Feat/fastdem map timestamp - #1
Merged
Merged
Conversation
There was a problem hiding this comment.
Copilot review overview
🟡 Changes recommended
The central timestamp propagation and rejected-scan behavior need regression tests.
Review effort: Balanced
Findings: 1
What changed in this PR
Updates FastDEM maps to inherit the timestamp of the latest successfully integrated scan.
Changes:
- Sets the map timestamp after mapping and optional post-processing.
- Preserves the timestamp when preprocessing rejects a scan.
| File | Description |
|---|---|
fastdem/src/fastdem.cpp |
Propagates the integrated cloud timestamp to the map. |
💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.
|
|
||
| // Stamp the completed map with the latest scan that updated it. ROS outputs | ||
| // derived from the map, including ~/drop/cloud, use this timestamp. | ||
| map_.setTimestamp(cloud.timestamp()); |
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.

Why
FastDEM accumulates scan data in an elevation map. ROS messages derived from that map, including
~/drop/cloud, use the map timestamp in their message header.integrateImplused the input cloud timestamp to look up the robot pose, but did not copy that timestamp to the map. As a result, the map could retain its initial timestamp of zero, and map-derived messages could also be published with a zero timestamp. Consumers using TF could then interpret the message using the latest available transform instead of the transform for the scan that updated the map.What changed
After a scan has been integrated and the optional raycasting and drop detection have completed, set the map timestamp from the input cloud:
map_.setTimestamp(cloud.timestamp());Empty preprocessed scans still return without changing the map timestamp.
Result
Map-derived ROS messages are stamped with the time of the latest scan that updated the map.