(hero_vehicle)
| 212 | return vehicles_dict |
| 213 | |
| 214 | def get_hero_vehicle(hero_vehicle): |
| 215 | if hero_vehicle is None: |
| 216 | return hero_vehicle |
| 217 | |
| 218 | hero_waypoint = carla_map.get_waypoint(hero_vehicle.get_location()) |
| 219 | hero_transform = hero_vehicle.get_transform() |
| 220 | location_gnss = carla_map.transform_to_geolocation(hero_transform.location) |
| 221 | |
| 222 | hero_vehicle_dict = { |
| 223 | "id": hero_vehicle.id, |
| 224 | "position": [location_gnss.latitude, location_gnss.longitude, location_gnss.altitude], |
| 225 | "road_id": hero_waypoint.road_id, |
| 226 | "lane_id": hero_waypoint.lane_id |
| 227 | } |
| 228 | return hero_vehicle_dict |
| 229 | |
| 230 | def get_walkers(walkers): |
| 231 | walkers_dict = dict() |
no test coverage detected