delphyne
RailCar Class Reference

Detailed Description

An agent that follows roads as if they were railroad tracks.

The underlying road network has a reference line for each lane which is utilised by this agent as a railroad track.

#include <src/agents/rail_car.h>

Inheritance diagram for RailCar:
[legend]

Public Member Functions

 RailCar (Agent::Diagram *diagram, VectorSource< double > *speed_setter)
 Rail car constructor. More...
 
void SetSpeed (double new_speed_mps)
 Sets the speed of this agent. More...
 
- Public Member Functions inherited from AgentBase< T >
 AgentBase (Diagram *diagram)
 Constructs basic agent, associated with the given diagram. More...
 
virtual ~AgentBase ()=default
 
void SetContext (drake::systems::Context< T > *context)
 Resets this agent's Context to context. More...
 
const drake::systems::Context< T > & GetContext () const
 Gets a reference to the agent's Context. More...
 
drake::systems::Context< T > * GetMutableContext () const
 Gets a mutable reference to the agent's Context. More...
 
const DiagramGetDiagram () const
 Gets a reference to the agent's Diagram representation. More...
 
drake::systems::rendering::PoseVector< T > GetPose () const
 Gets the agent pose in the simulation. More...
 
drake::TwistVector< T > GetVelocity () const
 Gets the agent twist in the simulation. More...
 
const std::string & name () const
 Gets the agent name. More...
 
const std::set< drake::geometry::GeometryId > & GetGeometryIDs () const
 Gets a reference to the agent's geometry IDs. More...
 
virtual bool IsSourceOf (const drake::geometry::GeometryId &geometry_id) const
 Checks whether this agent is the source of the given geometry_id (i.e. More...
 

Additional Inherited Members

- Public Types inherited from AgentBase< T >
using Diagram = DiagramBundle< T >
 Diagram type for this agent. More...
 

Constructor & Destructor Documentation

◆ RailCar()

RailCar ( Agent::Diagram diagram,
VectorSource< double > *  speed_setter 
)
explicit

Rail car constructor.

Parameters
diagramThe Diagram representation of the rail car agent.
speed_setterThe speed setting system associated to the rail car agent.

Member Function Documentation

◆ SetSpeed()

void SetSpeed ( double  new_speed_mps)

Sets the speed of this agent.

Parameters
new_speed_mpsThe new speed for the agent, in meters per second.

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