Description

Collaboration diagram for Utility classes:

Classes

class  chrono::vehicle::ChAdaptiveSpeedController
 Data collection from the speed controller can be started (restarted) and suspended (stopped) as many times as desired. More...
 
class  chrono::vehicle::ChSpeedController
 Data collection from the speed controller can be started (restarted) and suspended (stopped) as many times as desired. More...
 
class  chrono::vehicle::ChSteeringController
 Base class for all steering path-following PID controllers. More...
 
class  chrono::vehicle::ChPathSteeringController
 Concrete path-following steering PID controller. More...
 
class  chrono::vehicle::ChPathSteeringControllerXT
 Concrete path-following steering 3(2) channel PDT1/PT1 controller. More...
 
class  chrono::vehicle::ChPathSteeringControllerSR
 Concrete path-following steering P-like controller with variable path prediction. More...
 
class  chrono::vehicle::ChVehicleIrrApp
 custom event receiver for chase-cam control More...
 

Functions

 chrono::vehicle::ChVehicleIrrApp::ChVehicleIrrApp (ChVehicle *vehicle, const std::wstring &title=L"Chrono::Vehicle", const irr::core::dimension2d< irr::u32 > &dims=irr::core::dimension2d< irr::u32 >(1000, 800), irr::ELOG_LEVEL log_level=irr::ELL_INFORMATION)
 Construct a vehicle Irrlicht application. More...
 
void chrono::vehicle::ChVehicleIrrApp::SetSkyBox ()
 Create a skybox that has Z pointing up. More...
 
void chrono::vehicle::ChVehicleIrrApp::SetChaseCamera (const ChVector<> &ptOnChassis, double chaseDist, double chaseHeight)
 Set parameters for the underlying chase camera. More...
 
void chrono::vehicle::ChVehicleIrrApp::SetStepsize (double val)
 Set the step size for integration of the chase-cam dynamics.
 
void chrono::vehicle::ChVehicleIrrApp::SetChaseCameraState (utils::ChChaseCamera::State state)
 Set camera state (mode).
 
void chrono::vehicle::ChVehicleIrrApp::SetChaseCameraPosition (const ChVector<> &pos)
 Set camera position. More...
 
void chrono::vehicle::ChVehicleIrrApp::SetChaseCameraAngle (double angle)
 Set camera angle.
 
void chrono::vehicle::ChVehicleIrrApp::SetChaseCameraMultipliers (double minMult, double maxMult)
 Set camera zoom multipliers.
 
void chrono::vehicle::ChVehicleIrrApp::SetHUDLocation (int HUD_x, int HUD_y)
 Set the upper-left point of HUD elements.
 
void chrono::vehicle::ChVehicleIrrApp::EnableStats (bool val)
 Turn on/off rendering of stats (HUD).
 
void chrono::vehicle::ChVehicleIrrApp::EnableSound (bool sound)
 Turn on/off Irrklang sound generation. More...
 
virtual void chrono::vehicle::ChVehicleIrrApp::DrawAll () override
 Render the Irrlicht scene and additional visual elements.
 
void chrono::vehicle::ChVehicleIrrApp::RenderGrid (const ChVector<> &loc, int num_divs, double delta)
 Render a horizontal grid at the specified location.
 
void chrono::vehicle::ChVehicleIrrApp::RenderFrame (const ChVector<> &loc, double axis_length=1)
 Render a reference frame (aligned with the world frame) at the specified location.
 
void chrono::vehicle::ChVehicleIrrApp::Synchronize (const std::string &msg, const ChDriver::Inputs &driver_inputs)
 Update information related to driver inputs.
 
void chrono::vehicle::ChVehicleIrrApp::Advance (double step)
 Advance the dynamics of the chase camera. More...
 
void chrono::vehicle::ChVehicleIrrApp::WriteImageToFile (const std::string &filename)
 Save a snapshot of the last rendered frame to file. More...
 
virtual void chrono::vehicle::ChVehicleIrrApp::renderOtherGraphics ()
 Render additional graphics.
 
virtual void chrono::vehicle::ChVehicleIrrApp::renderOtherStats (int left, int top)
 Render additional vehicle information.
 
void chrono::vehicle::ChVehicleIrrApp::renderLinGauge (const std::string &msg, double factor, bool sym, int xpos, int ypos, int length=120, int height=15)
 
void chrono::vehicle::ChVehicleIrrApp::renderTextBox (const std::string &msg, int xpos, int ypos, int length=120, int height=15, irr::video::SColor color=irr::video::SColor(255, 20, 20, 20))
 
void chrono::vehicle::ChVehicleIrrApp::renderStats ()
 

Variables

ChVehiclechrono::vehicle::ChVehicleIrrApp::m_vehicle
 pointer to the associated vehicle system
 
utils::ChChaseCamera chrono::vehicle::ChVehicleIrrApp::m_camera
 chase camera
 
ChCameraEventReceiver * chrono::vehicle::ChVehicleIrrApp::m_camera_control
 event receiver for chase-cam control
 
double chrono::vehicle::ChVehicleIrrApp::m_stepsize
 integration step size for chase-cam dynamics
 
bool chrono::vehicle::ChVehicleIrrApp::m_renderStats
 turn on/off rendering of stats
 
int chrono::vehicle::ChVehicleIrrApp::m_HUD_x
 x-coordinate of upper-left corner of HUD elements
 
int chrono::vehicle::ChVehicleIrrApp::m_HUD_y
 y-coordinate of upper-left corner of HUD elements
 
std::string chrono::vehicle::ChVehicleIrrApp::m_driver_msg
 HUD message from driver system.
 
double chrono::vehicle::ChVehicleIrrApp::m_steering
 driver steering input
 
double chrono::vehicle::ChVehicleIrrApp::m_throttle
 driver throttle input
 
double chrono::vehicle::ChVehicleIrrApp::m_braking
 driver braking input
 

Friends

class chrono::vehicle::ChVehicleIrrApp::ChCameraEventReceiver
 
class chrono::vehicle::ChVehicleIrrApp::ChIrrGuiDriver
 
class chrono::vehicle::ChVehicleIrrApp::ChIrrGuiDriverSTR
 

Function Documentation

◆ Advance()

void chrono::vehicle::ChVehicleIrrApp::Advance ( double  step)

Advance the dynamics of the chase camera.

The integration of the underlying ODEs is performed using as many steps as needed to advance by the specified duration.

◆ ChVehicleIrrApp()

chrono::vehicle::ChVehicleIrrApp::ChVehicleIrrApp ( ChVehicle vehicle,
const std::wstring &  title = L"Chrono::Vehicle",
const irr::core::dimension2d< irr::u32 > &  dims = irr::core::dimension2d<irr::u32>(1000, 800),
irr::ELOG_LEVEL  log_level = irr::ELL_INFORMATION 
)

Construct a vehicle Irrlicht application.

Parameters
vehiclepointer to the associated vehicle system
titlewindow title
dimswindow dimensions
log_levelIrrlicht logging level

◆ EnableSound()

void chrono::vehicle::ChVehicleIrrApp::EnableSound ( bool  sound)

Turn on/off Irrklang sound generation.

Note that this has an effect only if Irrklang support was enabled at configuration.

◆ SetChaseCamera()

void chrono::vehicle::ChVehicleIrrApp::SetChaseCamera ( const ChVector<> &  ptOnChassis,
double  chaseDist,
double  chaseHeight 
)

Set parameters for the underlying chase camera.

Parameters
ptOnChassistracked point on chassis body (in vehicle reference frame)
chaseDistchase distance (behind tracked point)
chaseHeightchase height (above tracked point)

◆ SetChaseCameraPosition()

void chrono::vehicle::ChVehicleIrrApp::SetChaseCameraPosition ( const ChVector<> &  pos)
inline

Set camera position.

Note that this forces the chase-cam in Track mode.

◆ SetSkyBox()

void chrono::vehicle::ChVehicleIrrApp::SetSkyBox ( )

Create a skybox that has Z pointing up.

Note that the default ChIrrApp::AddTypicalSky() uses Y up.

◆ WriteImageToFile()

void chrono::vehicle::ChVehicleIrrApp::WriteImageToFile ( const std::string &  filename)

Save a snapshot of the last rendered frame to file.

The file name extension determines the image format.