云服务器内容精选

  • 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) 父主题: 种子地图的逻辑场景样例(仿真器B)
  • straight 简述:地图场景为直道。lead_vehicle和主车Ego在主道上分别以40kph和Ego_InitSpeed_Ve0的初始速度一前一后行驶,Ego设定了目标在主道右2车道上的目标点Target_position,同时激活Ego控制器(控制器会影响Ego去往Target_position的寻路算法,但目前仿真器B尚不支持寻路动作acquire_position),控制器有时会根据lead_vehicle的位置更改主车Ego的速度。 地图文件(odr) scenario Straight: m_scene: scenery lane_width: length = [3m..4m] right_lane_num: int = [2, 3] bikeway: bool = [true, false] sidewalk: bool = [true, false] main_speed: speed = 60kph road_length: length = [550m, 600m] straight_1: straight with: keep(it.lane_width == lane_width) keep(it.left_lane_num == 0) keep(it.right_lane_num == right_lane_num) keep(it.bikeway == bikeway) keep(it.sidewalk == sidewalk) keep(it.main_speed == main_speed) keep(it.road_length == road_length) 场景文件(osc) import standard scenario Straight: # map map: map map.set_map_file("./straight.odr") # parameter Ego_InitSpeed_Ve0: speed = [55kph..60kph] Ego_InitPosition_LaneId: string = ['-1', '-2'] Ego_InitPosition_s: length = [0m..30m] Ego_Odr: odr_point = map.create_odr_point(road_id: '1', lane_id: Ego_InitPosition_LaneId, s: Ego_InitPosition_s, t: 0.0m) Ego_InitPosition: pose_3d with: keep(it.odr_point == Ego_Odr) m_distance: length = [50m..80m] LeadVehicle_Odr: odr_point = map.create_odr_point(road_id: '1', lane_id: '-1', s: m_distance, t: 0.0m) LeadVehicle_InitPosition: pose_3d with: keep(it.odr_point == LeadVehicle_Odr) Target_xyz: xyz_point = map.create_xyz_point(x: 450m, y: -4.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(position: LeadVehicle_InitPosition) lead_vehicle.assign_init_speed(40kph) Ego.activate_controller(true, true) Ego.acquire_position(target: Target_position) 父主题: 种子地图的逻辑场景样例(仿真器B)
  • straight 简述:地图场景为直道.lead_vehicle和主车Ego在主道上分别以40kph和Ego_InitSpeed_Ve0的初始速度一前一后行驶,Ego设定了目标在主道右2车道上的目标点Target_position,同时激活Ego控制器(控制器会影响Ego去往Target_position的寻路算法,但目前仿真器B尚不支持寻路动作acquire_position),控制器有时会根据lead_vehicle的位置更改主车Ego的速度. 地图文件(odr) scenario Straight: m_scene: scenery lane_width: length = [3m..4m] right_lane_num: int = [2, 3] bikeway: bool = [true, false] sidewalk: bool = [true, false] main_speed: speed = 60kph road_length: length = [550m, 600m] straight_1: straight with: keep(it.lane_width == lane_width) keep(it.left_lane_num == 0) keep(it.right_lane_num == right_lane_num) keep(it.bikeway == bikeway) keep(it.sidewalk == sidewalk) keep(it.main_speed == main_speed) keep(it.road_length == road_length) 场景文件(osc) import standard scenario Straight: # map map: map map.set_map_file("./straight.odr") # parameter Ego_InitSpeed_Ve0: speed = [55kph..60kph] Ego_InitPosition_LaneId: string = ['-1', '-2'] Ego_InitPosition_s: length = [0m..30m] Ego_Odr: odr_point = map.create_odr_point(road_id: '1', lane_id: Ego_InitPosition_LaneId, s: Ego_InitPosition_s, t: 0.0m) Ego_InitPosition: pose_3d with: keep(it.odr_point == Ego_Odr) m_distance: length = [50m..80m] LeadVehicle_Odr: odr_point = map.create_odr_point(road_id: '1', lane_id: '-1', s: m_distance, t: 0.0m) LeadVehicle_InitPosition: pose_3d with: keep(it.odr_point == LeadVehicle_Odr) Target_xyz: xyz_point = map.create_xyz_point(x: 450m, y: -4.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(position: LeadVehicle_InitPosition) lead_vehicle.assign_init_speed(40kph) Ego.activate_controller(true, true) Ego.acquire_position(target: Target_position) 父主题: 种子地图的逻辑场景样例(仿真器B)