chrono::vehicle::RandomSurfaceTerrain Class Reference

Description

Terrain object representing an uneven area with controlled roughness.

By default, this class implements a terrain modeled as an infinite horizontal plane at a specified height with the uneven terrain lane of specified length and width starting at the origin. This type of terrain can be used in conjunction with tire models that perform their own collision detection (e.g., ChTMeasy ChPac89, ChPac02, ChFiala).

Alternatively, this terrain type can be represented as a collision mesh representing the uneven lane with an optional flat starting lane. This terrain type can be used with vehicles that require contact for the vehicle-terrain interaction (wheeled vehicle with rigid tires or tracked vehicles).

#include <RandomSurfaceTerrain.h>

Inheritance diagram for chrono::vehicle::RandomSurfaceTerrain:
Collaboration diagram for chrono::vehicle::RandomSurfaceTerrain:

Public Types

enum  SurfaceType {
  FLAT, ISO8608_A_NOCORR, ISO8608_B_NOCORR, ISO8608_C_NOCORR,
  ISO8608_D_NOCORR, ISO8608_E_NOCORR, ISO8608_F_NOCORR, ISO8608_G_NOCORR,
  ISO8608_H_NOCORR, ISO8608_A_CORR, ISO8608_B_CORR, ISO8608_C_CORR,
  ISO8608_D_CORR, ISO8608_E_CORR, MAJOR_ROAD_ASPHALTIC_CONCRETE, MAJOR_ROAD_CONCRETE,
  MAIN_ROAD_ASPHALTIC_CONCRETE_ON_PAVEMENT, MAIN_ROAD_ASPHALTIC_CONCRETE, TRACK_TILED_CONCRETE_PAVEMENT
}
 
enum  VisualisationType { NONE, LINES, MESH }
 

Public Member Functions

 RandomSurfaceTerrain (ChSystem *system, double length=300.0, double width=5.0, double height=0.0, float friction=0.8f)
 
virtual double GetHeight (const ChVector<> &loc) const override
 Get the terrain height below the specified location. More...
 
virtual ChVector GetNormal (const ChVector<> &loc) const override
 Get the terrain normal at the point below the specified location. More...
 
virtual float GetCoefficientFriction (const ChVector<> &loc) const override
 Get the terrain coefficient of friction at the point below the specified location. More...
 
double GetRMS ()
 Get the (detrended) root mean square of the tracks, height offset is not considered [m].
 
double GetIRI ()
 Get the International Roughness Index, estimated from unevenness and waviness [m/km].
 
void EnableCollisionMesh (std::shared_ptr< ChMaterialSurface > material, double length=0, double sweep_sphere_radius=0)
 Enable creation of a collision mesh and enable collision (default: no collision mesh). More...
 
void Initialize (RandomSurfaceTerrain::SurfaceType surfType=RandomSurfaceTerrain::SurfaceType::FLAT, double vehicleTrackWidth=2.0, RandomSurfaceTerrain::VisualisationType vType=RandomSurfaceTerrain::VisualisationType::MESH)
 Select a road surface from presets, ISO 8608 and literature.
 
void Initialize (double unevenness, double waviness=2.0, double vehicleTrackWidth=2.0, bool considerCorrelation=true, RandomSurfaceTerrain::VisualisationType vType=RandomSurfaceTerrain::VisualisationType::MESH)
 Directly generate a road surface from unevenness and waviness, optional consideration of correlation, if unevenness fits between ISO classes A to E.
 
void Initialize (double iri, double vehicleTrackWidth=2.0, bool considerCorrelation=true, RandomSurfaceTerrain::VisualisationType vType=RandomSurfaceTerrain::VisualisationType::MESH)
 Directly generate a road surface from International Roughness Index [mm/m], optional consideration of correlation, if unevenness fits between ISO classes A to E.
 
- Public Member Functions inherited from chrono::vehicle::ChTerrain
virtual void Synchronize (double time)
 Update the state of the terrain system at the specified time.
 
virtual void Advance (double step)
 Advance the state of the terrain system by the specified duration.
 
virtual void GetProperties (const ChVector<> &loc, double &height, ChVector<> &normal, float &friction) const
 Get all terrain characteristics at the point below the specified location.
 
void RegisterHeightFunctor (std::shared_ptr< HeightFunctor > functor)
 Specify the functor object to provide the terrain height at given locations. More...
 
void RegisterNormalFunctor (std::shared_ptr< NormalFunctor > functor)
 Specify the functor object to provide the terrain normal at given locations. More...
 
void RegisterFrictionFunctor (std::shared_ptr< FrictionFunctor > functor)
 Specify the functor object to provide the coefficient of friction at given locations.
 

Additional Inherited Members

- Protected Attributes inherited from chrono::vehicle::ChTerrain
std::shared_ptr< HeightFunctorm_height_fun
 functor for location-dependent terrain height
 
std::shared_ptr< NormalFunctorm_normal_fun
 functor for location-dependent terrain normal
 
std::shared_ptr< FrictionFunctorm_friction_fun
 functor for location-dependent coefficient of friction
 

Constructor & Destructor Documentation

◆ RandomSurfaceTerrain()

chrono::vehicle::RandomSurfaceTerrain::RandomSurfaceTerrain ( ChSystem system,
double  length = 300.0,
double  width = 5.0,
double  height = 0.0,
float  friction = 0.8f 
)
Parameters
[in]systempointer to the containing multibody system
[in]lengthuneven terrain length
[in]widthuneven terrain width
[in]heightterrain height offset
[in]frictionterrain coefficient of friction

Member Function Documentation

◆ EnableCollisionMesh()

void chrono::vehicle::RandomSurfaceTerrain::EnableCollisionMesh ( std::shared_ptr< ChMaterialSurface material,
double  length = 0,
double  sweep_sphere_radius = 0 
)

Enable creation of a collision mesh and enable collision (default: no collision mesh).

Optionally (length > 0), create a flat lane of given length positioned before the uneven portion. The specified radius (default 0) is used as a "mesh thickness" to improve robustness of the collision detection. Note that this function must be called before Initialize().

◆ GetCoefficientFriction()

float chrono::vehicle::RandomSurfaceTerrain::GetCoefficientFriction ( const ChVector<> &  loc) const
overridevirtual

Get the terrain coefficient of friction at the point below the specified location.

This coefficient of friction value may be used by certain tire models to modify the tire characteristics, but it will have no effect on the interaction of the terrain with other objects (including tire models that do not explicitly use it). For RandomSurfaceTerrain, this function defers to the user-provided functor object of type ChTerrain::FrictionFunctor, if one was specified. Otherwise, it returns the constant value specified at construction.

Reimplemented from chrono::vehicle::ChTerrain.

◆ GetHeight()

double chrono::vehicle::RandomSurfaceTerrain::GetHeight ( const ChVector<> &  loc) const
overridevirtual

Get the terrain height below the specified location.

Returns the constant value passed at construction.

Reimplemented from chrono::vehicle::ChTerrain.

◆ GetNormal()

ChVector chrono::vehicle::RandomSurfaceTerrain::GetNormal ( const ChVector<> &  loc) const
overridevirtual

Get the terrain normal at the point below the specified location.

Returns a constant unit vector along the vertical axis.

Reimplemented from chrono::vehicle::ChTerrain.


The documentation for this class was generated from the following files:
  • /builds/uwsbel/chrono/src/chrono_vehicle/terrain/RandomSurfaceTerrain.h
  • /builds/uwsbel/chrono/src/chrono_vehicle/terrain/RandomSurfaceTerrain.cpp