src/TrafficSimulator.py
def add_vehicle(self, vehicle, id_assigned_at_map_entrance=False):
        ''' Add a robot into the simulator '''
        self.update_robot_map_specs(vehicle)
        
        if id_assigned_at_map_entrance:
            vehicle.agent_id = self.next_agent_id
            self.next_agent_id += 1
        else:
            vehicle.agent_id = -1
        self.total_vehicle_list += [vehicle]
        self.active_vehicles.add(vehicle)
        # self.nTotal = len(self.total_vehicle_list)
 Add a robot into the simulator 
Add a robot into the simulator
Add a robot into the simulator
def add_vehicle(self, vehicle, id_assigned_at_map_entrance=False):
        self.update_robot_map_specs(vehicle)
        if id_assigned_at_map_entrance:
            vehicle.agent_id = self.next_agent_id
            self.next_agent_id += 1
        else:
            vehicle.agent_id = -1
        self.total_vehicle_list += [vehicle]
        self.active_vehicles.add(vehicle)
def add_vehicle ( self , vehicle , id_assigned_at_map_entrance = False ) : self . update_robot_map_specs ( vehicle ) if id_assigned_at_map_entrance : vehicle . agent_id = self . next_agent_id self . next_agent_id += 1 else : vehicle . agent_id = - 1 self . total_vehicle_list += [ vehicle ] self . active_vehicles . add ( vehicle )
Add a robot into the simulator
Add a robot into the simulator
''' Add a robot into the simulator ''' # self.nTotal = len(self.total_vehicle_list)
self
vehicle
id_assigned_at_map_entrance