自动驾驶云服务 OCTOPUS-修饰器 speed

时间:2024-09-06 18:25:52

修饰器 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)
support.huaweicloud.com/usermanual-octopus/octopus-13-0034.html