Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 4 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,9 @@ cython_debug/
*.log
logs/

# Crash dumps
core.*

# Environment variables
.env
.env.local
Expand All @@ -100,4 +103,4 @@ Thumbs.db

# MMDetection3D work dirs
work_dirs/
ckpts/
ckpts/
8 changes: 7 additions & 1 deletion projects/AlgEngine/closed_loop/post_processor.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,19 @@ def __init__(
self,
config,
current_pkl,
score_mode='lookup',
**kwargs
):

self.traj = np.load(config)
self.score_mode = score_mode
self.traj = None if self.score_mode == 'recompute' else np.load(config)
self.data_info = mmcv.load(current_pkl, file_format="pkl")

def process(self, result):
if self.score_mode == 'recompute':
plan_traj = result['trajectory']
return plan_traj, -1

plan_idx = result['chosen_ind']
plan_traj = self.traj[plan_idx]
# output_planning_traj = result['trajectory'] # should be the same
Expand Down
4 changes: 3 additions & 1 deletion projects/AlgEngine/closed_loop/sim_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -167,6 +167,7 @@ async def run_inference_loop(model, cfg, logger):
post_processor = ScorePostProcessor(
cfg.sim.post_process_path,
current_queue[-1],
score_mode=cfg.sim.get('score_mode', 'lookup'),
)
plan_result, plan_idx = post_processor.process(result)

Expand Down Expand Up @@ -245,10 +246,11 @@ def main():
monitored_folder = ''
))
cfg.sim = sim_cfg
cfg.data.test.type = "NavSimOpenSceneE2EClosedLoop"

if args.cfg_options is not None:
cfg.merge_from_dict(args.cfg_options)
cfg.sim.setdefault('score_mode', cfg.model.planning_head.get('score_mode', 'lookup'))
cfg.data.test.type = "NavSimOpenSceneE2EClosedLoop"
# import modules from string list.
if cfg.get('custom_imports', None):
from mmcv.utils import import_modules_from_strings
Expand Down
Loading