maliput_malidrive
|
Functor to build a RoadRulebook.
The deprecated rule API is composed of.
Rules with the old API are built out of the YAML file and created maliput::api::rules::RightOfWayRules are used to create their analogous version as maliput::api::rules::DiscreteValueRules of type "Right-Of-Way-Rule" and "Vehicle-In-Stop-Behavior-Rule".
The following rules are created regardless the values of road_rulebook_file_path
and rule_registry
:
TODO(ToyotaResearchInstitute/maliput#108): remove RoadRulebook builder functor
#include <src/maliput_malidrive/builder/road_rulebook_builder_old_rules.h>
Public Member Functions | |
RoadRuleBookBuilderOldRules ()=delete | |
RoadRuleBookBuilderOldRules (const maliput::api::RoadGeometry *rg, const maliput::api::rules::RuleRegistry *rule_registry, const std::optional< std::string > &road_rulebook_file_path, const std::vector< maliput::api::rules::DirectionUsageRule > &direction_usage_rules, const std::vector< maliput::api::rules::SpeedLimitRule > &speed_limit_rules) | |
Constructs a RoadRuleBook. More... | |
std::unique_ptr< const maliput::api::rules::RoadRulebook > | operator() () |
Builds a ManualRulebook. More... | |
|
delete |
RoadRuleBookBuilderOldRules | ( | const maliput::api::RoadGeometry * | rg, |
const maliput::api::rules::RuleRegistry * | rule_registry, | ||
const std::optional< std::string > & | road_rulebook_file_path, | ||
const std::vector< maliput::api::rules::DirectionUsageRule > & | direction_usage_rules, | ||
const std::vector< maliput::api::rules::SpeedLimitRule > & | speed_limit_rules | ||
) |
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. |
direction_usage_rules | is a vector of DirectionUsageRules. |
speed_limit_rules | is a vector of SpeedLimitRules. |
maliput::assertion_error | When rg or rule_registry are nullptr. |
std::unique_ptr< const maliput::api::rules::RoadRulebook > operator() | ( | ) |
Builds a ManualRulebook.
Both Speed Limits Rules and Direction Usage Rules are added to the Rulebook after Rulebook yaml file is loaded.