主要内容

Cuboid To 3D Simulation

Convert actor from cuboid coordinates to 3D simulation coordinates

  • Library:
  • Automated Driving Toolbox / Driving Scenario and Sensor Modeling

  • Cuboid到3D模拟块

描述

TheCuboid To 3D Simulation块在世界坐标中转换一个立方演员的姿势X,Y, 和Yaw坐标Simulation 3D Vehicle with Ground Following堵塞。使用转换的值在3D模拟环境中设置车辆位置,用于使用该参与者创建的参与者驾驶场景设计师应用程序。场景的地形决定了卷(x-axis rotation), pitch (y-axis rotation), and elevation (z-axis position) of the vehicle.

您可以指定包含单个演员姿势或多个演员姿势的总线。默认情况下,块将在公共汽车中转换第一名演员的姿势。要指定您要转换姿势的演员,请指定ActorIDof that actor.

In cuboid and 3D simulation driving scenarios, the coordinate systems are the same, but the origins of vehicles differ. In cuboid driving scenarios, the vehicle origin is on the ground, under the center of the rear axle. The block transforms this origin to the origin used in the 3D simulation environment, which is under the geometric center of the vehicle. The table shows the origin difference between the two environments.

Cuboid Vehicle Origin 3D Simulation Vehicle Origin

Cuboid车辆蓝色,后轴的中心起源

3D仿真车辆红色,原点位于车辆的几何中心

端口

输入

expand all

Cuboid actor pose in world coordinates, specified as a Simulink bus containing a MATLAB structure.

获得这个结构输入,使用Scenario Reader从场景中读取演员。默认情况下,Scenario Readerblock outputs actors in ego vehicle coordinates. To convert these poses from ego vehicle to world coordinates, use the到世界的车辆堵塞。

The structure in this bus can contain a single actor pose or multiple actor poses.

单置结构

To specify a single actor pose, the structure must contain these fields.

Field 描述
ActorID

Scenario-defined actor identifier, specified as a positive integer.

位置

位置of actor, specified as a real-valued vector of the form [xyz]。单位为米。

速度

速度(v)演员x-y- ,,andz-directions, specified as a real-valued vector of the form [vxvyvz]。Units are in meters per second.

Roll

Roll angle of actor, specified as a real-valued scalar. Units are in degrees.

沥青

沥青angle of actor, specified as a real-valued scalar. Units are in degrees.

Yaw

偏航角of actor, specified as a real-valued scalar. Units are in degrees.

AngularVelocity

Angular velocity (ω)演员x- ,,y- ,,andz-directions, specified as a real-valued vector of the form [ωxωyωz]。Units are in degrees per second.

多置置结构

To specify multiple actor poses, the structure must contain these fields.

Field 描述 类型
数字 演员人数 非负整数
Time Current simulation time 实价标量
演员 Actor poses 数字- 演员姿势结构的长度阵列

Each actor pose structure in演员must have these fields.

Field 描述
ActorID

Scenario-defined actor identifier, specified as a positive integer.

位置

位置of actor, specified as a real-valued vector of the form [xyz]。单位为米。

速度

速度(v)演员x-y- ,,andz-directions, specified as a real-valued vector of the form [vxvyvz]。Units are in meters per second.

Roll

Roll angle of actor, specified as a real-valued scalar. Units are in degrees.

沥青

沥青angle of actor, specified as a real-valued scalar. Units are in degrees.

Yaw

偏航角of actor, specified as a real-valued scalar. Units are in degrees.

AngularVelocity

Angular velocity (ω)演员x- ,,y- ,,andz-directions, specified as a real-valued vector of the form [ωxωyωz]。Units are in degrees per second.

The block converts only one pose from the演员array. To specify which pose to convert, selectSpecify Actor ID, 和then specify theActorIDof the actor by using the用于转换的actoridparameter.

Output

expand all

Longitudinal position of the actor in 3D simulation coordinates, returned as a numeric scalar. Units are in meters.

In this coordinate system, when looking in the positive direction of theX- 轴,积极Y- 轴向点,Z-axis points up.

指定X- 车辆在3D模拟环境中的位置,将此端口连接到Xinput port of aSimulation 3D Vehicle with Ground Following堵塞。

演员在3D模拟坐标中的横向位置,作为数字标量返回。单位为米。

In this coordinate system, when looking in the positive direction of theX- 轴,积极Y- 轴向点,Z-axis points up.

指定Y- 车辆在3D模拟环境中的位置,将此端口连接到Yinput port of aSimulation 3D Vehicle with Ground Following堵塞。

演员的偏航方向角Z-axis in 3D simulation coordinates, returned as a numeric scalar. Units are in degrees.

In this coordinate system, when looking in the positive direction of theZ- 轴,偏航是顺时针阳性的。但是,如果您从2D自上而下的角度查看模拟,则偏航是逆时针阳性的,因为您正在沿负面观看场景Z-axis.

要在3D模拟环境中指定车辆的偏航方向角,请将此端口连接到Yawinput port of aSimulation 3D Vehicle with Ground Following堵塞。

Parameters

expand all

Select this parameter to enable the用于转换的actoridparameter, where you can specify theActorIDof the cuboid actor pose to convert to 3D simulation coordinates.

如果清除此参数,则块将转换为输入中的第一个演员姿势Actor公共汽车。

ActorIDCuboid Actor的值转换为3D模拟坐标,指定为正整数。此参数必须是有效的ActorID从输入Actor公共汽车。

Dependencies

To enable this parameter, selectSpecify Actor ID.

  • 解释执行— Simulate the model using the MATLAB interpreter. This option shortens startup time. In解释执行模式,您可以调试块的源代码。

  • 代码生成— Simulate the model using generated C/C++ code. The first time you run a simulation, Simulink generates C/C++ code for the block. The C code is reused for subsequent simulations as long as the model does not change. This option requires additional startup time.

Extended Capabilities

C/C ++代码生成
Generate C and C++ code using Simulink® Coder™.

Version History

Introduced in R2020a