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

触发条件 object_distance

返回语句中涉及的两个实体entity 之间的相对距离.

表1 object_distance参数

Parameter

Type

Mandatory

Description

reference

entity

yes

The reference entity.

direction

distance_direction

yes

Measure the distance in the x-coordinate/y-coordinate/xy-coordinate.

mode

distance_mode

yes

Use reference_points/bounding_boxes to measure the distance between the reference points/bounding boxes.

  • 使用方法:当动作主体与参考实体之间的距离 > 或< 或== 某个长度值时,触发动作.

样例

m_direction: distance_direction = euclidianDistance
m_mode: distance_mode = reference_points
do parallel:
    # Story
    serial:
        # action1: 
        wait lead_vehicle.object_distance(reference: Ego, direction: m_direction, mode: m_mode) < 5m
        Ego.activate_controller(true, true)
分享:

    相关文档

    相关产品