MCPcopy Create free account
hub / github.com/AdaCompNUS/summit / get_walkers

Function get_walkers

PythonAPI/carla/scene_layout.py:230–242  ·  view source on GitHub ↗
(walkers)

Source from the content-addressed store, hash-verified

228 return hero_vehicle_dict
229
230 def get_walkers(walkers):
231 walkers_dict = dict()
232 for walker in walkers:
233 w_transform = walker.get_transform()
234 location_gnss = carla_map.transform_to_geolocation(w_transform.location)
235 w_dict = {
236 "id": walker.id,
237 "position": [location_gnss.latitude, location_gnss.longitude, location_gnss.altitude],
238 "orientation": [w_transform.rotation.roll, w_transform.rotation.pitch, w_transform.rotation.yaw],
239 "bounding_box": [[v.longitude, v.latitude, v.altitude] for v in _get_bounding_box(walker)]
240 }
241 walkers_dict[walker.id] = w_dict
242 return walkers_dict
243
244 def get_speed_limits(speed_limits):
245 speed_limits_dict = dict()

Callers 1

get_dynamic_objectsFunction · 0.85

Calls 1

_get_bounding_boxFunction · 0.85

Tested by

no test coverage detected