Project Chrono: chrono::synchrono Namespace Reference

Classes | Typedefs | Enumerations | Functions | Variables
chrono::synchrono Namespace Reference
SYNCHRONO module

## Description

Namespace for SynChrono.

## Classes
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 | SynCopterAgent
| Agent wrapper of a copter model, sends out SynCopterMessage-s to synchronize its state. More...
class | SynEnvironmentAgent
| Derived agent class. Acts as a traffic light and distributes MAP and/or SPAT data. More...
class | SynSCMTerrainAgent
| Class that wraps and synchronizes deformable terrain between Chrono Systems. 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 | 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 | 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 | SynDDSCommunicator
| Derived communicator used to establish and facilitate communication between nodes. 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 | SynDDSParticipantListener
| Participant listener that will count the number of participants and store their names to be used later. More...
class | SynDDSDataWriterListener
| Data writer listener that counts number of subscribers listening to a specific topic. More...
class | SynDDSDataReaderListener
| Data reader listener that can both count publishers on a topic and can be used as an asynchronous listener. 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 | SynDDSTopic
| Describes information that's being distributed over an abstract "wire" Includes data type and meta information (i.e. More...
class | SynMPICommunicator
| Derived communicator used to establish and facilitate communication between nodes. More...
class | SynCommunicator
| Base class communicator used to establish and facilitate communication between nodes. More...
class | ChMultiplePathSteeringController
| Concrete path-following steering PID controller with multiple path support. More...
class | ChMultiPathFollowerACCDriver
| A driver model that is very similar with ChPathFollowerACCDriver but it uses multiple path steering controllers. More...
struct | ApproachLane
| Lane that is grouped into an approach with other ApproachLanes. More...
class | SynApproachMessage
| Approach message. More...
class | SynCopterStateMessage
| State class that holds state information for a SynCopter. More...
class | SynCopterDescriptionMessage
| Description class that holds description information for a SynCopter. 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...
struct | Intersection
| Contains some number of approaches - see ApproachMessage. 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 | SynPose
| Wrapper for several constructs that are common to many flatbuffer messages (Vectors, Quaternions, frames). More...
class | SynSCMMessage
| SCM Message. More...
class | SynSimulationMessage
| This class contains diagnostic and simulation configuration based information that is typically passed between CommunicationManagers in the initialization phase. More...
struct | IntersectionLane
| Lane for the purpose of SPAT messages (i.e. something that can have its light color change). More...
class | SynSPATMessage
| SPAT Message. More...
class | SynTrackedVehicleStateMessage
| State class that holds state information for a SynTrackedVehicleAgent. More...
class | SynTrackedVehicleDescriptionMessage
| Description class that holds description information for a SynTrackedVehicle. More...
class | SynWheeledVehicleStateMessage
| State class that holds state information for a SynWheeledVehicle. More...
class | SynWheeledVehicleDescriptionMessage
| Description class that holds description information for a SynWheeledVehicle. More...
class | SynFlatBuffersManager
| Helper class that wraps the flatbuffers::FlatBufferBuilder. More...
class | SynChronoManager
| Base class responsible for handling agents and synchronizing states between nodes. More...
class | GPScoord
| Wrapper class around vector stores GPS points as (lat, long, alt) in degrees. More...
class | SynGPSTools
| Holds a SynTerrain along with the GPS coordinate mapped to the origin of the vector space. 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 class | 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
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
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.
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