chrono::synchrono Namespace Reference

Description

Namespace for SynChrono.

Classes

struct  ApproachLane
 Lane that is grouped into an approach with other ApproachLanes. More...
 
class  ChMulPathFollowerACCDriver
 A driver model that is very similar with ChPathFollowerACCDriver but it uses multiple path steering controller. More...
 
class  ChMultiplePathSteeringController
 Concrete path-following steering PID controller with multiple path support. More...
 
class  GPScoord
 Wrapper class around ChVector stores GPS points as (lat, long, alt) in degrees. More...
 
struct  Intersection
 Contains some number of approaches - see ApproachMessage. More...
 
struct  IntersectionLane
 Lane for the purpose of SPAT messages (i.e. something that can have its light color change) More...
 
struct  SCMParameters
 Groups SCM parameters into a struct, defines some useful defaults See SCMDeformableTerrain::SetSoilParameters and SoilParametersCallback for more details on these. More...
 
class  SynACCBrain
 Vehicle Brain instance that instructs its vehicle to follow a given curve and stop based on lidar data and traffic light message data. More...
 
class  SynAgent
 Base class for SynChrono agents. More...
 
struct  SynAgentDescription
 The agent description struct Should be inherited and stored with additional description information relavent to the new agent types Should hold infrequently passed data For messages or data that needs to be passed frequently, see SynMessageState. More...
 
class  SynAgentFactory
 Generates SynTerrain's from JSON files Used to improve generality in Agent classes. More...
 
class  SynAgentMessage
 Class handling the conversion from agent flatbuffer messages into C++ objects. More...
 
class  SynApproachMessage
 Handles approach messages, which are a group of lanes going to or from an intersection. More...
 
class  SynBrain
 Base class for any brain - must Advance the state of physics, Synchronize state with others and Process Messages. More...
 
class  SynCollisionBrain
 Detects when this vehicle is "nearby" other (target_rank) vehicles and calls a user-provided callback function in such a case. More...
 
class  SynCommunicationManager
 Base class for anyone that could manage state synchronization in a chrono simulation. More...
 
class  SynEnvironmentAgent
 Agent that manages lanes and light changes for a traffic intersection. More...
 
class  SynEnvironmentBrain
 All logic happens in the EnvironmentAgent class, but we still need an empty concrete class here. More...
 
class  SynEnvironmentMessage
 Used to send the initial description for an environment agent. More...
 
class  SynFlatBuffersManager
 Helper class that wraps the flatbuffers::FlatBufferBuilder. More...
 
class  SynGPSTools
 Holds a SynTerrain along with the GPS coordinate mapped to the origin of the ChVector space. More...
 
class  SynIrrVehicleVisualization
 Concrete SynVisualization class that handles Irrlicht visualization via an Irrlicht app. More...
 
class  SynMAPMessage
 Store the Map information in the simulation. More...
 
struct  SynMAPMessageState
 Contains some number of intersections. More...
 
class  SynMessage
 SynMessage is the base class for all messages Basically wraps the FlatBuffer methods to better handle the SynChrono message passing system Uses a state struct and info struct to store data associated with the message passing Will be inherited from to create new message types. More...
 
class  SynMessageFactory
 Called by CommunicationManager to transform an incoming SynFlatBuffers::Message into a SynMessage. More...
 
struct  SynMessageState
 The message state struct Holds information realted to the messages data Should be inherited and stored with additional information relavent to new message types Should hold data necessary to be passed often between ranks. More...
 
class  SynMPIManager
 Concrete class using MPI AllGatherV calls to manage state synchronization. More...
 
class  SynPose
 Wrapper for several constructs that are common to many flatbuffer messages (Vectors, Quaternions, frames) More...
 
class  SynQueryEnvBrain
 Vehicle Brain instance that instructs its vehicle to follow a given curve and stop based on zombie agent and traffic light message data. More...
 
class  SynRigidTerrain
 Class that wraps and synchronizes rigid terrain between Chrono Systems. More...
 
class  SynSCMMessage
 Class that wraps data contained in a message about Soil Contact Model (SCM) Deformable terrain. More...
 
class  SynSCMTerrain
 Class that wraps and synchronizes deformable terrain between Chrono Systems. More...
 
class  SynSensorMessage
 Wraps data received from a flatbuffer sensor message into a corresponding C++ class. More...
 
class  SynSensorVisualization
 Concrete SynVisualization class that handles Sensor visualization via a ChSensorManager. More...
 
class  SynSPATMessage
 Wraps data from a SPAT message into a corresponding C++ object. More...
 
class  SynTerrain
 Base class for all terrain wrappers. Must handle messages and Advance and Synchronize the state of their terrain. More...
 
class  SynTerrainFactory
 Generates SynTerrain's from JSON files. More...
 
class  SynTrackedVehicleAgent
 Agent wrapper of a tracked vehicle, in particular holds a reference to a SynTrackedVehicle and sends out SynTrackedVehicleMessage-s to synchronize its state. More...
 
struct  SynTrackedVehicleDescription
 The agent description struct Describes how to visualize a zombie agent. More...
 
class  SynTrackedVehicleMessage
 Wraps data from a tracked vehicle state message into a corresponding C++ object. More...
 
struct  SynTrackedVehicleState
 State struct that holds state information for a SynTrackedVehicleAgent. More...
 
class  SynVehicle
 Base class for all vehicle wrappers. Forces them to provide for initialization and synchronization of their zombie. More...
 
class  SynVehicleAgent
 Base class for wheeled and tracked SynVehicleAgents. Both know about ChTerrains, ChDrivers and ChVehicleBrains. More...
 
class  SynVehicleBrain
 Enforces having a ChDriver, and getting inputs from said driver to pass to a ChVehicle. More...
 
class  SynVisualization
 Base class for a visualization wrapper (either Irrlicht or Sensor currently) More...
 
class  SynVisualizationManager
 Abstracts away the need to separately update and maintain Irrlicht and Sensor visualizations. More...
 
class  SynWheeledVehicle
 Wrapper class for ChWheeledVehicles. More...
 
class  SynWheeledVehicleAgent
 Agent wrapper of a wheeled vehicle, in particular holds a reference to a SynWheeledVehicle and sends out SynWheeledVehicleMessage-s to synchronize its state. More...
 
struct  SynWheeledVehicleDescription
 The agent description struct Describes how to visualize a zombie agent. More...
 
class  SynWheeledVehicleMessage
 Wraps data from a wheeled vehicle state message into a corresponding C++ object. More...
 
struct  SynWheeledVehicleState
 State struct that holds state information for a SynWheeledVehicleAgent. More...
 

Typedefs

typedef std::vector< std::shared_ptr< SynAgent > > SynAgentList
 Vector of handles to agents.
 
typedef flatbuffers::Offset< SynFlatBuffers::Message > FlatBufferMessage
 
typedef std::vector< std::shared_ptr< SynVisualization > > SynVisualizationList
 

Enumerations

enum  SynAgentType { VEHICLE, ENVIRONMENT }
 Agent types.
 
enum  SynMPIMemoryMode { SynMPIMemoryMode::PREALLOCATED, SynMPIMemoryMode::PREALLOCATED_WITH_REALLOC, SynMPIMemoryMode::DYNAMIC_RESERVE }
 Memory mode for the MPIManager. More...
 
enum  SynMessageType {
  NONE, WHEELED_VEHICLE, TRACKED_VEHICLE, TRAFFIC_LIGHT,
  SCM_TERRAIN, ENVIRONMENT, MAP, SPAT,
  APPROACH, SENSOR, CONTROL
}
 Type of each message.
 
enum  LaneColor { GREEN, YELLOW, RED }
 

Functions

double DistanceToLine (ChVector<> p, ChVector<> l1, ChVector<> l2)
 
bool IsInsideBox (ChVector<> pos, ChVector<> front, ChVector<> back, double width)
 front, back and width define a box, check if pos is inside that box More...
 
bool IsInsideQuad (ChVector<> pos, ChVector<> sp1, ChVector<> sp2, ChVector<> cp3, ChVector<> cp4)
 Checks if pos is inside the (assumed convex) quadrilateral defined by vectors for each vertex.
 
void Barycentric (ChVector<> p, ChVector<> a, ChVector<> b, ChVector<> c, float &u, float &v, float &w)
 Compute barycentric coordinates (u, v, w) for point p with respect to triangle (a, b, c)
 
void UpdateLaneInfoFromMAP (SynMessage *synmsg, ChVector<> veh_pos, const int &rank, bool &inside_box, int &current_lane, int &current_approach, int &current_intersection, double &dist)
 update inside_box, dist and current_* variables based on info from a MAP message More...
 
void UpdateInsideBoxFromMessage (SynMessage *synmsg, ChVector<> veh_pos, int &current_lane, bool &inside_box, double &dist)
 calls UpdateInsideBoxFromApproachMessage
 
void UpdateInsideBoxFromApproachMessage (SynApproachMessage &app_msg, ChVector<> veh_pos, int &current_lane, bool &inside_box, double &dist)
 update current_lane, inside_box and dist based on info from an Approach Message
 
LaneColor GetLaneColorFromMessage (SynMessage *synmsg, const int intersection, const int approach, const int lane)
 Given an intersection, approach and lane, parse a SPAT message (synmsg) and return the lane color.
 
void SetChronoDataPaths (const std::string &chrono_main, const std::string &chrono_vehicle)
 
void SetDataPath (const std::string &path)
 Set the path to the SynChrono data directory (ATTENTION: not thread safe)
 
const std::string & GetDataPath ()
 Obtain the current path to the SynChrono data directory (thread safe)
 
std::string GetDataFile (const std::string &filename)
 Obtain the complete path to the specified filename, given relative to the SynChrono data directory (thread safe)
 
Document ReadFileJSON (const std::string &filename)
 Load and return a RapidJSON document from the specified file. More...
 
ChVector ReadVectorJSON (const Value &a)
 
ChQuaternion ReadQuaternionJSON (const Value &a)
 
ChCoordsys ReadCoordsysJSON (const Value &a, const Value &b)
 
VisualizationType ReadVisualizationTypeJSON (const std::string &type)
 Load and return the visualization type from the specified JSON file.
 
SYN_API ChVector ReadVectorJSON (const rapidjson::Value &a)
 Load and return a ChVector from the specified JSON array.
 
SYN_API ChQuaternion ReadQuaternionJSON (const rapidjson::Value &a)
 Load and return a ChQuaternion from the specified JSON array.
 
SYN_API ChCoordsys ReadCoordsysJSON (const rapidjson::Value &a, const rapidjson::Value &b)
 Load and return a ChCoordsys from the specified JSON values.
 

Variables

const SynMPIConfig MPI_CONFIG_DEFAULT