You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Extend ROS2 support Step 2: Fine grained ServerSynchronization (#9450)
* Extend ROS2 support Step 2: Fine grained ServerSynchronization
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).
* Fix Windows build and smoke tests
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.
* Client needs to wait for next tick
on non synchronous mode
Copy file name to clipboardExpand all lines: CHANGELOG.md
+2Lines changed: 2 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -8,6 +8,8 @@
8
8
* Fixed geom::Rotation::RotateVector() rotation directions of pitch and roll
9
9
* Prepare server for multistream support and ROS2 client calls
10
10
* Improved V2X sensor capabilities: send complex custom user-defined data, support V2I sensors not attached to a vehicle
11
+
* Introduced fine grained ServerSynchronization mechanism: each client decides for its own if it requires synchronization or not and provides its own synchronization window.
12
+
Be aware: some existing code using master/slave sync mechanism might need rework. See also generate_traffic.py.
Copy file name to clipboardExpand all lines: LibCarla/source/carla/client/World.cpp
+8-1Lines changed: 8 additions & 1 deletion
Original file line number
Diff line number
Diff line change
@@ -75,7 +75,14 @@ namespace client {
75
75
if (tics_correct >= 2)
76
76
return id;
77
77
78
-
Tick(local_timeout);
78
+
if (settings.synchronous_mode) {
79
+
// tick if synchronous mode is active
80
+
Tick(local_timeout);
81
+
}
82
+
else {
83
+
WaitForTick(local_timeout);
84
+
}
85
+
79
86
}
80
87
81
88
log_warning("World::ApplySettings: After", number_of_attemps, " attemps, the settings were not correctly set. Please check that everything is consistent.");
0 commit comments