/install adaptive-cruise-control-vehicle-dynamics
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 \x3C= 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 \x3C ttc_threshold:
return 'emergency'
return 'follow'
- 确保已安装 OpenClaw(本地或 Docker 部署)
- 在对话框中输入安装命令:
/install adaptive-cruise-control-vehicle-dynamics - 安装完成后,直接呼叫该 Skill 的名称或使用
/adaptive-cruise-control-vehicle-dynamics触发 - 根据 Skill 的参数说明提供必要输入,即可获得结构化输出
vehicle-dynamics 是什么?
Use this skill when simulating vehicle motion, calculating safe following distances, time-to-collision, speed/position updates, or implementing vehicle state... 它是一个面向 Claude Code / OpenClaw 的 AI Agent Skill 插件,目前累计下载 99 次。
如何安装 vehicle-dynamics?
在 OpenClaw 或 Claude Code 对话框中运行命令「/install adaptive-cruise-control-vehicle-dynamics」即可一键安装,无需额外配置。
vehicle-dynamics 是免费的吗?
是的,vehicle-dynamics 完全免费,采用 MIT-0 许可证,可自由下载、安装和使用。
vehicle-dynamics 支持哪些平台?
vehicle-dynamics 跨平台运行,可在任意部署了 OpenClaw / Claude Code 的环境中使用(cross-platform)。
谁开发了 vehicle-dynamics?
由 wu-uk(@wu-uk)开发并维护,当前版本 v0.1.0。