Main Content


Read HD Map from binary file using MATLAB

Since R2022b



    read(rrMap,filename) reads the RoadRunner HD Map from a binary file specified by filename and populates the rrMap object with the map data. Specify the extension of the file as .rrhd.


    collapse all

    Create an empty RoadRunner HD Map by calling the roadrunnerHDMap object.

    rrMap = roadrunnerHDMap;

    Specify the name of the binary file you want to read. Use the read function to read the file specified by the argument filename.

    filename = "C:\RR\MyProject\Scenes\MyMap.rrhd";

    Input Arguments

    collapse all

    RoadRunner HD Map road data model, specified as a roadrunnerHDMap object. rrMap defines a simple data structure to represent road layouts using lanes, lane boundaries, lane markings, and junctions. This object provides functions that support reading, writing, and plotting HD map data.

    File name to read the map data from, specified as a character vector or string scalar. This argument specifies the absolute or relative path to the binary file you want to read. If you specify a relative path, then the path is relative to the Scenes folder of the current project. filename must end with .rrhd.

    Example: read(rrMap,"MyMap.rrhd") reads the map data from the MyMap.rrhd binary file.

    Data Types: char | string

    Version History

    Introduced in R2022b