Skip to content

Commit b9d108b

Browse files
lemmer-fzipmai
authored andcommitted
Added draft for traffic rule and speed limit.
Signed-off-by: Markus Lemmer <lemmer@fzi.de>
1 parent 3524cb1 commit b9d108b

File tree

1 file changed

+117
-0
lines changed

1 file changed

+117
-0
lines changed

osi_logicallane.proto

Lines changed: 117 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ syntax = "proto2";
33
option optimize_for = SPEED;
44

55
import "osi_common.proto";
6+
import "osi_object.proto";
67

78
package osi3;
89

@@ -587,6 +588,10 @@ message LogicalLane
587588
//
588589
optional string street_name = 16;
589590

591+
// A list of traffic rules on the lane.
592+
//
593+
repeated TrafficRule traffic_rule = 17;
594+
590595
//
591596
// Definition of available lane types.
592597
//
@@ -822,5 +827,117 @@ message LogicalLane
822827
//
823828
optional double end_s_other = 5;
824829
}
830+
831+
//
832+
// Describes traffic rules on a lane.
833+
// The traffic rule can thereby induced by regulations, traffic signs
834+
// or by other means. If the modeled traffic rule is induced by a traffic sign
835+
// the information should be identical with the respective traffic sign.
836+
//
837+
// Note: Every instance should be corresponding to only one specific rule.
838+
// The type of the traffic rule should be set using the respective filed.
839+
// Additionally, every message should contain the traffic rule validity information
840+
// and the respective field for the respective traffic rule type.
841+
//
842+
// Note: Each traffic rule corresponds to only one lane. If the traffic rule
843+
// is also valid on adjacent/successing/predecessing lanes it needs to be
844+
// specified for each lane individually.
845+
//
846+
// \brief Logical Model of a traffic rule on a lane.
847+
//
848+
message TrafficRule {
849+
850+
// The type of the traffic rule.
851+
//
852+
// This specifies the type of the traffic rule to be modeled.
853+
// Based on the type the respective message containing the information
854+
// corresponding to the traffic rule should be filled.
855+
//
856+
optional TrafficRuleType traffic_rule_type = 1;
857+
858+
// The validity information of the traffic rule.
859+
//
860+
optional TrafficRuleValidity traffic_rule_validity = 2;
861+
862+
// Traffic rule information for traffic rule of type speed limit.
863+
//
864+
optional SpeedLimit speed_limit = 3;
865+
866+
//
867+
// The type of the the traffic rule.
868+
//
869+
enum TrafficRuleType {
870+
871+
// Traffic rule is of type speed limit
872+
//
873+
TRAFFIC_RULE_TYPE_SPEED_LIMIT = 0;
874+
}
875+
876+
//
877+
// \brief Validity information for a traffic rule.
878+
//
879+
message TrafficRuleValidity {
880+
881+
//
882+
// The starting point of the traffic rule validity on the lane.
883+
// Must be in range [\c sStart,\c sEnd] of the reference line.
884+
//
885+
optional double start_s = 1;
886+
887+
//
888+
// The ending point of the traffic rule validity on the lane.
889+
// Must be in range [\c sStart,\c sEnd] of the reference line.
890+
// Note: Should always be greater than the starting point.
891+
//
892+
optional double end_s = 2;
893+
894+
//
895+
// List of vehicle types for which the speed limit is valid.
896+
// If the traffic rule validity is independent of the vehicle type
897+
// the list should be empty.
898+
//
899+
repeated MovingObject.VehicleClassification.Type valid_for_type = 3;
900+
}
901+
902+
//
903+
// \brief Speed limit on a lane.
904+
//
905+
message SpeedLimit {
906+
907+
//
908+
// The speed limit in the unit specified by the respective files
909+
//
910+
optional double speed_limit = 1;
911+
912+
//
913+
// The unit in which the speed limit is specified.
914+
//
915+
optional Unit speed_limit_unit = 2;
916+
917+
// Unit of the specified speed limit.
918+
//
919+
enum Unit
920+
{
921+
// Meters per second.
922+
//
923+
// Unit: km/h
924+
//
925+
UNIT_METER_PER_SECOND = 1;
926+
927+
// Kilometers per hour.
928+
//
929+
// Unit: km/h
930+
//
931+
UNIT_KILOMETER_PER_HOUR = 2;
932+
933+
// Miles per hour.
934+
//
935+
// Unit: mph
936+
//
937+
UNIT_MILE_PER_HOUR = 3;
938+
}
939+
}
940+
}
941+
825942
}
826943

0 commit comments

Comments
 (0)