maliput_viz
RoadNetworkQuery Class Reference

Detailed Description

Query and logs results to RoadGeometry or RoadRulebook minimizing the overhead of getting the right calls / asserting conditions.

#include <src/maliput_viz/plugins/maliput_viewer_model.hh>

Public Member Functions

 RoadNetworkQuery (std::ostream *out, maliput::api::RoadNetwork *rn)
 Constructs a RoadNetworkQuery. More...
 
void FindRoadPositions (const maliput::api::InertialPosition &inertial_position, double radius)
 Redirects inertial_position and radius to RoadGeometry::FindRoadPosition(). More...
 
void ToInertialPosition (const maliput::api::LaneId &lane_id, const maliput::api::LanePosition &lane_position)
 Redirects lane_position to lane_id's Lane::ToInertialPosition(). More...
 
void ToSegmentPosition (const maliput::api::LaneId &lane_id, const maliput::api::InertialPosition &inertial_position)
 Redirects inertial_position to lane_id's Lane::ToSegmentPosition(). More...
 
void ToRoadPosition (const maliput::api::InertialPosition &inertial_position)
 Redirects inertial_position to RoadGeometry::ToRoadPosition(). More...
 
void GetMaxSpeedLimit (const maliput::api::LaneId &lane_id)
 Looks for all the maximum speed limits allowed at lane_id. More...
 
void GetDirectionUsage (const maliput::api::LaneId &lane_id)
 Looks for all the direction usages at lane_id. More...
 
void GetRightOfWay (const maliput::api::LaneSRange &lane_s_range)
 Gets all right-of-way rules for the given lane_s_range. More...
 
void GetState (const maliput::api::rules::Rule::State &state)
 Gets all the rule states for the given state. More...
 
void GetRangeValue (const maliput::api::LaneId &lane_id)
 Gets all the range value rules for the given lane_id. More...
 
void GetDiscreteValue (const maliput::api::LaneId &lane_id)
 Gets all discrete value rules for the given lane_id. More...
 
void GetPhaseRightOfWay (const maliput::api::rules::PhaseRing::Id &phase_ring_id, const maliput::api::rules::Phase::Id &phase_id)
 Gets all right-of-way rules' states for a given phase in a given phase ring. More...
 

Constructor & Destructor Documentation

◆ RoadNetworkQuery()

RoadNetworkQuery ( std::ostream *  out,
maliput::api::RoadNetwork *  rn 
)

Constructs a RoadNetworkQuery.

Parameters
outA pointer to an output stream where results will be logged. It must not be nullptr.
rnA pointer to a RoadNetwork. It must not be nullptr.
Exceptions
std::runtime_errorWhen out or rn are nullptr.

Member Function Documentation

◆ FindRoadPositions()

void FindRoadPositions ( const maliput::api::InertialPosition &  inertial_position,
double  radius 
)

Redirects inertial_position and radius to RoadGeometry::FindRoadPosition().

◆ GetDirectionUsage()

void GetDirectionUsage ( const maliput::api::LaneId &  lane_id)

Looks for all the direction usages at lane_id.

◆ GetDiscreteValue()

void GetDiscreteValue ( const maliput::api::LaneId &  lane_id)

Gets all discrete value rules for the given lane_id.

◆ GetMaxSpeedLimit()

void GetMaxSpeedLimit ( const maliput::api::LaneId &  lane_id)

Looks for all the maximum speed limits allowed at lane_id.

◆ GetPhaseRightOfWay()

void GetPhaseRightOfWay ( const maliput::api::rules::PhaseRing::Id &  phase_ring_id,
const maliput::api::rules::Phase::Id &  phase_id 
)

Gets all right-of-way rules' states for a given phase in a given phase ring.

◆ GetRangeValue()

void GetRangeValue ( const maliput::api::LaneId &  lane_id)

Gets all the range value rules for the given lane_id.

◆ GetRightOfWay()

void GetRightOfWay ( const maliput::api::LaneSRange &  lane_s_range)

Gets all right-of-way rules for the given lane_s_range.

◆ GetState()

void GetState ( const maliput::api::rules::Rule::State &  state)

Gets all the rule states for the given state.

◆ ToInertialPosition()

void ToInertialPosition ( const maliput::api::LaneId &  lane_id,
const maliput::api::LanePosition &  lane_position 
)

Redirects lane_position to lane_id's Lane::ToInertialPosition().

◆ ToRoadPosition()

void ToRoadPosition ( const maliput::api::InertialPosition &  inertial_position)

Redirects inertial_position to RoadGeometry::ToRoadPosition().

◆ ToSegmentPosition()

void ToSegmentPosition ( const maliput::api::LaneId &  lane_id,
const maliput::api::InertialPosition &  inertial_position 
)

Redirects inertial_position to lane_id's Lane::ToSegmentPosition().


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