getProjectionPointOnLane
Get information about projection point on lane from RoadRunner HD Map
Since R2026a
Syntax
Description
gets the information about the projection point on the specified lane at the specified actor
pose projectionPointInfo = getProjectionPointOnLane(rrHDMapQuery,laneID,actorPose)actorPose within a RoadRunner HD Map using the RoadRunner HD Map query object rrHDMapQuery.
specifies the type of the actor pose.projectionPointInfo = getProjectionPointOnLane(rrHDMapQuery,laneID,actorPose,ActorPoseType=poseType)
Examples
Create an empty RoadRunner HD Map object.
rrHDMap = roadrunnerHDMap;
Specify the path to a RoadRunner HD Map binary file, and use the read function to populate the empty RoadRunner HD Map object with the map data.
Note: Replace the file path specified in this code block with the absolute path to an .rrhd file on your system.
filename = "C:\RR\MyProject\Exports\SimpleBankedRoad.rrhd";
read(rrHDMap,filename)Convert the RoadRunner HD Map object into a MATLAB structure.
rrHDMapStruct = convertToStruct(rrHDMap);
Create a RoadRunner HD Map query object using the RoadRunner HD Map structure.
rrHDMapQuery = roadrunnerHDMapQuery(rrHDMapStruct);
Specify a lane ID and a driving scenario-compatible actor pose structure. The structure must include the position, orientation, and velocity of an actor in the scenario.
laneID = "{de577e4a-213c-38d6-8ec5-04e4cd425e61}"; poseType = "drivingscenario"; actorPose = struct("ActorID",1,"Position",[-18.57 102.40 -2.76],"Velocity",[0 0 0],"Roll",0,"Pitch",0,"Yaw",92.09,"AngularVelocity",[0 0 0]);
Retrieve the information of road attributes at the specified actor pose from RoadRunner HD Map.
roadInfo= getProjectionPointOnLane(rrHDMapQuery,laneID,actorPose,ActorPoseType=poseType)
roadInfo = struct with fields:
Position: [-18.5709 102.4032 -2.7679]
Curvature: -0.0168
Heading: 0.2863
Banking: 0.1392
Grade: -0.0424
Input Arguments
RoadRunner HD Map query object, specified as a
roadrunnerHDMapQuery object.
Universal unique identifier (UUID) of the lane onto which to project the actor pose,
specified as a character vector or string scalar. The function projects the specified
actor pose actorPose onto the centerline of the this lane to get the
projection point.
Pose of an actor, specified as a structure. The pose of an actor represents the position, orientation, and velocity of the actor in a driving scenario or RoadRunner scenario.
If your actor information comes from a cuboid simulation environment, you must
specify an actor pose structure with these fields, and specify the
poseType argument as
"drivingScenario".
| Field Name | Description |
|---|---|
ActorID | Scenario-defined actor identifier, specified as a positive integer. |
Position | Position of the actor, specified as a real-valued vector of the form [x y z]. Units are in meters. |
Velocity | Velocity (v) of the actor in the x- y-, and z-directions, specified as a real-valued vector of the form [vx vy vz]. Units are in meters per second. |
Roll | Roll angle of the actor, specified as a real-valued scalar. Units are in degrees. |
Pitch | Pitch angle of the actor, specified as a real-valued scalar. Units are in degrees. |
Yaw | Yaw angle of the actor, specified as a real-valued scalar. Units are in degrees. |
AngularVelocity | Angular velocity (ω) of the actor in the x-, y-, and z-directions, specified as a real-valued vector of the form [ωx ωy ωz]. Units are in degrees per second. |
If your actor information comes from a RoadRunner Scenario simulation environment,
you must specify an actor pose structure with these fields, and specify the
poseType argument as "roadrunner".
| Field Name | Description |
|---|---|
ActorID | Scenario-defined actor identifier, specified as an integer of data type
uint64. |
Pose | Position and orientation of the actor, specified as a 4-by-4 matrix. For more information, see What Is a RoadRunner Pose Matrix?. |
Velocity | Actor velocity in the x-, y- and z- directions, specified as a 1-by-3 vector. Units are in meters per second. |
AngularVelocity | Angular velocity of the actor in the x-, y- and z- directions, specified as a 1-by-3 vector. Units are in radians per second. |
Type of the actor pose, specified as "drivingscenario" or
"roadrunner". This argument determines which fields the
getProjectionPointOnLane function expects in the structure
specified to the actorPose argument. For more information, see
actorPose.
Output Arguments
Projection point information for the specified lane at the specified actor pose, returned as a structure with these fields.
| Field Name | Description |
|---|---|
Coordinates | Coordinates of the projection point, returned as a real-valued vector of the form [x y z]. |
Heading | Heading angle of the lane at the projection point, returned as a real-valued scalar. Units are in radians. |
Grade | Grade of the road at the projection point, returned as a real-valued scalar. Units are in radians. |
Banking | Banking angle of the road at the projection point, returned as a real-valued scalar. Units are in radians. |
Extended Capabilities
C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.
Version History
Introduced in R2026a
See Also
roadrunnerHDMap | roadrunnerHDMapQuery | convertToStruct | getLane | getNeighborLanes | getRoadTerrain | read
MATLAB Command
You clicked a link that corresponds to this MATLAB command:
Run the command by entering it in the MATLAB Command Window. Web browsers do not support MATLAB commands.
Seleccione un país/idioma
Seleccione un país/idioma para obtener contenido traducido, si está disponible, y ver eventos y ofertas de productos y servicios locales. Según su ubicación geográfica, recomendamos que seleccione: .
También puede seleccionar uno de estos países/idiomas:
Cómo obtener el mejor rendimiento
Seleccione China (en idioma chino o inglés) para obtener el mejor rendimiento. Los sitios web de otros países no están optimizados para ser accedidos desde su ubicación geográfica.
América
- América Latina (Español)
- Canada (English)
- United States (English)
Europa
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom (English)