Description
Class that wraps and synchronizes deformable terrain between Chrono Systems.
#include <SynSCMTerrain.h>
Public Member Functions | |
SynSCMTerrain (std::shared_ptr< vehicle::SCMDeformableTerrain > terrain, ChSystem *system) | |
Create SynSCMTerrain by optionally adding an underlying SCMDeformableTerrain. More... | |
SynSCMTerrain (ChSystem *system, const std::string &filename) | |
NOT YET SUPPORTED - Construct deformable terrain on a particular system from a json file. | |
~SynSCMTerrain () | |
Empty destructor. | |
void | SetSoilParametersFromStruct (SCMParameters *params) |
Set terrain's soil parameters from the passed struct. More... | |
void | Advance (double step) override |
Call terrain.Advance(step) and save any new nodes that were changed into our m_scm_terrain record of them. More... | |
virtual void | ProcessMessage (SynMessage *message) override |
Apply a list of received node changes to our underlying terrain object. More... | |
virtual void | GenerateMessagesToSend (std::vector< SynMessage * > &messages, int rank) override |
Pack all changes we have made to our SCMDeformableTerrain in the preceding heartbeat into a message. More... | |
void | SetTerrain (std::shared_ptr< vehicle::SCMDeformableTerrain > terrain) |
virtual std::shared_ptr< vehicle::ChTerrain > | GetTerrain () override |
Get the terrain. | |
std::shared_ptr< vehicle::SCMDeformableTerrain > | GetSCMTerrain () |
Public Member Functions inherited from chrono::synchrono::SynTerrain | |
virtual void | Synchronize (double time) |
Advance the state of the terrain system by the specified duration. | |
double | GetHeight (const ChVector<> &loc) |
Get the terrain height below the specified location. | |
Additional Inherited Members | |
Static Public Member Functions inherited from chrono::synchrono::SynTerrain | |
static rapidjson::Document | ParseTerrainFileJSON (const std::string &filename) |
Constructor & Destructor Documentation
◆ SynSCMTerrain()
|
inline |
Create SynSCMTerrain by optionally adding an underlying SCMDeformableTerrain.
- Parameters
-
terrain Shared pointer to the terrain object this class will use and sync system Should match what the SCMDeformableTerrain was created with
Member Function Documentation
◆ Advance()
|
overridevirtual |
Call terrain.Advance(step) and save any new nodes that were changed into our m_scm_terrain record of them.
- Parameters
-
step duration to advance the state of the terrain
Reimplemented from chrono::synchrono::SynTerrain.
◆ GenerateMessagesToSend()
|
overridevirtual |
Pack all changes we have made to our SCMDeformableTerrain in the preceding heartbeat into a message.
Clear out our record of changes to start recording fresh for the next heartbeat
- Parameters
-
messages Where to add this data to rank Which rank we are attached to (only our agent knows)
Implements chrono::synchrono::SynTerrain.
◆ ProcessMessage()
|
overridevirtual |
Apply a list of received node changes to our underlying terrain object.
This happens via SCMDeformableTerrain::SetModifiedNodes(changed_nodes)
- Parameters
-
message SynMessage* with terrain data on nodes changed by a different rank
Implements chrono::synchrono::SynTerrain.
◆ SetSoilParametersFromStruct()
void chrono::synchrono::SynSCMTerrain::SetSoilParametersFromStruct | ( | SCMParameters * | params | ) |
Set terrain's soil parameters from the passed struct.
- Parameters
-
params Physical parameters for terrain, see SCMParameters struct
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono_synchrono/terrain/SynSCMTerrain.h
- /builds/uwsbel/chrono/src/chrono_synchrono/terrain/SynSCMTerrain.cpp