更新时间:2024-05-13 GMT+08:00
分享

触发条件 time_to_collision

假设语句中涉及的两个实体entity 都以当前速度移动,返回直到两者边界框bounding_box碰撞的时间(两车车距/两车相对距离).

  • 参数:
表1 time_to_collision参数

Parameter

Type

Mandatory

Description

reference

entity

yes

The reference entity.

使用方法:当距离两者碰撞的时间 > 或< 或== 某个值时,触发动作.

样例

m_profile: dynamics_shape = linear
do parallel:
    # Story
    serial:
        # action1:
        wait cut_in_vehicle.time_to_collision(reference:Ego) < 3s
        Ego.change_speed(target: 0.0mps, rate_profile: m_profile, rate_peak: -0.3mpss)
分享:

    相关文档

    相关产品