Questions about traffic manager in leaderboard

Hello, everyone! My name is Linda. These days I tried to make leaderboard a DRL training environment and tried to use the main function in a multiprocessing manner in ‘leaderboard/leaderboard/leaderboard_evaluator.py’. Part of the code is as follows:

import torch.multiprocessing as mp

.
.
.

    for rank in range(2):
        port = 8000 + 100 * (rank + 1)
        t = mp.Process(target=main, args=(
            str(port), result_root_path, rank, traffic_light, counter, shared_model, shared_grad_buffers,
            son_process_counter))
        t.start()
        processes.append(t)

    for t in processes:
        t.join()

The ‘port’ was the main port used by CARLA server and client. I initialized two subprocess, while the first worked well but the second subprocess got the error as:

trying to create rpc server for traffic manager; but the system failed to create because of bind error.

I found that there is only one place setting the port of traffic manager, in scenario_runner/srunner/scenariomanager/scenarioatomics/atomic_behaviors.py in class ChangeAutoPilot. But the function self._tm = CarlaActorPool.get_client().get_trafficmanager() was never called.

I wanted to know how did leaderboard use traffic manager while there was no place to initialize one?

Hey, the leaderboard_evaluator.py already has the –trafficManagerPort argument to set the port of the TrafficManager to the desired one. Is that what you are looking for?

Thank you! It seemed that what I used was an old version of leaderboard. I changed to the lastest version and this problem was solved.