Commit d4246d5
oomwoo_sim_support: fix initialpose_pub sim-clock race
self.start was captured in __init__, where get_clock().now() can read 0
under use_sim_time (no /clock yet). Every _elapsed() then returned the
absolute sim time, so when the node starts against an already-running sim
(elapsed > timeout_sec) it fired the fail-open and exited WITHOUT ever
seeding /initialpose -- AMCL never localized, no map->odom. Baseline
self.start on the first tick instead, once the clock is running. Verified:
elapsed now reads real seconds (localize at ~3s) instead of 44s/270s.
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 3638553 commit d4246d5
1 file changed
Lines changed: 9 additions & 1 deletion
Lines changed: 9 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
60 | 60 | | |
61 | 61 | | |
62 | 62 | | |
63 | | - | |
| 63 | + | |
| 64 | + | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
64 | 68 | | |
65 | 69 | | |
66 | 70 | | |
| |||
93 | 97 | | |
94 | 98 | | |
95 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
96 | 104 | | |
97 | 105 | | |
98 | 106 | | |
| |||
0 commit comments