Skip to content

Commit 18425ae

Browse files
author
spencer@primus
committed
Allow hacky loading of frames without agent spec
1 parent c09a90b commit 18425ae

1 file changed

Lines changed: 5 additions & 0 deletions

File tree

avapi/carla/dataset.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -299,6 +299,11 @@ def get_ego_reference(self, *args, **kwargs):
299299

300300
def _load_agents(self, frame):
301301
timestamp = None
302+
if frame is None:
303+
frame = self.get_frames(
304+
sensor="camera-0",
305+
agent=0,
306+
)[0]
302307
filepath = self.get_object_file(frame, timestamp, is_agent=True, is_global=True)
303308
return read_agents_from_file(filepath)
304309

0 commit comments

Comments
 (0)