本文へ移動
cccskills
無料GitHub で公開

vehicle-dynamics

Use this skill when simulating vehicle motion, calculating safe following distances, time-to-collision, speed/position updates, or implementing vehicle state machines for cruise control modes.

インストール方法を見る

含まれるファイル(1)

  • SKILL.md2.2 KB

SKILL.md(原文)

インストールする前に、エージェントに与えられる指示の中身を確認できます。

Vehicle Dynamics Simulation

Basic Kinematic Model

For vehicle simulations, use discrete-time kinematic equations.

Speed Update:

new_speed = current_speed + acceleration * dt
new_speed = max(0, new_speed)  # Speed cannot be negative

Position Update:

new_position = current_position + speed * dt

Distance Between Vehicles:

# When following another vehicle
relative_speed = ego_speed - lead_speed
new_distance = current_distance - relative_speed * dt

Safe Following Distance

The time headway model calculates safe following distance:

def safe_following_distance(speed, time_headway, min_distance):
    """
    Calculate safe distance based on current speed.

    Args:
        speed: Current vehicle speed (m/s)
        time_headway: Time gap to maintain (seconds)
        min_distance: Minimum distance at standstill (meters)
    """
    return speed * time_headway + min_distance

Time-to-Collision (TTC)

TTC estimates time until collision at current velocities:

def time_to_collision(distance, ego_speed, lead_speed):
    """
    Calculate time to collision.

    Returns None if not approaching (ego slower than lead).
    """
    relative_speed = ego_speed - lead_speed

    if relative_speed <= 0:
        return None  # Not approaching

    return distance / relative_speed

Acceleration Limits

Real vehicles have physical constraints:

def clamp_acceleration(accel, max_accel, max_decel):
    """Constrain acceleration to physical limits."""
    return max(max_decel, min(accel, max_accel))

State Machine Pattern

Vehicle control often uses mode-based logic:

def determine_mode(lead_present, ttc, ttc_threshold):
    """
    Determine operating mode based on conditions.

    Returns one of: 'cruise', 'follow', 'emergency'
    """
    if not lead_present:
        return 'cruise'

    if ttc is not None and ttc < ttc_threshold:
        return 'emergency'

    return 'follow'

レビュー

まだレビューはありません。使ってみた感想をお寄せください。

同じリポジトリのスキル

概要と使いどころ

Redact text from PDF documents for blind review anonymization

日本語の概要は準備中です。原文の説明を表示しています。

agentscope-ai/PawBench1182026年8月3日 更新

Use this skill when reading sensor data from CSV files, writing simulation results to CSV, processing time-series data with pandas, or handling missing values in datasets.

日本語の概要は準備中です。原文の説明を表示しています。

agentscope-ai/PawBench1182026年8月3日 更新

DC power flow analysis for power systems. Use when computing power flows using DC approximation, building susceptance matrices, calculating line flows and loading percentages, or performing sensitivity analysis on transmission networks.

日本語の概要は準備中です。原文の説明を表示しています。

agentscope-ai/PawBench1182026年8月3日 更新

A library for building, validating, visualizing, and serializing dialogue graphs. Use this when parsing scripts or creating branching narrative structures.

日本語の概要は準備中です。原文の説明を表示しています。

agentscope-ai/PawBench1182026年8月3日 更新

docx

無料

Use this skill whenever the user wants to create, read, edit, or manipulate Word documents (.docx files). Triggers include: any mention of "Word doc", "word document", ".docx", or requests to produce professional documents with formatting like tables of contents, headings, page numbers, or letterheads. Also use when extracting or reorganizing content from .docx files, inserting or replacing images in documents, performing find-and-replace in Word files, working with tracked changes or comments, or converting content into a polished Word document. If the user asks for a "report", "memo", "letter", "template", or similar deliverable as a Word or .docx file, use this skill. Do NOT use for PDFs, spreadsheets, Google Docs, or general coding tasks unrelated to document generation.

日本語の概要は準備中です。原文の説明を表示しています。

agentscope-ai/PawBench1182026年8月3日 更新

Generator economic dispatch and cost optimization for power systems. Use when minimizing generation costs, computing optimal generator setpoints, calculating operating margins, or working with generator cost functions.

日本語の概要は準備中です。原文の説明を表示しています。

agentscope-ai/PawBench1182026年8月3日 更新

agentscope-ai のスキルをすべて見る

このスキルの問題を報告する