def get_position(self, veh_id, error=-1001):
See parent class.
// FIXME: do it the way we do, in case veh_id is not a list
positions = []
for veh in veh_id:
pos = self.__vehicles[veh]["tracking_info"].CurrentPos
positions.append(pos)
return positions
After Change
def get_position(self, veh_id, error=-1001):
See parent class.
if isinstance(veh_id, (list, np.ndarray)):
return [self.get_position(veh, error)for veh in veh_id]
return self.__vehicles[veh_id]["tracking_info"].CurrentPos
def get_position_world(self, veh_id, error=-1001):