src/map/map.cpp
/**
    write HD map as CSV file.

    @param map_filename The filename of HD map.
*/
write HD map as CSV file.
write HD map as CSV file .
void Map::write(std::string map_filename) {
    std::ofstream hd_map;
    hd_map.open(map_filename);
    hd_map << "x y s dx dy\n";
    size_t N = center_line_s.size();
    for (size_t i = 0; i < N; ++i) {
        hd_map << std::dec << center_line_x[i] << " ";
        hd_map << std::dec << center_line_y[i] << " ";
        hd_map << std::dec << center_line_s[i] << " ";
        hd_map << std::dec << center_line_dx[i] << " ";
        hd_map << std::dec << center_line_dy[i] << "\n";
    }
    hd_map.close();
}
void Map :: write ( std :: string map_filename ) { std :: ofstream hd_map ; hd_map . open ( map_filename ) ; hd_map << " \n " ; size_t N = center_line_s . size ( ) ; for ( size_t i = 0 ; i < N ; ++ i ) { hd_map << std :: dec << center_line_x [ i ] << " " ; hd_map << std :: dec << center_line_y [ i ] << " " ; hd_map << std :: dec << center_line_s [ i ] << " " ; hd_map << std :: dec << center_line_dx [ i ] << " " ; hd_map << std :: dec << center_line_dy [ i ] << " \n " ; } hd_map . close ( ) ; }
write HD map as CSV file.
write HD map as CSV file .
// write header: // write data: