[api] Accept SUMO and OpenDRIVE assets with an uploaded config

未关闭
#231 0 条评论 0 个 reaction 已指派 0 人 在 GitHub 查看

维护者通常 1 天内回复

还没有人认领这个 Issue。

评估

难度
4/5
预计耗时
3-5 天
新手友好度
48/100
Issue 类型
功能
描述清晰度
基本清楚
活跃度
活跃
技术栈
python
领域
api, backend

调研方向

Start at the POST /v1/run handler and trace how it saves the YAML config, selects the shared SUMO assets directory, and invokes OpenCDA and the SUMO adapter. Check where the adapter receives -x and how task cleanup runs. Done means an uploaded archive's SUMO files and optional .xodr map are available under a task-specific name, the map is passed through, and the directory is removed when the task finishes.

由索引模型根据 Issue 内容生成。

描述

Problem or motivation

POST /v1/run accepts only a YAML config. Its file name selects SUMO assets that must already exist in the shared assets directory (opencda/sumo-assets/<name>/ in the OpenCDA container, /home/sumo/assets/<name>/ for the SUMO adapter). The .xodr map used with -x is looked up in the same place, and -x cannot be passed through the API at all.

Scenario Manager generates the SUMO network, routes and, for custom maps, an .xodr file for each scenario. There is no way to deliver them to the node, so these scenarios cannot be run through the API. Placing inputs on the node in advance does not work for scenarios created at run time.

Proposed solution
  • Accept an optional archive with scenario assets in POST /v1/run next to config: the .sumocfg with its network and route files, and optionally an .xodr map.
  • Unpack it into the shared assets directory under a task-specific name and save the config under the same name, so OpenCDA and the SUMO adapter find the files.
  • Pass -x when the archive contains an .xodr.
  • Remove the directory when the task finishes.
Area

Scenario management

主要语言
Python
星标
11
派生
11
平均合并
1 天 16 小时
30 天内合并 PR
12

环境准备

  • 提供 Dockerfile 或 Docker Compose 文件
  • 没有 Pull Request 模板
  • 阅读贡献指南

从这里开始

  1. 先读完整个 Issue,再读项目的贡献指南。
  2. 在 Issue 下留言说明你要接手 —— 这能避免两个人做同样的事。
  3. Fork 仓库,在一个分支上完成修改。
  4. 提交 Pull Request,并在描述里引用这个 Issue 编号。

CAVISE/OpenCDA 的其他 Issue

查看 CAVISE/OpenCDA 的全部 Issue

相似的 Issue

更多 Python Issue

把新 issue 发到你的邮箱

精选适合新手参与的 GitHub issue 摘要。