make build
cd build
cmake ..
make -j4
- find package
pkg_check_modules(OpenDriveCpp REQUIRED opendrive-cpp)
include_directories(
${OpenDriveCpp_INCLUDE_DIRS}
)
link_directories(
${OpenDriveCpp_LIBRARY_DIRS}
)
target_link_libraries(${TARGET_NAME}
${OpenDriveCpp_LIBRARIES}
)
- parse xodr file
#include <opendrive-cpp/opendrive.h>
const std::string file_path = "town.xodr";
opendrive::Parser parser;
auto ele_map = std::make_shared<opendrive::element::Map>();
parser.ParseMap(file_path, ele_map);