delphyne
AgentBase< T > Class Template Reference

Detailed Description

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

The most basic agent in Delphyne.

Template Parameters
Oneof double, delphyne::AutoDiff or delphyne::Symbolic.

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

Inheritance diagram for AgentBase< T >:
[legend]

Public Types

using Diagram = DiagramBundle< T >
 Diagram type for this agent. More...
 

Public Member Functions

 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...
 

Member Typedef Documentation

◆ Diagram

using Diagram = DiagramBundle<T>

Diagram type for this agent.

Constructor & Destructor Documentation

◆ AgentBase()

AgentBase ( Diagram diagram)
explicit

Constructs basic agent, associated with the given diagram.

Parameters
diagramA reference to the Diagram representation for the agent, owned by the simulation.
Exceptions
std::runtime_errorif diagram is nullptr.

◆ ~AgentBase()

virtual ~AgentBase ( )
virtualdefault

Member Function Documentation

◆ GetContext()

const drake::systems::Context<T>& GetContext ( ) const

Gets a reference to the agent's Context.

◆ GetDiagram()

const Diagram& GetDiagram ( ) const

Gets a reference to the agent's Diagram representation.

◆ GetGeometryIDs()

const std::set<drake::geometry::GeometryId>& GetGeometryIDs ( ) const

Gets a reference to the agent's geometry IDs.

◆ GetMutableContext()

drake::systems::Context<T>* GetMutableContext ( ) const

Gets a mutable reference to the agent's Context.

◆ GetPose()

drake::systems::rendering::PoseVector<T> GetPose ( ) const

Gets the agent pose in the simulation.

Exceptions
std::runtime_errorif this agent lacks Context.

◆ GetVelocity()

drake::TwistVector<T> GetVelocity ( ) const

Gets the agent twist in the simulation.

Exceptions
std::runtime_errorif this agent lacks Context.

◆ IsSourceOf()

virtual bool IsSourceOf ( const drake::geometry::GeometryId &  geometry_id) const
virtual

Checks whether this agent is the source of the given geometry_id (i.e.

has registered the geometry associated with that id) or not.

◆ name()

const std::string& name ( ) const

Gets the agent name.

◆ SetContext()

void SetContext ( drake::systems::Context< T > *  context)

Resets this agent's Context to context.

Parameters
contextA reference to the agent's Diagram representation Context, owned by the simulation.
Exceptions
std::runtime_errorif context is nullptr.

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