Extends mutex to TM stages

This commit is contained in:
Jacopo Bartiromo 2020-12-16 18:00:30 +01:00 committed by Jacopo Bartiromo
parent b6de4cde11
commit 5170ca5880
1 changed files with 2 additions and 1 deletions

View File

@ -175,7 +175,6 @@ void TrafficManagerLocal::Run() {
registered_vehicles_state = registered_vehicles.GetState();
}
registration_lock.unlock();
// Reset frames for current cycle.
localization_frame.clear();
@ -201,6 +200,8 @@ void TrafficManagerLocal::Run() {
motion_plan_stage.Update(index);
}
registration_lock.unlock();
// Sending the current cycle's batch command to the simulator.
if (synchronous_mode) {
episode_proxy.Lock()->ApplyBatchSync(control_frame, false);