Skip to main content

metacar-multiagent

metacar-multiagent 是基于 metacar 0.4.0 的多车协同场景扩展包。它不修改、 覆盖或替换原 metacar;旧场景继续使用 metacar.SceneAPI,多车任务场景使用 metacar_multiagent.ScenarioTaskAPI。

本项目独立维护、独立测试和独立发布。metacar 是基础依赖,不是本项目的源码 组成部分。

安装

使用正式学生资料包提供的两个 wheel,在它们所在目录执行:

python -m pip install ./metacar-0.4.0-py3-none-any.whl ./metacar_multiagent-0.1.0-py3-none-any.whl

扩展包固定依赖 metacar==0.4.0。基础包还需要 numpy、opencv-python、pydantic 等依赖, 安装时应能访问依赖源或已备齐相应文件;仅这两个 wheel 不代表完整的离线安装环境。

PyPI 版本发布后,也可执行 python -m pip install metacar-multiagent==0.1.0。 发行状态和安装文件以本仓库的 Release 页面为准。

最小示例

源码仓库和源码发行包提供 examples/minimal_control.py;wheel 不会将示例安装到当前目录。 通过客户端启动场景后,在下载的源码目录执行 python examples/minimal_control.py。 港口开发站试用使用开发版客户端。示例仅检查连接和停车,不完成运输任务。

from metacar_multiagent import GearMode, ScenarioTaskAPI, VehicleControl

with ScenarioTaskAPI() as api:
    scene = api.get_scene_static_data()
    task = api.get_task()
    vehicle_ids = api.get_vehicle_ids()

    try:
        api.set_vehicle_controls({
            vehicle_id: VehicleControl(brake=1.0, gear=GearMode.PARKING)
            for vehicle_id in vehicle_ids
        })
    finally:
        api.stop_vehicles(vehicle_ids)

道路、车辆、固定布景和已感知障碍通过接口读取。固定任务规则和评分规则以正式文档 为准。

开发

先准备 Python 3.10 或更高版本,再安装本项目及开发依赖:

python -m venv .venv
.venv\Scripts\python -m pip install -e ".[dev]"

运行测试:

.venv\Scripts\python -m unittest discover -s tests -p "test_*.py" -v

构建文档和发布包:

.venv\Scripts\sphinx-build -W --keep-going -b html docs docs/_build/html
.venv\Scripts\python -m build

发布新版本前,应同步检查 pyproject.toml、metacar_multiagent/__init__.py、 docs/conf.py 和 scripts/validate_release.py 中的版本及构建标识,并在全新环境中 验证 wheel 和 sdist 均可与 metacar 0.4.0 共存。完整流程见 发布手册。

Metadata

Release files for metacar-multiagent 0.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for metacar-multiagent 0.1.0
File Size Uploaded Provenance Actions
metacar_multiagent-0.1.0.tar.gz 27.3 kB With provenance Details for metacar_multiagent-0.1.0.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for metacar-multiagent 0.1.0
File Interpreter ABI Platform Actions
metacar_multiagent-0.1.0-py3-none-any.whl Python 3 none any Details for metacar_multiagent-0.1.0-py3-none-any.whl

Total release size: 38.0 kB

Release files / metacar_multiagent-0.1.0.tar.gz

Download URL metacar_multiagent-0.1.0.tar.gz
Size 27.3 kB
Tags Source
SHA-256 checksum
How to use checksums
e63858dd884fdc5dcbc370c91bd54b8f433a77f736657e0731edc1eafbe17364
BLAKE2b-256 checksum
How to use checksums
e132fc1049d31529376ec09297f263623481fe507ff0dcfa9036869d035c7f4b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Release files / metacar_multiagent-0.1.0-py3-none-any.whl

Download URL metacar_multiagent-0.1.0-py3-none-any.whl
Size 10.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
3aba2d478da1dc6ba2f12717c6a372013bd81c92412d35f1c00bd2d7ddf9f951
BLAKE2b-256 checksum
How to use checksums
48f633eeac111f345647f899259a9deb8fc967f30fef6feef6dbb286b214b544
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

Security for metacar-multiagent 0.1.0

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

Full provenance

All 2 files in this release have been uploaded with provenance metadata.

Select from 2 files

Attestation for metacar_multiagent-0.1.0.tar.gz

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 12, 2026.

Transparency log

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.0 This release

2 release files Full provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page