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 utilised by this agent as a railroad track.
#include <src/agents/rail_car.h>
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 Diagram & | GetDiagram () 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... | |
|
explicit |
Rail car constructor.
diagram | The Diagram representation of the rail car agent. |
speed_setter | The speed setting system associated to the rail car agent. |
void SetSpeed | ( | double | new_speed_mps | ) |
Sets the speed of this agent.
new_speed_mps | The new speed for the agent, in meters per second. |