chrono::synchrono Namespace Reference

Description

Namespace for SynChrono.

Classes

struct  ApproachLane
 Lane that is grouped into an approach with other ApproachLanes. More...
 
class  ChMultiPathFollowerACCDriver
 A driver model that is very similar with ChPathFollowerACCDriver but it uses multiple path steering controllers. More...
 
class  ChMultiplePathSteeringController
 Concrete path-following steering PID controller with multiple path support. More...
 
class  GPScoord
 Wrapper class around vector 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 SCMTerrain::SetSoilParameters and SoilParametersCallback for more details on these. More...
 
class  SynAgent
 Base class for SynChrono agents. More...
 
class  SynAgentFactory
 Generates SynTerrain's from JSON files Used to improve generality in Agent classes. More...
 
class  SynApproachMessage
 Approach message. More...
 
class  SynChronoManager
 Base class responsible for handling agents and synchronizing states between nodes. More...
 
class  SynCommunicator
 Base class communicator used to establish and facilitate communication between nodes. More...
 
class  SynCopterAgent
 Agent wrapper of a copter model, sends out SynCopterMessage-s to synchronize its state. More...
 
class  SynCopterDescriptionMessage
 Description class that holds description information for a SynCopter. More...
 
class  SynCopterStateMessage
 State class that holds state information for a SynCopter. More...
 
class  SynDDSCommunicator
 Derived communicator used to establish and facilitate communication between nodes. More...
 
class  SynDDSDataReaderListener
 Data reader listener that can both count publishers on a topic and can be used as an asynchronous listener. More...
 
class  SynDDSDataWriterListener
 Data writer listener that counts number of subscribers listening to a specific topic. More...
 
class  SynDDSParticipantListener
 Participant listener that will count the number of participants and store their names to be used later. More...
 
class  SynDDSPublisher
 DDS publisher wrapper. Sends information on a topic. More...
 
class  SynDDSSubscriber
 DDS subscriber wrapper. Listens for information on a topic. More...
 
class  SynDDSThreadSafeCounter
 Thread safe counter used to count various elements Use case would be to block until a certain number of elements. More...
 
class  SynDDSTopic
 Describes information that's being distributed over an abstract "wire" Includes data type and meta information (i.e. More...
 
class  SynEnvironmentAgent
 Derived agent class. Acts as a traffic light and distributes MAP and/or SPAT data. More...
 
class  SynEnvironmentMessage
 The environment agent state class This should be inherited and stored with additional state information relevant to the environment agent Should hold frequently passed data, such as synchronization information For infrequently passed data, please see SynAgentDescriptionMessage. 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 vector space. More...
 
class  SynMAPMessage
 Store the Map information in the simulation. More...
 
class  SynMessage
 SynMessage is the base class for all messages Basically wraps the FlatBuffer methods to better handle the SynChrono message passing system 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...
 
class  SynMPICommunicator
 Derived communicator used to establish and facilitate communication between nodes. More...
 
class  SynPose
 Wrapper for several constructs that are common to many flatbuffer messages (Vectors, Quaternions, frames) More...
 
class  SynSCMMessage
 SCM Message. More...
 
class  SynSCMTerrainAgent
 Class that wraps and synchronizes deformable terrain between Chrono Systems. More...
 
class  SynSimulationMessage
 This class contains diagnostic and simulation configuration based information that is typically passed between CommunicationManagers in the initialization phase. More...
 
class  SynSPATMessage
 SPAT Message. More...
 
class  SynTrackedVehicleAgent
 Agent wrapper of a tracked vehicle, in particular holds a pointer to a ChTrackedVehicle and sends out SynTrackedVehicleMessage-s to synchronize its state. More...
 
class  SynTrackedVehicleDescriptionMessage
 Description class that holds description information for a SynTrackedVehicle. More...
 
class  SynTrackedVehicleStateMessage
 State class that holds state information for a SynTrackedVehicleAgent. More...
 
class  SynWheeledVehicleAgent
 Agent wrapper of a wheeled vehicle, in particular holds a pointer to a ChWheeledVehicle and sends out SynWheeledVehicleMessage-s to synchronize its state. More...
 
class  SynWheeledVehicleDescriptionMessage
 Description class that holds description information for a SynWheeledVehicle. More...
 
class  SynWheeledVehicleStateMessage
 State class that holds state information for a SynWheeledVehicle. More...
 

Typedefs

typedef std::vector< std::shared_ptr< SynAgent > > SynAgentList
 Vector of handles to agents.
 
typedef std::vector< std::shared_ptr< SynDDSPublisher > > PublisherList
 
typedef std::vector< std::shared_ptr< SynDDSSubscriber > > SubscriberList
 
typedef std::map< std::string, std::shared_ptr< SynDDSTopic > > TopicMap
 
typedef std::vector< std::shared_ptr< SynDDSTopic > > TopicList
 
typedef flatbuffers::Offset< SynFlatBuffers::Message > FlatBufferMessage
 
typedef std::vector< std::shared_ptr< SynMessage > > SynMessageList
 
typedef std::map< int, std::map< int, std::shared_ptr< SynMessage > > > SynMessageMap
 
typedef std::vector< flatbuffers::Offset< SynFlatBuffers::Message > > SynFlatBufferMessageList
 

Enumerations

enum  LaneColor { GREEN, YELLOW, RED }
 

Functions

double DistanceToLine (ChVector3d p, ChVector3d l1, ChVector3d l2)
 
bool IsInsideBox (ChVector3d pos, ChVector3d front, ChVector3d back, double width)
 front, back and width define a box, check if pos is inside that box More...
 
bool IsInsideQuad (ChVector3d pos, ChVector3d sp1, ChVector3d sp2, ChVector3d cp3, ChVector3d cp4)
 Checks if pos is inside the (assumed convex) quadrilateral defined by vectors for each vertex.
 
void Barycentric (ChVector3d p, ChVector3d a, ChVector3d b, ChVector3d c, double &u, double &v, double &w)
 Compute barycentric coordinates (u, v, w) for point p with respect to triangle (a, b, c)
 
void UpdateLaneInfoFromMAP (std::shared_ptr< SynMessage > synmsg, ChVector3d 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 (std::shared_ptr< SynMessage > synmsg, ChVector3d veh_pos, int &current_lane, bool &inside_box, double &dist)
 calls UpdateInsideBoxFromApproachMessage
 
void UpdateInsideBoxFromApproachMessage (std::shared_ptr< SynApproachMessage > app_msg, ChVector3d 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 (std::shared_ptr< 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)
 
void SetLogNodeID (int node_id)
 Will set the node id for this specific node. More...
 
std::string GetAppendingString (int node_id)
 
std::ostream & AppendLog (int)
 
std::ostream & SynLog ()
 "Overriden" global function to get the current std::cout object Will prepend any output with the global id set from SetLogNodeID
 

Variables

const std::string default_prefix = std::string("/syn/node/")
 

Function Documentation

◆ SetLogNodeID()

SYN_API void chrono::synchrono::SetLogNodeID ( int  node_id)

Will set the node id for this specific node.

That way, the logger will print the correct node id