delphyne
|
An agent that follows roads as if they were railroad tracks.
The underlying road network has a reference line for each lane which is utilized by this agent as a railroad track.
Initial position is specified in the lane longitudinal co-ordinate (how far along the track) and the agent will follow this track exactly - the only variance it is permitted is the speed with which it follows the track.
Right-of-Way rules are evaluated by the agent, consequently the speed of the agent will toggle between the desired speed and zero according to the current rule state.
#include <src/agents/rule_rail_car.h>
Public Member Functions | |
RuleRailCarBlueprint (const std::string &name, const maliput::api::Lane &lane, bool direction_of_travel, double longitudinal_position, double lateral_offset, double speed, double nominal_speed) | |
Constructs a blueprint to build a RuleRailCar into a simulation. More... | |
Public Member Functions inherited from TypedAgentBaseBlueprint< T, A > | |
const A & | GetAgent (const AgentSimulationBase< T > &simulation) const override |
Returns a reference to the agent associated with this blueprint inside the given simulation . More... | |
A * | GetMutableAgent (AgentSimulationBase< T > *simulation) override |
Returns a mutable reference to the agent associated with this blueprint inside the given simulation . More... | |
Public Member Functions inherited from AgentBaseBlueprint< T > | |
AgentBaseBlueprint (const std::string &name) | |
Constructs a blueprint for an agent with the given name. More... | |
virtual | ~AgentBaseBlueprint ()=default |
std::unique_ptr< AgentBase< T > > | BuildInto (maliput::api::RoadNetwork *road_network, drake::systems::DiagramBuilder< T > *builder) |
Builds the agen Agent's Diagram representation into the given builder of the containing simulation Diagram. More... | |
const std::string & | name () const |
Gets the name for the agent. More... | |
AgentBase< T >::Diagram * | GetMutableDiagram (AgentBase< T > *agent) const |
std::set< drake::geometry::GeometryId > * | GetMutableGeometryIDs (AgentBase< T > *agent) const |
Additional Inherited Members | |
Public Types inherited from AgentBaseBlueprint< T > | |
using | DiagramBuilder = AgentDiagramBuilder< T > |
Diagram builder type for this agent blueprint. More... | |
|
explicit |
Constructs a blueprint to build a RuleRailCar into a simulation.
name | Unique name for the agent. |
lane | The lane to start in. |
direction_of_travel | Designates whether the car will travel with or against the flow specified by the lane's rules |
longitudinal_position | Initial position on the lane's track (maliput lane coordinate, 's' (m)). |
lateral_offset | The offset perpendicular to the centre road line (maliput lane coordinate 'r' (m)). |
speed | The actual initial speed. |
nominal_speed | The desired cruising speed. |