maliput_malidrive
|
Functor to build a RoadRulebook.
The rules API is composed of:
The building procedure is based on top a loader method provided by maliput: RoadRulebook loader with rule registry
The following rules are created and added programatically on top what the RoadRulebook YAML file describes.
#include <src/maliput_malidrive/builder/road_rulebook_builder.h>
Public Member Functions | |
RoadRuleBookBuilder (const maliput::api::RoadGeometry *rg, const maliput::api::rules::RuleRegistry *rule_registry, const std::optional< std::string > &road_rulebook_file_path) | |
Constructs a RoadRuleBook. More... | |
RoadRuleBookBuilder ()=delete | |
std::unique_ptr< const maliput::api::rules::RoadRulebook > | operator() () |
Builds a ManualRulebook. More... | |
Static Public Member Functions | |
static void | AddsXODRBasedRulesToRulebook (const maliput::api::RoadGeometry *rg, const maliput::api::rules::RuleRegistry *rule_registry, maliput::ManualRulebook *rulebook) |
Populates RoadRulebook using rule types previously defined in the RuleRegistry. More... | |
RoadRuleBookBuilder | ( | const maliput::api::RoadGeometry * | rg, |
const maliput::api::rules::RuleRegistry * | rule_registry, | ||
const std::optional< std::string > & | road_rulebook_file_path | ||
) |
Constructs a RoadRuleBook.
rg | is the pointer to the RoadGeometry. It must not be nullptr. |
rule_registry | is the pointer to the RuleRegistry. It must not be nullptr. |
road_rulebook_file_path | to the yaml file to load the RoadRulebook. |
maliput::assertion_error | When rg or rule_registry are nullptr. |
|
delete |
|
static |
Populates RoadRulebook using rule types previously defined in the RuleRegistry.
These rules' values are obtained from the XODR file description. They are of type:
See malidrive::builder::RuleRegistryBuilder for further information.
std::unique_ptr< const maliput::api::rules::RoadRulebook > operator() | ( | ) |
Builds a ManualRulebook.