Skip to content

#524 JumpTimeCallbacks#629

Draft
balthasarschuess wants to merge 2 commits intoros2-rust:mainfrom
logivations:v0.7.0-jump-time-callbacks
Draft

#524 JumpTimeCallbacks#629
balthasarschuess wants to merge 2 commits intoros2-rust:mainfrom
logivations:v0.7.0-jump-time-callbacks

Conversation

@balthasarschuess
Copy link
Copy Markdown
Contributor

@balthasarschuess balthasarschuess commented Apr 17, 2026

Here is my draft for the time jump callbacks feature.
#524

The way it works right now is:

  • we register a callback on the clock
  • the on change callback is scheduled through the commands interface of either the node or worker
  • the callback parameter is typed based on the chosen jump callback condition, it is assumed, that we don't receive invalid callback payload from rcl.
  • for worker jump callbacks the payload is additionally given
  • we only handle jump callbacks after the clock change (read more in Feature request: Clock Jump Callbacks #524 about why we might want to support pre-jump callbacks)

TODO:

  • write some unit tests
  • find a concept for clock.sleep_for clock.sleep_until + use_simulation_time

Regarding the /clock subscription with use_sim_time in the time_source module:

I was also wondering if we should even schedule clock change callbacks in the executor.
As I am unsure whether the WaitSet/WaitSetRunner has stable message ordering / guarantees, that we won't process an old message, after the clock time changed.
It would be awkward to spin subscription messages from the earlier simulation time, after state was cleared on time jump.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant