更新时间:2024-07-03 GMT+08:00
分享

修饰器 speed

用途:设定动作主体actor 在当前阶段的速度. 可以修饰初始动作assign_init_speed .

参数

表1 speed参数

Parameter

Type

Mandatory

Description

speed

speed

no

A target speed value, including a speed unit.

faster_than

entity

no

set the speed target faster than another entity.

slower_than

entity

no

set the speed target slower than another entity.

same_as

entity

no

set the speed target same as another entity.

  • faster_than、slower_than和same_as必须设置且仅设置一个.
  • 使用faster_than和slower_than时配合speed来设置相对速度.

使用speed+faster_than

cut_in_vehicle.assign_init_speed() with:
    speed(speed: 5mps, faster_than: Ego)

使用speed+slower_than

cut_in_vehicle.assign_init_speed() with:
    speed(speed: 5mps, slower_than: Ego)

使用same_as

cut_in_vehicle.assign_init_speed() with:
    speed(same_as: Ego)
分享:

    相关文档

    相关产品