Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Clock publisher works in dedeciated thread #253

Merged
merged 6 commits into from
Jan 31, 2024

Conversation

szylis
Copy link
Contributor

@szylis szylis commented Jan 24, 2024

Clock publisher that works in a dedicated thread and it is time scale independent.

Time scale independent means:

  • clock always publishes at the required frequency regardless of the the timescale value,
  • time difference in messages timestamp is impacted by the time scale value.

The PR includes:

  • clock publisher that start new Clock Thread and use this thread to publish time messages,
  • time source DotNetSystemTimeSource.cs - thread-safe class for reading the .NET system time,
  • TimeScaleProvider - class that provides and synchronizes timescale value between clock and main threads.

This PR also adds a TimeSourceSelector object to the main AWSIM scene, in order to select correct TimeSource to be used by the SimulatorROS2Node

@szylis szylis marked this pull request as ready for review January 26, 2024 16:37
@mackierx111 mackierx111 self-requested a review January 31, 2024 01:25
Copy link
Collaborator

@mackierx111 mackierx111 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@mackierx111 mackierx111 merged commit 2f8be74 into main Jan 31, 2024
1 of 2 checks passed
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.

2 participants