chrono::synchrono::SynSCMTerrainAgent Class Reference

Description

Class that wraps and synchronizes deformable terrain between Chrono Systems.

#include <SynSCMTerrainAgent.h>

Inheritance diagram for chrono::synchrono::SynSCMTerrainAgent:
Collaboration diagram for chrono::synchrono::SynSCMTerrainAgent:

Public Member Functions

 SynSCMTerrainAgent (std::shared_ptr< vehicle::SCMDeformableTerrain > terrain=nullptr)
 Construct a scm terrain agent with optionally a terrain. More...
 
virtual ~SynSCMTerrainAgent ()
 Destructor.
 
virtual void InitializeZombie (ChSystem *system) override
 Initialize this agents zombie representation Bodies are added and represented in the lead agent's world. More...
 
virtual void SynchronizeZombie (std::shared_ptr< SynMessage > message) override
 Synchronize this agents zombie with the rest of the simulation. More...
 
virtual void Update () override
 Update this agent Typically used to update the state representation of the agent to be distributed to other agents. More...
 
virtual void GatherMessages (SynMessageList &messages) override
 Generates messages to be sent to other nodes Will create or get messages and pass them into the referenced message vector. More...
 
virtual void GatherDescriptionMessages (SynMessageList &messages) override
 Get the description messages for this agent A single agent may have multiple description messages. More...
 
virtual void RegisterZombie (std::shared_ptr< SynAgent > zombie) override
 Register a new zombie. More...
 
void SetSoilParametersFromStruct (SCMParameters *params)
 Utility to set terrain's soil parameters from the passed struct. More...
 
void SetTerrain (std::shared_ptr< vehicle::SCMDeformableTerrain > terrain)
 Set the underlying terrain. More...
 
virtual void SetKey (AgentKey agent_key) override
 Set the Agent ID. More...
 
- Public Member Functions inherited from chrono::synchrono::SynAgent
 SynAgent (AgentKey agent_key={0, 0})
 Construct a agent with the specified node_id. More...
 
virtual ~SynAgent ()
 Destructor.
 
virtual void ProcessMessage (std::shared_ptr< SynMessage > msg)
 Process an incoming message. More...
 
void SetProcessMessageCallback (std::function< void(std::shared_ptr< SynMessage >)> callback)
 
int GetID ()
 
AgentKey GetKey ()
 

Additional Inherited Members

- Protected Attributes inherited from chrono::synchrono::SynAgent
AgentKey m_agent_key
 
std::function< void(std::shared_ptr< SynMessage >)> m_process_message_callback
 

Constructor & Destructor Documentation

◆ SynSCMTerrainAgent()

chrono::synchrono::SynSCMTerrainAgent::SynSCMTerrainAgent ( std::shared_ptr< vehicle::SCMDeformableTerrain terrain = nullptr)

Construct a scm terrain agent with optionally a terrain.

Parameters
terrainthe terrain this agent is responsible for (will be null if agent's a zombie)

Member Function Documentation

◆ GatherDescriptionMessages()

virtual void chrono::synchrono::SynSCMTerrainAgent::GatherDescriptionMessages ( SynMessageList &  messages)
inlineoverridevirtual

Get the description messages for this agent A single agent may have multiple description messages.

Parameters
messagesa referenced vector containing messages to be distributed from this rank

Implements chrono::synchrono::SynAgent.

◆ GatherMessages()

void chrono::synchrono::SynSCMTerrainAgent::GatherMessages ( SynMessageList &  messages)
overridevirtual

Generates messages to be sent to other nodes Will create or get messages and pass them into the referenced message vector.

Parameters
messagesa referenced vector containing messages to be distributed from this rank

Implements chrono::synchrono::SynAgent.

◆ InitializeZombie()

void chrono::synchrono::SynSCMTerrainAgent::InitializeZombie ( ChSystem system)
overridevirtual

Initialize this agents zombie representation Bodies are added and represented in the lead agent's world.

Parameters
systemthe ChSystem used to initialize the zombie

Implements chrono::synchrono::SynAgent.

◆ RegisterZombie()

void chrono::synchrono::SynSCMTerrainAgent::RegisterZombie ( std::shared_ptr< SynAgent zombie)
overridevirtual

Register a new zombie.

Parameters
zombiethe new zombie

Reimplemented from chrono::synchrono::SynAgent.

◆ SetKey()

void chrono::synchrono::SynSCMTerrainAgent::SetKey ( AgentKey  agent_key)
overridevirtual

Set the Agent ID.

Reimplemented from chrono::synchrono::SynAgent.

◆ SetSoilParametersFromStruct()

void chrono::synchrono::SynSCMTerrainAgent::SetSoilParametersFromStruct ( SCMParameters params)

Utility to set terrain's soil parameters from the passed struct.

Parameters
paramsPhysical parameters for terrain, see SCMParameters struct

◆ SetTerrain()

void chrono::synchrono::SynSCMTerrainAgent::SetTerrain ( std::shared_ptr< vehicle::SCMDeformableTerrain terrain)
inline

Set the underlying terrain.

◆ SynchronizeZombie()

void chrono::synchrono::SynSCMTerrainAgent::SynchronizeZombie ( std::shared_ptr< SynMessage message)
overridevirtual

Synchronize this agents zombie with the rest of the simulation.

Updates agent based on the passed message. Any message can be passed, so a check should be done to ensure this message was intended for this agent.

Parameters
messagethe message to process and is used to update the position of the zombie

Implements chrono::synchrono::SynAgent.

◆ Update()

void chrono::synchrono::SynSCMTerrainAgent::Update ( )
overridevirtual

Update this agent Typically used to update the state representation of the agent to be distributed to other agents.

Implements chrono::synchrono::SynAgent.


The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono_synchrono/agent/SynSCMTerrainAgent.h
  • /builds/uwsbel/chrono/src/chrono_synchrono/agent/SynSCMTerrainAgent.cpp