[Feature]: Add AdvCP utilities for generating vehicle mesh and mesh-division assets

オープン
#140 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@meaning-0f-life がすでに取り組んでいます。

2026年7月25日 から。

  • #184 @meaning-0f-life による — オープン

評価

難易度
5/5
見積もり時間
1週間以上
初心者へのやさしさ
20/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
embedded-iot

調査の方向性

Start by reading the AdvCP attack code and its asset-loading paths for car_mesh_path, car_mesh_divide_path, and the removal asset paths; the issue does not name specific source files or tests. Then determine how existing assets are consumed and what mesh formats and coordinate frames they require. Done means utilities generate or validate compatible assets for spoofing and removal, with a CLI and optional caching.

索引モデルが issue の本文から書いたものです。

説明

AdvCP attack CoP enhancement
Problem or motivation

AdvCP integration in CAVISE currently depends on pre-generated 3D vehicle assets used by the attack pipeline to perform physically plausible spoofing and removal attacks.

At the moment, AdvCP attack configs expect assets such as:

car_mesh_path: ../../../core/attack/advcp/3d_models/car_mesh_0200.ply
car_mesh_divide_path: ../../../core/attack/advcp/3d_models/spoof/car_mesh_divide.pkl

# Optional adv-shape pretrained assets (used only when advshape: true).
# remove_adv_shape_perturb_path: ../../../core/attack/advcp/3d_models/remove/mesh_perturb.npy
# remove_adv_shape_divide_path: ../../../core/attack/advcp/3d_models/remove/mesh_divide.pkl

These files are critical for reproducing AdvCP-style attacks, but the repository does not currently provide a clear utility workflow for generating them from a CARLA vehicle model or another supported vehicle mesh source.

This creates several limitations:

  1. Experiments are tied to a small set of pre-generated vehicle assets.
  2. It is difficult to reproduce spoofing experiments with different CARLA vehicle types.
  3. Removal experiments that require mesh-based or adv-shape assets cannot be easily extended.
  4. Researchers cannot easily validate whether the generated .ply, .pkl, and optional .npy assets are compatible with the AdvCP pipeline.
  5. The asset-generation process is not transparent enough for reproducible experiments.

A similar question was raised in the original AdvCollaborativePerception repository regarding how car_0200.ply and mesh_divide.pkl were generated: https://github.com/zqzqz/AdvCollaborativePerception/issues/8

The same reproducibility problem applies to the CAVISE AdvCP integration, and it also affects removal-related assets, not only spoofing.

Proposed solution

Add utility scripts under the AdvCP module for generating and validating the 3D assets required by spoofing and removal attacks.

Suggested location:

opencda/core/attack/advcp/utils/

The utilities should support generation or validation of the following asset types:

.ply   vehicle mesh used by AdvCP ray-casting / physical attack simulation
.pkl   mesh-division metadata used by spoofing and removal pipelines
.npy   optional adversarial shape perturbation assets for removal when advshape=true

Suggested utility scripts:

generate_car_mesh.py
generate_mesh_divide.py
generate_remove_advshape_assets.py
validate_advcp_assets.py

Expected capabilities:

  1. Generate a .ply vehicle mesh compatible with car_mesh_path.
  2. Generate spoofing mesh-division metadata compatible with car_mesh_divide_path.
  3. Generate removal mesh-division metadata compatible with remove_adv_shape_divide_path.
  4. Optionally support generation, loading, or export of remove_adv_shape_perturb_path when advshape: true.
  5. Support runtime asset generation from a CARLA vehicle blueprint, so the simulation can derive the required mesh and mesh-division data on demand instead of requiring pre-generated .ply / .pkl files to be committed to the repository.
  6. Support an optional cache mode: generated .ply, .pkl, and .npy assets may be stored outside the source tree and reused across runs, but they should be treated as derived cache artifacts rather than mandatory repository files.
  7. Validate asset shape, coordinate frame, scale, file existence, and compatibility with the AdvCP attack code.
  8. Provide a CLI interface so the assets can be regenerated for different CARLA vehicle types or external mesh inputs.
  9. Document the expected input source: CARLA blueprint, CARLA mesh export, or external .obj / .ply / .fbx asset.
  10. Save outputs into the existing AdvCP asset layout when explicit file export is requested.

Example CLI for generating a vehicle mesh:

python -m opencda.core.attack.advcp.utils.generate_car_mesh \
  --vehicle-blueprint vehicle.tesla.model3 \
  --output opencda/core/attack/advcp/3d_models/car_mesh_0200.ply

Example CLI for generating spoofing mesh division:

python -m opencda.core.attack.advcp.utils.generate_mesh_divide \
  --mesh opencda/core/attack/advcp/3d_models/car_mesh_0200.ply \
  --mode spoof \
  --output opencda/core/attack/advcp/3d_models/spoof/car_mesh_divide.pkl

Example CLI for generating removal mesh division:

python -m opencda.core.attack.advcp.utils.generate_mesh_divide \
  --mesh opencda/core/attack/advcp/3d_models/car_mesh_0200.ply \
  --mode remove \
  --output opencda/core/attack/advcp/3d_models/remove/mesh_divide.pkl

Example CLI for validating generated assets:

python -m opencda.core.attack.advcp.utils.validate_advcp_assets \
  --car-mesh opencda/core/attack/advcp/3d_models/car_mesh_0200.ply \
  --spoof-divide opencda/core/attack/advcp/3d_models/spoof/car_mesh_divide.pkl \
  --remove-divide opencda/core/attack/advcp/3d_models/remove/mesh_divide.pkl \
  --remove-perturb opencda/core/attack/advcp/3d_models/remove/mesh_perturb.npy

The validation script should fail early with actionable error messages if an asset is missing, has an unexpected format, uses an incompatible coordinate frame, or cannot be consumed by the attack pipeline.

The preferred behavior should be runtime generation with optional caching. Large derived assets such as .ply, .pkl, and .npy files should not have to live in the repository unless they are intentionally included as small examples or test fixtures.

Area

Automotive cybersecurity

Alternatives considered

No response

Additional context

No response

主要言語
Python
スター
11
フォーク
11
平均マージ
1日 16時間
マージ済み PR(30日)
12

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

CAVISE/OpenCDA のほかの issue

CAVISE/OpenCDA の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。