chrono::vehicle::ChVehicleCosimWheeledVehicleNode Class Reference
Description
Wheeled vehicle co-simulation node.
The vehicle system is co-simulated with tire nodes and a terrain node.
#include <ChVehicleCosimWheeledVehicleNode.h>
Inheritance diagram for chrono::vehicle::ChVehicleCosimWheeledVehicleNode:

Collaboration diagram for chrono::vehicle::ChVehicleCosimWheeledVehicleNode:

Public Member Functions | |
| ChVehicleCosimWheeledVehicleNode (const std::string &vehicle_json, const std::string &engine_json, const std::string &transmission_json) | |
| Construct a wheeled vehicle node using the provided vehicle and powertrain JSON specification files. | |
| ChVehicleCosimWheeledVehicleNode (std::shared_ptr< ChWheeledVehicle > vehicle, std::shared_ptr< ChPowertrainAssembly > powertrain) | |
| Construct a wheeled vehicle node using the provided vehicle and powertrain objects. | |
| std::shared_ptr< ChWheeledVehicle > | GetVehicle () const |
| Get the underlying vehicle system. | |
| void | SetInitialLocation (const ChVector3d &init_loc) |
| Set the initial vehicle position, relative to the center of the terrain top-surface. | |
| void | SetInitialYaw (double init_yaw) |
| Set the initial vehicle yaw angle (in radians). | |
| void | SetDriver (std::shared_ptr< ChDriver > driver) |
| Attach a vehicle driver system. | |
| void | SetChassisFixed (bool val) |
| Fix vehicle chassis to ground. | |
Public Member Functions inherited from chrono::vehicle::ChVehicleCosimWheeledMBSNode | |
| virtual NodeType | GetNodeType () const override |
| Return the node type as NodeType::MBS_WHEELED. | |
| void | SetNumThreads (int num_threads) |
| Set the number of OpenMP threads used in Chrono simulation (default: 1). | |
| void | SetIntegratorType (ChTimestepper::Type int_type, ChSolver::Type slv_type) |
| Set integrator and solver types. | |
| void | SetChassisFixed (bool val) |
| Fix the chassis to ground (default: false). | |
| void | AttachDrawbarPullRig (std::shared_ptr< ChVehicleCosimDBPRig > rig) |
| Attach a drawbar pull rig to the MBS system. | |
| std::shared_ptr< ChVehicleCosimDBPRig > | GetDrawbarPullRig () const |
| Return the drawbar-pull rig, if one is attached. | |
| virtual void | Initialize () override final |
| Initialize this node. | |
| virtual void | Synchronize (int step_number, double time) override final |
| Synchronize this node. | |
| virtual void | Advance (double step_size) override final |
| Advance simulation. | |
| virtual void | OutputData (int frame) override final |
| Output logging and debugging data. | |
| virtual void | OutputVisualizationData (int frame) override final |
| Output post-processing visualization data. | |
Public Member Functions inherited from chrono::vehicle::ChVehicleCosimBaseNode | |
| std::string | GetNodeTypeString () const |
| Return the node type as a string. | |
| bool | IsCosimNode () const |
| Return true if this node is part of the co-simulation infrastructure. | |
| void | SetStepSize (double step) |
| Set the integration step size (default: 1e-4). | |
| double | GetStepSize () const |
| Get the integration step size. | |
| void | SetOutDir (const std::string &dir_name, const std::string &suffix="") |
| Set the name of the output directory and an identifying suffix. | |
| void | SetVerbose (bool verbose) |
| Enable/disable verbose messages during simulation (default: true). | |
| void | EnableRuntimeVisualization (double render_fps=100, bool save_img=false) |
| Enable run-time visualization (default: false). | |
| void | SetCameraPosition (const ChVector3d &cam_pos, const ChVector3d &cam_target=VNULL) |
| Set camera location and target point. | |
| void | SetCameraTracking (bool track) |
| Enable/disable tracking of objects (default: true). | |
| void | EnablePostprocessVisualization (double render_fps=100) |
| Enable Blender postprocessing (default: false). | |
| const std::string & | GetOutDirName () const |
| Get the output directory name for this node. | |
| double | GetStepExecutionTime () const |
| Get the simulation execution time for the current step on this node. | |
| double | GetTotalExecutionTime () const |
| Get the cumulative simulation execution time on this node. | |
| void | Render (double step_size) |
| Render simulation frame. | |
| virtual void | WriteCheckpoint (const std::string &filename) const |
| Write checkpoint to the specified file (which will be created in the output directory). | |
Additional Inherited Members | |
Public Types inherited from chrono::vehicle::ChVehicleCosimBaseNode | |
| enum class | NodeType { MBS_WHEELED , MBS_TRACKED , TERRAIN , TIRE } |
| Type of node participating in co-simulation. More... | |
| enum class | InterfaceType { BODY , MESH } |
| Type of the vehicle-terrain communication interface. More... | |
Static Public Member Functions inherited from chrono::vehicle::ChVehicleCosimBaseNode | |
| static std::string | OutputFilename (const std::string &dir, const std::string &root, const std::string &ext, int frame, int frame_digits) |
| Utility function for creating an output file name. | |
Protected Member Functions inherited from chrono::vehicle::ChVehicleCosimWheeledMBSNode | |
| ChVehicleCosimWheeledMBSNode () | |
| Construct a base class wheeled MBS node. | |
Protected Member Functions inherited from chrono::vehicle::ChVehicleCosimBaseNode | |
| ChVehicleCosimBaseNode (const std::string &name) | |
| void | SendGeometry (const ChVehicleGeometry &geom, int dest) const |
| Utility function to pack and send a struct with geometry information. | |
| void | RecvGeometry (ChVehicleGeometry &geom, int source) const |
| Utility function to receive and unpack a struct with geometry information. | |
| void | ProgressBar (unsigned int x, unsigned int n, unsigned int w=50) |
| Utility function to display a progress bar to the terminal. | |
Protected Attributes inherited from chrono::vehicle::ChVehicleCosimWheeledMBSNode | |
| ChSystemSMC * | m_system |
| containing system | |
| ChTimestepper::Type | m_int_type |
| integrator type | |
| ChSolver::Type | m_slv_type |
| solver type | |
| std::shared_ptr< ChTimestepperHHT > | m_integrator |
| HHT integrator object. | |
| std::shared_ptr< ChVehicleCosimDBPRig > | m_DBP_rig |
| DBP rig. | |
| std::ofstream | m_DBP_outf |
| DBP output file stream. | |
Protected Attributes inherited from chrono::vehicle::ChVehicleCosimBaseNode | |
| int | m_rank |
| MPI rank of this node (in MPI_COMM_WORLD) | |
| double | m_step_size |
| integration step size | |
| std::string | m_name |
| name of the node | |
| std::string | m_out_dir |
| top-level output directory | |
| std::string | m_node_out_dir |
| node-specific output directory | |
| std::ofstream | m_outf |
| output file stream | |
| bool | m_renderRT |
| if true, perform run-time rendering | |
| bool | m_renderRT_all |
| if true, render all frames | |
| double | m_renderRT_step |
| time step between rendered frames | |
| bool | m_writeRT |
| if true, write images to file | |
| bool | m_renderPP |
| if true, save data for post-processing | |
| bool | m_renderPP_all |
| if true, save data at all frames | |
| double | m_renderPP_step |
| time step between post-processing save frames | |
| bool | m_track |
| track objects | |
| ChVector3d | m_cam_pos |
| camera location | |
| ChVector3d | m_cam_target |
| camera target (lookat) point | |
| unsigned int | m_num_wheeled_mbs_nodes |
| unsigned int | m_num_tracked_mbs_nodes |
| unsigned int | m_num_terrain_nodes |
| unsigned int | m_num_tire_nodes |
| ChTimer | m_timer |
| timer for integration cost | |
| double | m_cum_sim_time |
| cumulative integration cost | |
| bool | m_verbose |
| verbose messages during simulation? | |
Static Protected Attributes inherited from chrono::vehicle::ChVehicleCosimBaseNode | |
| static const double | m_gacc = -9.81 |
Constructor & Destructor Documentation
◆ ChVehicleCosimWheeledVehicleNode() [1/2]
| chrono::vehicle::ChVehicleCosimWheeledVehicleNode::ChVehicleCosimWheeledVehicleNode | ( | const std::string & | vehicle_json, |
| const std::string & | engine_json, | ||
| const std::string & | transmission_json ) |
Construct a wheeled vehicle node using the provided vehicle and powertrain JSON specification files.
- Parameters
-
vehicle_json vehicle JSON specification file engine_json engine JSON specification file transmission_json transmission JSON specification file
◆ ChVehicleCosimWheeledVehicleNode() [2/2]
| chrono::vehicle::ChVehicleCosimWheeledVehicleNode::ChVehicleCosimWheeledVehicleNode | ( | std::shared_ptr< ChWheeledVehicle > | vehicle, |
| std::shared_ptr< ChPowertrainAssembly > | powertrain ) |
Construct a wheeled vehicle node using the provided vehicle and powertrain objects.
Notes:
- the provided vehicle system must be constructed with a null Chrono system.
- the vehicle and powertrain system should not be initialized.
- Parameters
-
vehicle vehicle system powertrain powertrain system
The documentation for this class was generated from the following files:
- C:/M/B/src/chrono-9.0.1/src/chrono_vehicle/cosim/mbs/ChVehicleCosimWheeledVehicleNode.h
- C:/M/B/src/chrono-9.0.1/src/chrono_vehicle/cosim/mbs/ChVehicleCosimWheeledVehicleNode.cpp
Public Member Functions inherited from