From 2ab5aa0d607f956b71dc0d04fd3128823c0d33f0 Mon Sep 17 00:00:00 2001 From: Holger Caesar Date: Thu, 25 Oct 2018 17:32:34 +0800 Subject: [PATCH] Workaround to fix egopose visualization bug --- python-sdk/nuscenes_utils/nuscenes.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/python-sdk/nuscenes_utils/nuscenes.py b/python-sdk/nuscenes_utils/nuscenes.py index 4581a19b..2b99963b 100644 --- a/python-sdk/nuscenes_utils/nuscenes.py +++ b/python-sdk/nuscenes_utils/nuscenes.py @@ -838,9 +838,14 @@ def render_egoposes_on_map(self, log_location: str, scene_tokens: List=None, dem # Settings close_dist = 100 pixel_to_meter = 0.1 + ignore_logfiles = ['n008-2018-05-21-11-06-59-0400'] # Exclude older logs with incompatible maps - log_tokens = [l['token'] for l in self.nusc.log if l['location'] == log_location] + # Get logs by location + log_tokens = [l['token'] for l in self.nusc.log if l['location'] == log_location + and l['logfile'] not in ignore_logfiles] assert len(log_tokens) > 0 + + # Filter scenes scene_tokens_location = [e['token'] for e in self.nusc.scene if e['log_token'] in log_tokens] if scene_tokens is not None: scene_tokens_location = [t for t in scene_tokens_location if t in scene_tokens]