feat: Provide TrafficRule information to the groundtruth

Part of a 2-part repo change to provide TrafficRule in the OSI Ground Truth output:

  • MantleAPI: adds TrafficRule struct and LogicalLane::traffic_rules field
  • This PR: converts mantle_api::TrafficRule to OSI proto and writes it into the Ground Truth

In this PR:

  • FillLogicalLaneTrafficRule() iterates LogicalLane::traffic_rules and fills each OSI TrafficRule proto: speed limit value and unit, rule type, and the validity block.
  • New converters mapping mantle-api types to OSI proto equivalents:
    • ConvertTrafficRuleTypeToProtoTrafficRuleType: mantle_api::TrafficRule::TrafficRuleType → osi3::LogicalLane::TrafficRule::TrafficRuleType
    • ConvertGtGenTrafficSignValueUnitToOsi: mantle_api::TrafficSignValue::Unit → osi3::TrafficSignValue_Unit
    • ConvertEntityTypeToProtoEntityType: mantle_api::EntityType → osi3::MovingObject::Type
    • ConvertVehicleRoleToProtoVehicleRole: mantle_api::VehicleRole → osi3::MovingObject::VehicleClassification::Role
Edited by Pedro Henriques

Merge request reports

Loading
Loading