SpeedLimitRule Class Reference

Rule describing speed limits. More...

#include <drake/automotive/maliput/api/rules/speed_limit_rule.h>

Public Types

enum  Severity { kStrict = 0, kAdvisory }
 Severity classification. More...
using Id = TypeSpecificIdentifier< class SpeedLimitRule >

Public Member Functions

 SpeedLimitRule (const Id &id, const LaneSRange &zone, Severity severity, double min, double max)
 Constructs a SpeedLimitRule. More...
Id id () const
 Returns the persistent identifier. More...
const LaneSRangezone () const
 Returns the zone to which this rule instance applies. More...
Severity severity () const
 Returns the severity of this rule instance. More...
double min () const
 Returns the minimum limit. More...
double max () const
 Returns the maximum limit. More...
Implements CopyConstructible, CopyAssignable, MoveConstructible, MoveAssignable
 SpeedLimitRule (const SpeedLimitRule &)=default
SpeedLimitRuleoperator= (const SpeedLimitRule &)=default
 SpeedLimitRule (SpeedLimitRule &&)=default
SpeedLimitRuleoperator= (SpeedLimitRule &&)=default

Detailed Description

Rule describing speed limits.

Each rule instance describes speed limits applied to a longitudinal portion of a Lane (which may be the entire length of the Lane). Each instance is tagged with a severity; multiple instances with different severities may apply to the same region of the road network.

Each instance mandates a maximum speed limit as well as a minimum speed limit. Since neither limit may be less than zero, a minimum limit of exactly zero is equivalent to having no minimum limit at all.

Member Typedef Documentation

◆ Id

Member Enumeration Documentation

◆ Severity

enum Severity

Severity classification.


A strict limit is the established mandatory limit.


An advisory limit is a recommendation, typically reflecting a road condition (e.g., a sharp curve).

Constructor & Destructor Documentation

◆ SpeedLimitRule() [1/3]

SpeedLimitRule ( const SpeedLimitRule )

◆ SpeedLimitRule() [2/3]

SpeedLimitRule ( SpeedLimitRule &&  )

◆ SpeedLimitRule() [3/3]

SpeedLimitRule ( const Id id,
const LaneSRange zone,
Severity  severity,
double  min,
double  max 

Constructs a SpeedLimitRule.

idthe unique ID of this rule (in the RoadRulebook)
zoneLaneSRange to which this rule applies
severitySeverity of the rule
minminimum speed
maxmaximum speed

min and max must be non-negative, and min must be less than or equal to max, otherwise a std::runtime_error is thrown.

Member Function Documentation

◆ id()

Id id ( ) const

Returns the persistent identifier.

◆ max()

double max ( ) const

Returns the maximum limit.

◆ min()

double min ( ) const

Returns the minimum limit.

◆ operator=() [1/2]

SpeedLimitRule& operator= ( SpeedLimitRule &&  )

◆ operator=() [2/2]

SpeedLimitRule& operator= ( const SpeedLimitRule )

◆ severity()

Severity severity ( ) const

Returns the severity of this rule instance.

◆ zone()

const LaneSRange& zone ( ) const

Returns the zone to which this rule instance applies.

The documentation for this class was generated from the following file: