Synchronous mode bug demonstration
This commit is contained in:
parent
cfdbe8fb5e
commit
4f21f94ac0
|
@ -26,9 +26,9 @@ namespace traffic_manager {
|
|||
const chr::duration<float> throughput_count_duration = current_time - throughput_clock;
|
||||
if (throughput_count_duration.count() > 1.0f) {
|
||||
|
||||
//std::cout << "Stage: " + stage_name + ", throughput: " << throughput_counter
|
||||
// << ", avg. cycle duration: " << 1000* inter_update_duration.count()
|
||||
// << " ms" << std::endl;
|
||||
std::cout << "Stage: " + stage_name + ", throughput: " << throughput_counter
|
||||
<< ", avg. cycle duration: " << 1000* inter_update_duration.count()
|
||||
<< " ms" << std::endl;
|
||||
|
||||
throughput_clock = current_time;
|
||||
throughput_counter = 0u;
|
||||
|
|
|
@ -236,9 +236,17 @@ def main():
|
|||
# example of how to use parameters
|
||||
traffic_manager.global_percentage_speed_difference(30.0)
|
||||
|
||||
throughput_counter = 0
|
||||
begining = time.time()
|
||||
while True:
|
||||
if args.sync and synchronous_master:
|
||||
world.tick()
|
||||
throughput_counter += 1
|
||||
current = time.time()
|
||||
if ((current - begining) > 1.0):
|
||||
begining = current
|
||||
print ('||||||||||| CARLA THROUGHPUT ||||||||||| >>> ' + str(throughput_counter))
|
||||
throughput_counter = 0
|
||||
else:
|
||||
world.wait_for_tick()
|
||||
|
||||
|
|
Loading…
Reference in New Issue