delphyne
|
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.
T | One of double, delphyne::AutoDiff or delphyne::Symbolic. |
#include <include/delphyne/mi6/agent_base_blueprint.h>
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 |
using DiagramBuilder = AgentDiagramBuilder<T> |
Diagram builder type for this agent blueprint.
|
explicit |
Constructs a blueprint for an agent with the given name.
name | The name for the agent, must be unique in any given simulation. |
|
virtualdefault |
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.
road_network | A maliput::api::RoadNetwork pointer. |
builder | The builder for the simulation Diagram. |
std::runtime_error | if builder is nullptr. |
|
virtual |
Returns a reference to the agent associated with this blueprint inside the given simulation
.
[in] | simulation | Simulation instance where the agent lives. |
Reimplemented in TypedAgentBaseBlueprint< T, A >.
|
virtual |
Returns a mutable reference to the agent associated with this blueprint inside the given simulation
.
[in] | simulation | Simulation instance where the agent lives. |
Reimplemented in TypedAgentBaseBlueprint< T, A >.
std::set<drake::geometry::GeometryId>* GetMutableGeometryIDs | ( | AgentBase< T > * | agent | ) | const |
const std::string& name | ( | ) | const |
Gets the name for the agent.