Repository navigation
feat: one clock for the robot and the offset to NETRA's - #24
Merged
Merged
Conversation
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.
Timestamps differed between Pashupati and NETRA, and inside the robot between the LiDAR and the rest of the stack. This PR puts every stamp on one clock and measures what is left.
On the robot (
scripts/timesync.sh, from Dharma's template, DarmawanRobotics/Dharma#8)scripts/setup.sh install timesync: chrony makes the system clock followTIME_SERVERS(e.g. NETRA's host; empty: Ubuntu's pool) and serves the robot's other computers inTIME_ALLOW.scripts/setup.sh install ptp:ptp4las PTP master on the LiDAR's interface (the route toLIVOX_IP, orPTP_IFACE), so the Mid-360 stamps its points with the same clock.checkshows the offset and whether the PTP master runs.clock.enabledinstack.yaml, off insim.yaml).pashupati.env.exampleand the tuning guide list the new settings; the PDF is rebuilt.Robot ↔ NETRA
time_sync{t0} afterhelloand everyclock_sync_period_sec(10 s). NETRA answers {t0, t1, t2}, and the robot computes the offset NTP style (the shortest round trip of the last 8 answers wins).telemetry.clock{offset_ms, rtt_ms, age_sec}, with a warning aboveclock_warn_ms(200 ms).time_syncyet keeps working (clockstays null). API.md, section "Clocks", is what netra-fleet-be needs to implement.time_sync(--clock-offsetsimulates a server clock that differs).Tests
telemetry.clock.offset_ms≈ 2500.Generated by Claude Code