(vehicles)
| 198 | return traffic_lights_dict |
| 199 | |
| 200 | def get_vehicles(vehicles): |
| 201 | vehicles_dict = dict() |
| 202 | for vehicle in vehicles: |
| 203 | v_transform = vehicle.get_transform() |
| 204 | location_gnss = carla_map.transform_to_geolocation(v_transform.location) |
| 205 | v_dict = { |
| 206 | "id": vehicle.id, |
| 207 | "position": [location_gnss.latitude, location_gnss.longitude, location_gnss.altitude], |
| 208 | "orientation": [v_transform.rotation.roll, v_transform.rotation.pitch, v_transform.rotation.yaw], |
| 209 | "bounding_box": [[v.longitude, v.latitude, v.altitude] for v in _get_bounding_box(vehicle)] |
| 210 | } |
| 211 | vehicles_dict[vehicle.id] = v_dict |
| 212 | return vehicles_dict |
| 213 | |
| 214 | def get_hero_vehicle(hero_vehicle): |
| 215 | if hero_vehicle is None: |
no test coverage detected