Skip to content

Conversation

@berndgassmann
Copy link
Contributor

@berndgassmann berndgassmann commented Nov 21, 2025

Description

This is one of the second steps of the ROS2 extension series.
This one requires #9431 to be merged; until then it's listed as a draft.

Introduced a fine grained ServerSynchronization mechanism, where each
synchonization participant is treated independently and interacts
with the synchronization of the carla-server individually. If a client
is disconnected (or dies) the synchronization state of all participants
registered via that client are dropped, i.e. the server will continue
running in case the participants of that client were the only ones
demanding synchronous mode.

The synchronization interface provides means of a time window, up to
which the server is allowed to run. Like this, every client can prevent
the carla-server to run too fast depending on their individual speed.
There is no sync-master anymore. Every client decides for its own if
it requires synchronization or not.

Drawback of this change: some existing code might have to be changed
(see removal of synchronous_master in generate_traffic.py).

Where has this been tested?

  • Platform(s): ...
  • Python version(s): ...
  • Unreal Engine version(s): ...

Possible Drawbacks


This change is Reviewable

@MarcelPiNacy-CVC MarcelPiNacy-CVC self-assigned this Nov 26, 2025
@berndgassmann berndgassmann force-pushed the mai/ue4-extend-ros2-step2-synchronization branch from 4ee3dc7 to 3b4177a Compare November 27, 2025 15:07
@berndgassmann berndgassmann marked this pull request as ready for review November 28, 2025 12:52
@berndgassmann berndgassmann requested a review from a team as a code owner November 28, 2025 12:52
Introduced a fine grained ServerSynchronization mechanism, where each
synchonization participant is treated independently and interacts
with the synchronization of the carla-server individually. If a client
is disconnected (or dies) the synchronization state of all participants
registered via that client are dropped, i.e. the server will continue
running in case the participants of that client were the only ones
demanding synchronous mode.

The synchronization interface provides means of a time window, up to
which the server is allowed to run. Like this, every client can prevent
the carla-server to run too fast depending on their individual speed.
There is no sync-master anymore. Every client decides for its own if
it requires synchronization or not.

Drawback of this change: some existing code might have to be changed
(see removal of synchronous_master in generate_traffic.py).
@berndgassmann berndgassmann force-pushed the mai/ue4-extend-ros2-step2-synchronization branch from 93fc3c9 to db05b30 Compare November 29, 2025 23:19
Update RPC lib version for windows build

Ensure tick calls are ignored if sync mode is not active.
And prevent client changes of fixed_delta_seconds triggering warning
message.
@berndgassmann berndgassmann force-pushed the mai/ue4-extend-ros2-step2-synchronization branch from db05b30 to 3f80b69 Compare November 29, 2025 23:23
@berndgassmann
Copy link
Contributor Author

Rebased, fixed windows build and smoke test runs.

on non synchronous mode
@berndgassmann
Copy link
Contributor Author

Sorry, forgot to rebuild of PythonAPI after changing the client code and overlooked that the client has at least to wait for the next tick in non-sync-mode to receive the updated settings value...
Now it actually should work.

@MarcelPiNacy-CVC MarcelPiNacy-CVC merged commit aa9c92b into carla-simulator:ue4-dev Dec 2, 2025
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