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.

49 stars 5 forksOther

Install

skills CLI (Claude Code, Cursor, Codex and more)
npx skills add UCSB-NLP-Chang/Skill-Usage --skill vehicle-dynamics
Manual install
git clone --depth 1 https://github.com/UCSB-NLP-Chang/Skill-Usage.git /tmp/Skill-Usage
mkdir -p ~/.claude/skills
cp -r /tmp/Skill-Usage/tasks/adaptive-cruise-control/environment/skills/vehicle-dynamics ~/.claude/skills/vehicle-dynamics

Personal skills live in ~/.claude/skills. Use .claude/skills in a project folder to share a skill with your team.

From the SKILL.md

# Vehicle Dynamics Simulation

## Basic Kinematic Model

For vehicle simulations, use discrete-time kinematic equations.

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

**Position Update:**
```python
new_position = current_position + speed * dt
```

**Distance Between Vehicles:**
```python
# 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:

```python
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:

```python
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:
Read the full skill on GitHub

Details

Skill name
vehicle-dynamics
Path
tasks/adaptive-cruise-control/environment/skills/vehicle-dynamics/SKILL.md
Repo updated
8 April 2026

FAQ

What does the Vehicle Dynamics skill do?

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.

How do I install the Vehicle Dynamics skill?

skills CLI (Claude Code, Cursor, Codex and more): npx skills add UCSB-NLP-Chang/Skill-Usage --skill vehicle-dynamics. Skills go in ~/.claude/skills (personal) or .claude/skills (project), and Claude loads them automatically when a task matches the description.

Is Vehicle Dynamics popular?

It lives in UCSB-NLP-Chang/Skill-Usage, which has 49 GitHub stars and 5 forks.

Related skills

Browse the most popular Claude skills, all other skills, or write your own with the skills generator.