delphyne
AgentBaseBlueprint< T > Class Template Referenceabstract

Detailed Description

template<typename T>
class delphyne::AgentBaseBlueprint< T >

The abstract blueprint class for agents in Delphyne.

This is the abstract class that all Delphyne agent blueprints must inherit from. Concrete implementations are required to implement the DoBuildInto() method, to build each agent sensor-planner-control systems into a a simulation's diagram.

Template Parameters
TOne of double, delphyne::AutoDiff or delphyne::Symbolic.

#include <include/delphyne/mi6/agent_base_blueprint.h>

Inheritance diagram for AgentBaseBlueprint< T >:
[legend]

Public Types

using DiagramBuilder = AgentDiagramBuilder< T >
 Diagram builder type for this agent blueprint. More...
 

Public Member Functions

 AgentBaseBlueprint (const std::string &name)
 Constructs a blueprint for an agent with the given name. More...
 
virtual ~AgentBaseBlueprint ()=default
 
virtual const AgentBase< T > & GetAgent (const AgentSimulationBase< T > &simulation) const
 Returns a reference to the agent associated with this blueprint inside the given simulation. More...
 
virtual AgentBase< T > * GetMutableAgent (AgentSimulationBase< T > *simulation)
 Returns a mutable reference to the agent associated with this blueprint inside the given simulation. More...
 
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
 

Member Typedef Documentation

◆ DiagramBuilder

Diagram builder type for this agent blueprint.

Constructor & Destructor Documentation

◆ AgentBaseBlueprint()

AgentBaseBlueprint ( const std::string &  name)
explicit

Constructs a blueprint for an agent with the given name.

Parameters
nameThe name for the agent, must be unique in any given simulation.

◆ ~AgentBaseBlueprint()

virtual ~AgentBaseBlueprint ( )
virtualdefault

Member Function Documentation

◆ BuildInto()

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.

Parameters
road_networkA maliput::api::RoadNetwork pointer.
builderThe builder for the simulation Diagram.
Returns
Ownership of the agent just built.
Exceptions
std::runtime_errorif builder is nullptr.

◆ GetAgent()

virtual const AgentBase<T>& GetAgent ( const AgentSimulationBase< T > &  simulation) const
virtual

Returns a reference to the agent associated with this blueprint inside the given simulation.

Parameters
[in]simulationSimulation instance where the agent lives.
See also
AgentSimulationBase<T>::GetAgentByName()

Reimplemented in TypedAgentBaseBlueprint< T, A >.

◆ GetMutableAgent()

virtual AgentBase<T>* GetMutableAgent ( AgentSimulationBase< T > *  simulation)
virtual

Returns a mutable reference to the agent associated with this blueprint inside the given simulation.

Parameters
[in]simulationSimulation instance where the agent lives.
See also
AgentSimulationBase<T>::GetMutableAgentByName()

Reimplemented in TypedAgentBaseBlueprint< T, A >.

◆ GetMutableDiagram()

AgentBase<T>::Diagram* GetMutableDiagram ( AgentBase< T > *  agent) const

◆ GetMutableGeometryIDs()

std::set<drake::geometry::GeometryId>* GetMutableGeometryIDs ( AgentBase< T > *  agent) const

◆ name()

const std::string& name ( ) const

Gets the name for the agent.


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