自动驾驶云服务 OCTOPUS-split

时间:2024-10-30 16:07:55

split

简述:地图场景为匝道分流。lead_vehicle和主车Ego在主道的同一车道上分别以35kph和Ego_InitSpeed_Ve0的初始速度一前一后行驶,Ego设定了目标在匝道上的目标点Target_position,仿真开始后激活Ego控制器(控制器会影响Ego去往Target_position的寻路算法,但目前仿真器B尚不支持寻路动作acquire_position)。控制器有时会根据lead_vehicle的位置更改主车Ego的速度。

使用xyz坐标创建终点时,由于匝道地图泛化会使终点偏移,建议在创建测评任务时为检测终点设置合适的半径,例如"到达半径5m"。

地图文件(odr)

scenario Split:
    m_scene: scenery

    lane_width: length = [3m..4m]
    main_speed: speed = 120kph
    ramp_speed: speed = 60kph
    ramp_length: length = [300m..350m]
    road_aids_type: road_aids_type = "DType-2"

    split_1: split with:
        keep(it.lane_width == lane_width)
        keep(it.left_lane_num == 0)
        keep(it.right_lane_num == 3)
        keep(it.ramp_lane_num == 1)
        keep(it.main_speed == main_speed)
        keep(it.ramp_speed == ramp_speed)
        keep(it.radius_of_curvature == 200m)
        keep(it.ramp_length == ramp_length)
        keep(it.road_aids_type == road_aids_type)

场景文件(osc)

import standard

scenario Split:
    # map
    map: map
    map.set_map_file("./split.odr")

    # parameter
    Ego_InitSpeed_Ve0: speed = [90kph..110kph]
    Ego_InitPosition_LaneId: string = ['-1', '-2']
    Ego_InitPosition_s: length = [0m..100m]
    Ego_Odr: odr_point = map.create_odr_point(road_id: '10', lane_id: Ego_InitPosition_LaneId, s: Ego_InitPosition_s, t: 0.0m)
    Ego_InitPosition: pose_3d with:
        keep(it.odr_point == Ego_Odr)
    m_InitDistance: length = [60m..100m]
    Target_xyz: xyz_point = map.create_xyz_point(x: 445m, y: -46.5m ,z: 0.0m)
    Target_position: pose_3d with:
        keep(it.xyz_point == Target_xyz)
    Duration: time = 100s

    # entity
    Ego: vehicle with:
        keep(it.name == "Saimo")
        keep(it.initial_bm == "默认驾驶员")
    lead_vehicle: vehicle with:
        keep(it.name == "Saimo")
        keep(it.initial_bm == "默认驾驶员")

    # storyboard
    do parallel(duration: Duration):
        # init
        Ego.assign_init_position(position: Ego_InitPosition)
        Ego.assign_init_speed(Ego_InitSpeed_Ve0)
        lead_vehicle.assign_init_position() with:
            lane(same_as: Ego)
            position(distance: m_InitDistance, ahead_of: Ego)
        lead_vehicle.assign_init_speed(35kph)

        Ego.activate_controller(true, true)
        Ego.acquire_position(target: Target_position)
support.huaweicloud.com/usermanual-octopus/octopus-13-0089.html