自动驾驶云服务 OCTOPUS-动作 change_lane

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

动作 change_lane

  • 动作主体:车辆vehicle
  • 结束时间:当动作主体actor 位于目标车道lane 中、目标偏移offset 处时,动作结束.
  • 是否支持modifier:否
  • 参数:参数如下表,支持关键字参数. rate_peak 和rate_profile 是必选项,用于设置osc1中的dynamics . target 和reference 必须设置且只设置其中之一,前者用于指定绝对车道,后者用于指定相对车道.
表1 change_lane参数

Parameter

Type

Mandatory

Description

number_of_lanes

uint

no

The target lane is "num_of_lanes" to the side of the reference entity. Use in conjunction with "side".

side

lane_change_side

no

Select on which side of the reference entity.

reference

entity

no

Default=it.actor. Reference to the entity that is used to determine the target lane. If this argument is omitted, the actor itself is used as reference.

offset

length

no

Default=0.0. Target offset from center of the target lane that the actor follows at the end of the action.

rate_profile

dynamics_shape

yes

Assign a shape for the change of the lateral position variable (t-axis). This profile affects the lateral velocity during action execution.

rate_peak

speed

yes

Target value for the peak lateral velocity that must be achieved during the action.

target

lane_id(uint)

no

The actor starts and finishes the action in the target lane.

  • 目标lane必须在地图上。
  • 中心线左侧的lane_id为正,如'1','2'.右侧的lane_id为负,如'-1','-3'.绝对值越大,距离中心线越远。
  • offset值不能超出当前所在lane的宽度范围。
  • 使用相对位置时,参考对象reference必须是车辆,否则仿真器A无法支持。
  • rate_profile只能选择linear或step。

绝对车道1

my_lane: lane with:
    keep(it.lane_id == '1')
m_profile: dynamics_shape = linear
side_vehicle.change_lane(target: my_lane, rate_profile: m_profile, rate_peak: 0.3mps)

绝对车道2

my_lane: lane with:
    keep(it.lane_id == '-1')
m_profile: dynamics_shape = linear
side_vehicle.change_lane(target: my_lane, offset: -0.2m, rate_profile: m_profile, rate_peak: 0.4mps)

相对车道1

m_profile: dynamics_shape = step
m_side: lane_change_side = left
m_profile: dynamics_shape = step
Ego.change_lane(number_of_lanes: 2, side: m_side, reference: side_vehicle, offset: 0.8m, rate_profile: m_profile, rate_peak: 0.3mps)

相对车道2

m_profile: dynamics_shape = step
m_side: lane_change_side = same
m_profile: dynamics_shape = step
Ego.change_lane(number_of_lanes: 1, reference: side_vehicle, side:m_side, rate_profile: m_profile, rate_peak: 0.3mps)
support.huaweicloud.com/usermanual-octopus/octopus-13-0028.html