云服务器内容精选

  • pose_3d 定义:三维空间的复合位置,包含位置点(odr_point或position_3d或road_point)和方向(orientation_3d)两个参数 用途:设置实体的初始位置(assign_init_speed动作)、目标位置(acquire_position动作) 参数:参数如下表 表6 pose_3d参数 Parameter Type Mandatory Description xyz_point xyz_point no a pose in space specified in Cartesian (XYZ) coordinates odr_point odr_point no a point expressed in ASAM OpenDRIVE coordinates road_point road_point no a point on route network specified in S-T coordinates orientation orientation_3d no three-dimensional orientation xyz_point、odr_point和road_point必须设置且仅设置一个,用以提供位置信息。 orientation非必选项,当不设置orientation时,对应roll、pitch、yaw均为0时的方向。 使用xyz_point、设置orientation my_xyz: xyz_point = map.create_xyz_point(x: 150.0m, y: 200.0m ,z: 0.0m) m_orientation: orientation_3d with: keep(it.roll == 0.0rad) keep(it.pitch == 0.0rad) keep(it.yaw == 1.57rad) my_pose: pose_3d with: keep(it.xyz_point == my_xyz) keep(it.orientation == m_orientation) 使用odr_point、不设置orientation my_odr: odr_point = map.create_odr_point(road_id: '1',lane_id:'-2',s: 3.0m, t: 0.0m) my_pose: pose_3d with: keep(it.odr_point == my_odr) 使用road_point、不设置orientation my_road: road_point with keep(it.road_id == '1') keep(it.s == 5.0m) keep(it.t == 0.0m) my_pose: pose_3d with: keep(it.road_point == my_road)
  • orientation_3d 定义:由Tait–Bryan角度的三个参数roll(横滚角,围绕x轴的角度)、pitch(俯仰角,围绕y轴的角度)和yaw(偏航角,围绕z轴的角度)定义的三维角度。 用途:设置实体的朝向角度、用于构成pose_3d。 参数:参数如下表 表5 orientation_3d参数 Parameter Type Mandatory Description roll angle yes rotation angle around the x-axis pitch angle yes rotation angle around the y-axis yaw angle yes rotation angle around the z-axis 根据ISO 8855的定义,角度旋转的顺序是:首先进行yaw(围绕z轴)、接着pitch(围绕新y轴),最后roll(围绕新x轴)。 当实体的朝向与road0的方向相同时,无需设置orientation_3d。 angle的单位一般为rad(弧度)而非degree(角度),rad = degree*pi/180,1rad约等于57.3度(详见scalar units中的angle units一节)。 与road 0的方向相反(相差180°) m_orientation: orientation_3d with: keep(it.roll == 0.0rad) keep(it.pitch == 0.0rad) keep(it.yaw == 3.14rad)
  • position_3d 定义:笛卡尔(XYZ)坐标系中的三维位置(position)。 用途:设置坐标系中的三维位置,用于构成xyz_point。 参数:参数如下表 表1 position_3d参数 Parameter Type Mandatory Description x length yes position on the x-axis y length yes position on the y-axis z length yes position on the z-axis 代码样例 my_position: position_3d with: keep(it.x == 150.0m) keep(it.y == 200.0m) keep(it.z == 0.0m)
  • xyz_point 定义:笛卡尔(XYZ)坐标系中的特定位置点(point)。 用途:设置实体位置,用于构成pose_3d。 参数:参数如下表 表2 xyz_point参数 Parameter Type Mandatory Description position position_3d yes Position in Cartesian (XYZ) coordinates keep创建 my_pos: position_3d with: keep(it.x == 150.0m) keep(it.y == 200.0m) keep(it.z == 0.0m) my_xyz: xyz_point with: keep(it.position == my_pos) create创建 my_xyz: xyz_point = map.create_xyz_point(x: 150.0m, y: 200.0m ,z: 0.0m)
  • road_point 定义:路网s-t坐标系中的特定位置点(point)。 用途:设置实体位置,用于构成pose_3d。 参数:参数如下表 表3 road_point参数 Parameter Type Mandatory Description road_id string yes identifier for the road in which this point is located s length yes Coordinate along the s-axis of the corresponding road t length yes Coordinate along the t-axis of the corresponding road keep创建 my_road: road_point with keep(it.road_id == '1') keep(it.s == 5.0m) keep(it.t == 0.0m) create创建 my_point: road_point = map.create_road_point(road_id: '1', s: 5.0m, t: 0.0m)
  • odr_point 定义:ASAM OpenDRIVE坐标系中的位置点(point)。 用途:设置实体位置,用于构成pose_3d。 参数:参数如下表 表4 odr_point参数 Parameter Type Mandatory Description road_id string yes ASAM OpenDRIVE identifier for the road lane_id string yes ASAM OpenDRIVE identifier for the lane s length yes Coordinate along the ASAM OpenDRIVE s-axis t length yes Coordinate along the ASAM OpenDRIVE t-axis, the t-coordinate is measured from the lane centerline keep创建 my_odr: odr_point with: keep(it.road_id == '1') keep(it.lane_id == '-2') keep(it.s == 3.0m) keep(it.t == 0.0m) create创建 my_odr: odr_point = map.create_odr_point(road_id: '1',lane_id:'-2',s: 3.0m, t: 0.0m)
  • Scalar Units Units单位详解: speed units SPEED_UNIT = { "meter_per_second": 1.0, "mps": 1.0, "kilometer_per_hour": 0.277777778, "kmph": 0.277777778, "kph": 0.277777778, "mile_per_hour": 0.447038889, "mph": 0.447038889, "miph": 0.447038889, "mmph": 0.000000278, "millimeter_per_hour": 0.000000278 } acceleration units ACCELERATION_UNIT = { "meter_per_sec_sqr": 1.0, "mpsps": 1.0, "mpss": 1.0, "kilometer_per_hour_per_sec": 0.5270462769, "kmphps": 0.5270462769, "mile_per_hour_per_sec": 0.6686096686, "miphps": 0.6686096686 } length units LENGTH_UNIT = { "nanometer": 0.000000001, "nm": 0.000000001, "micrometer": 0.000001, "millimeter": 0.001, "mm": 0.001, "centimeter": 0.01, "cm": 0.01, "meter": 1.0, "m": 1.0, "kilometer": 1000.0, "km": 1000.0, "inch": 0.0254, "feet": 0.3048, "mile": 1609.344, "mi": 1609.344 } time units TIME_UNIT = { "millisecond": 0.001, "ms": 0.001, "second": 1.0, "sec": 1.0, "s": 1.0, "minute": 60.0, "min": 60.0, "hour": 3600.0, "h": 3600.0 } angle units ANGLE_UNIT = { "degree": 57.295779513, "deg": 57.295779513, "radian": 1.0, "rad": 1.0 } 父主题: 附录(Appendix)
  • ALKS样例 根据官方提供的ALKS样例,提供了一些osc2.0的场景(osc文件)及其适用于仿真器A的转化结果(xosc文件)。考虑到仿真器A的支持程度,建议在转换时选择osc1.0版本. FreeDriving FullyBlockingTarget PartiallyBlockingTarget FollowLeadVehicleEmergencyBrake CutInNoCollision CutInUnavoidableCollision CutOutFullyBlocking CutOutMultipleBlockingTargets ForwardDetectionRange 逻辑场景(以CutOutMultipleBlockingTargets为例) 父主题: 附录 Appendix
  • Struct struct类型,又称结构类型,是一种由简单类型(例如int、float、string类型,scalar类型,简单的struct类型等)构建的复杂类型,一般用于表示抽象的道路结构,与地图文件中的具体的道路结构建立关联.osc2.0支持的struct类型有:odr_point、position_3d、road_point、orientation_3d和pose_3d position_3d xyz_point road_point odr_point orientation_3d pose_3d 父主题: 附录 Appendix
  • Scalar Units speed units。 SPEED_UNIT = { "meter_per_second": 1.0, "mps": 1.0, "kilometer_per_hour": 0.277777778, "kmph": 0.277777778, "kph": 0.277777778, "mile_per_hour": 0.447038889, "mph": 0.447038889, "miph": 0.447038889, "mmph": 0.000000278, "millimeter_per_hour": 0.000000278 } acceleration units。 ACCELERATION_UNIT = { "meter_per_sec_sqr": 1.0, "mpsps": 1.0, "mpss": 1.0, "kilometer_per_hour_per_sec": 0.5270462769, "kmphps": 0.5270462769, "mile_per_hour_per_sec": 0.6686096686, "miphps": 0.6686096686 } length units。 LENGTH_UNIT = { "nanometer": 0.000000001, "nm": 0.000000001, "micrometer": 0.000001, "millimeter": 0.001, "mm": 0.001, "centimeter": 0.01, "cm": 0.01, "meter": 1.0, "m": 1.0, "kilometer": 1000.0, "km": 1000.0, "inch": 0.0254, "feet": 0.3048, "mile": 1609.344, "mi": 1609.344 } time units。 TIME_UNIT = { "millisecond": 0.001, "ms": 0.001, "second": 1.0, "sec": 1.0, "s": 1.0, "minute": 60.0, "min": 60.0, "hour": 3600.0, "h": 3600.0 } angle units。 ANGLE_UNIT = { "degree": 57.295779513, "deg": 57.295779513, "radian": 1.0, "rad": 1.0 } 父主题: 附录 Appendix