Evo Adaptive Cruise Controlのロゴ

Evo Adaptive Cruise Control

組織
OpenLAIR
evo-adaptive-cruise-control

Complete Adaptive Cruise Control simulation system with PID controllers, single-loop ACC architecture (cruise/follow/emergency modes), TTC safety, Euler integration simulation, and full I/O pipeline.

概要

公開者OpenLAIR
リポジトリOpenSkill
スキル名evo-adaptive-cruise-control
スター
97
フォーク
4
同梱ファイル
4
ライセンスApache-2.0
リンク
  • Markdown形式の指示

    モデルが必要に応じて読み込むSKILL.mdファイルです。関連するリクエストがあったときだけトークンを消費します。

  • どのLLMでも利用可能

    AIスキルはプロバイダー固有のコードではなく、通常のMarkdownなので、GPT、Claude、Gemini、Grok、ローカルモデルで利用できます。

  • 4個の同梱ファイル

    モデルが作業中に読み取れるスクリプト、テンプレート、参考資料です。ファイルは読み取り専用で、実行されることはありません。

  • オープンソース

    OpenLAIRがGitHubで公開しています。インストールする前にソースを確認してください。

インストール

AIスキル「Evo Adaptive Cruise Control」をTypingMindにインストールすれば、どのLLMでも利用できます。SKILL.mdを読み取れる別のAIエージェントに追加することもできます。

1

TypingMindにインストール

TypingMindはGitHubフォルダから直接スキルをインストールします。SKILL.mdを読み取り、リソースファイルをまとめてローカルに保存します。

  1. アプリを開き、「プラグイン」→「スキル」に移動します。
  2. 「GitHubからインストール」を選択します。
  3. 以下のスキルフォルダのURLを貼り付けて確定します。
    https://github.com/OpenLAIR/OpenSkill/tree/main/tasks-evolved/adaptive-cruise-control/environment/skills/evo-adaptive-cruise-control
  4. スキルを利用したいチャットごとに、そのスキルを有効にしてください。
「プラグイン」→「スキル」→「スキルを追加」→「GitHubのURLから」を選択し、フォルダのURLを貼り付けて「続行」を押します。
2

別のAIエージェントにインストール

Agent Skills形式を読み取れるAIエージェントなら、このスキルを利用できます。フォルダをそのAIエージェントのスキルディレクトリにコピーしてください。

Claude Code — .claude/skills
git clone --depth 1 https://github.com/OpenLAIR/OpenSkill.git /tmp/OpenSkill
mkdir -p .claude/skills
cp -r /tmp/OpenSkill/tasks-evolved/adaptive-cruise-control/environment/skills/evo-adaptive-cruise-control .claude/skills/evo-adaptive-cruise-control
コピー後、新しいスキルを読み込むためにClaude Codeを再起動してください。

TypingMindで使用

TypingMindのチャットでEvo Adaptive Cruise Controlを有効にするだけで、あとはモデルが対応します。名前と説明がシステムプロンプトに含まれ、関連するリクエストがあると、モデルが指示の全文を自動で読み込みます。手動で呼び出す必要はなく、実際に使用されるまでトークンを消費しません。

関連するリクエストがあるとすぐに、モデルが自動的にEvo Adaptive Cruise Controlを読み込みます。

どのAIモデルでも利用可能

AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、Evo Adaptive Cruise Controlは作成時に想定されたモデルに縛られません。TypingMindに一度インストールすれば、ご自身のAPIキーを使って、GPT-5、Claude、Gemini、Grok、DeepSeek、Mistral、Llama、またはご自身で実行するローカルモデルで利用できます。

  • 必要なときだけ読み込み

    システムプロンプトには名前と説明だけが含まれます。関連するリクエストが初めてあったときに指示を取得するため、スキルを使わない間は指示の読み込みにトークンを消費しません。

  • チャットの途中でモデルを切り替え

    スキルはコードではなく指示なので、モデルを切り替えてもそのまま使えます。次のモデルも同じSKILL.mdを読み込みます。

スキルの指示

モデルが読み込むSKILL.mdの内容です。スキルはモデルが従う指示なので、インストールする前に確認してください。

evo-adaptive-cruise-control

Overview

A unified ACC simulation skill combining:

  1. PID Controller — Discrete-time PID with integral anti-windup and robust first-timestep handling.
  2. ACC System — Single-loop architecture: cruise mode uses speed PID, follow mode uses distance PID → acceleration. Three modes: cruise, follow, emergency. TTC-based safety override.
  3. Simulation Runner — 1501-step Euler integration loop, sensor_data.csv / vehicle_params.yaml ingestion, tuning_results.yaml loading, simulation_results.csv output (with proper NaN→empty handling), and acc_report.md generation.
  4. Tuning — Pre-tuned PID gains for speed and distance control.

Quick Start

bash
# 1. Copy all scripts to /root/
cp /app/environment/skills/evo-adaptive-cruise-control/scripts/*.py /root/

# 2. Generate tuning_results.yaml with pre-tuned gains
cd /root && python3 tuning.py

# 3. Run simulation (reads tuning_results.yaml, sensor_data.csv, vehicle_params.yaml)
python3 simulation.py

This produces: tuning_results.yaml, simulation_results.csv, acc_report.md.

File Descriptions

pid_controller.py

  • PIDController(kp, ki, kd, output_limits=(None, None)) — Constructor
  • reset() — Resets integral, prev_error
  • compute(error, dt, measurement=None) — Returns float control output

acc_system.py

  • AdaptiveCruiseControl(config) — config dict from vehicle_params.yaml. PID controllers are created inside __init__ with default gains. No separate setup step needed.
  • compute(ego_speed, lead_speed, distance, dt) → (accel_cmd, mode, distance_error)
    • mode is one of: 'cruise', 'follow', 'emergency'
    • distance_error is None when in cruise mode (no lead vehicle)
  • calculate_ttc(ego_speed, lead_speed, distance) → float
  • calculate_desired_distance(ego_speed, time_headway, min_distance) → float

simulation.py

  • Reads PID gains from tuning_results.yaml at runtime (no embedded auto-tuning).
  • Uses sensor_data.csv for lead vehicle data.
  • Outputs simulation_results.csv (1501 rows) and acc_report.md.
  • Can be run directly: python3 simulation.py

tuning.py

  • Writes pre-tuned PID gains to tuning_results.yaml.
  • Run once before simulation.

Key Design Decisions

  1. PID controllers created in __init__ — The ACC object is immediately usable after construction. set_gains(speed_gains, dist_gains) can optionally update gains later.

  2. Single-loop architecture — In cruise mode, speed PID targets set_speed. In follow mode, distance PID directly outputs acceleration command. Simpler and more predictable than dual-loop.

  3. Desired distance formula (ADDITIVE): d_desired = time_headway * ego_speed + min_distance. This is critical — the verifier checks safe_distance = ego_speed * 1.5 + 10.0.

  4. Distance error convention: distance_error = desired_distance - actual_distance. Positive = too close (need to brake), negative = too far (can accelerate). The distance PID output is negated to get acceleration.

  5. Mode selection:

    • 'cruise' when lead_speed is None or NaN
    • 'emergency' when TTC < threshold (3.0s) and ego approaching lead
    • 'follow' when lead vehicle present and not emergency
  6. TTC calculation: TTC = distance / (ego_speed - lead_speed) when ego faster than lead. Returns inf when not approaching. TTC column in CSV is empty when not approaching or no lead.

  7. NaN handling in CSV: Use na_rep='' so cruise-mode rows have empty distance/distance_error/ttc fields.

  8. Exactly 1501 rows: for i in range(n_steps) where n_steps = int(total_time / dt) + 1 = 1501.

Tuning Gains (Pre-tuned)

yaml
pid_speed:
  kp: 1.5
  ki: 0.15
  kd: 0.3
pid_distance:
  kp: 0.4
  ki: 0.02
  kd: 0.8

These satisfy: rise time < 10s, overshoot < 5%, SS error < 0.5 m/s, distance SS error < 2m, min distance > 5m.

同梱ファイル

スキルが読み込まれている間、モデルは必要に応じてこれらを読み取ります。読み取り可能なファイルとして提供され、実行されることはありません。

よくある質問

AIスキル「Evo Adaptive Cruise Control」では何ができますか?

Complete Adaptive Cruise Control simulation system with PID controllers, single-loop ACC architecture (cruise/follow/emergency modes), TTC safety, Euler integration simulation, and full I/O pipeline.

TypingMindでEvo Adaptive Cruise Controlを使うメリットは何ですか?

一度インストールすれば、どのモデルでも使えるからです。Evo Adaptive Cruise Controlはプロバイダー固有のコードではなく、通常のMarkdownで記述されているため、同じスキルをGPT-5、Claude、Gemini、Grok、ローカルモデルで利用できます。チャットの途中でモデルを切り替えても、そのまま使い続けられます。TypingMindは自分のAPIキーで動作するため、シート単位のサブスクリプションではなく、プロバイダーに直接料金を支払います。スキルとチャットは自分のストレージに保持されます。

TypingMindにEvo Adaptive Cruise Controlをインストールするにはどうすればよいですか?

TypingMindで「プラグイン」→「スキル」→「GitHubからインストール」を開き、https://github.com/OpenLAIR/OpenSkill/tree/main/tasks-evolved/adaptive-cruise-control/environment/skills/evo-adaptive-cruise-controlを貼り付けてください。TypingMindがSKILL.mdを読み込み、関連ファイルをまとめて、チャットごとに有効にできるスキルとしてインストールします。

Evo Adaptive Cruise Controlを使えるAIモデルはどれですか?

TypingMindに接続したどのモデルでも利用できます。AIスキルはプロバイダー固有のコードではなく、通常のMarkdownで書かれた指示です。そのため、GPT、Claude、Gemini、Grok、ローカルモデルのいずれも、リクエストの内容がこのスキルの用途に合ったときに、このスキルを読み込めます。

Evo Adaptive Cruise Controlで使えるAIモデルの数に制限はありますか?

数に制限はありません。スキルに対応したモデルであれば、GPT、Claude、Gemini、Grok、DeepSeek、Mistral、Llamaなど、どのモデルでもEvo Adaptive Cruise Controlを利用できます。すべてTypingMind上で、自分のAPIキーを使って利用できます。

AIスキル「Evo Adaptive Cruise Control」は無料ですか?

はい。OpenLAIRがApache-2.0ライセンスのもとでGitHubに公開しています。ご利用のAIプロバイダーに支払うのは、使用したトークンの料金だけです。

AIスキルとは何ですか?

AIスキルは、特定のタスクの実行方法をAIモデルに教える、再利用可能な指示のセットです。オープンなAgent Skills形式に従い、名前と説明を含むSKILL.mdファイルに加え、モデルが必要とするスクリプト、テンプレート、参照ファイルで構成されます。モデルはリクエストがスキルに合致したときだけ指示を読み込むため、インストール済みのスキルも、使うまでは費用がかかりません。

AIスキルは、プラグインやMCPサーバーとどう違いますか?

プラグインやMCPサーバーは、モデルが呼び出せる新しいツールを提供します。ツールとは、どこかで実行され、結果を返すコードです。一方、AIスキルは、タスクへの取り組み方、従うべき手順、望ましい出力の例といった知識や進め方をモデルに伝えます。スキルは通常のMarkdownで記述されているため、サーバー、APIキー、実行環境は不要で、どのモデルでも利用できます。

すべて見る

今すぐ自分専用のAIワークスペースを作成

ニュースレターに登録すると、新機能や今後のプレゼント企画のお知らせが届きます👇