chrono::vehicle::ObsModTerrain Class Reference

Description

Concrete class for a flat horizontal terrain.

This class implements a terrain modeled as an infinite horizontal plane at a specified height. This type of terrain can be used in conjunction with tire models that perform their own collision detection (e.g. ChPacejkaTire, ChFiala, and ChLugreTire).

#include <ObsModTerrain.h>

Inheritance diagram for chrono::vehicle::ObsModTerrain:
Collaboration diagram for chrono::vehicle::ObsModTerrain:

Public Types

enum  VisualisationType { NONE, MESH }
 

Public Member Functions

 ObsModTerrain (ChSystem *system, double height=0.0, float friction=0.8f, double aa=180.0, double length=10.0, double obsheight=0.0)
 
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...
 
void Initialize (ObsModTerrain::VisualisationType vType=ObsModTerrain::VisualisationType::MESH)
 
double GetXObstacleEnd ()
 
double GetEffLength ()
 
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...
 
double BilinearInterpolation (double q11, double q12, double q21, double q22, double x1, double x2, double y1, double y2, double x, double y) const
 
- 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.
 
void RegisterFrictionFunctor (FrictionFunctor *functor)
 Specify the functor object to provide the coefficient of friction at given (x,y) locations.
 

Additional Inherited Members

- Protected Attributes inherited from chrono::vehicle::ChTerrain
FrictionFunctorm_friction_fun
 functor for location-dependent coefficient of friction
 

Constructor & Destructor Documentation

◆ ObsModTerrain()

chrono::vehicle::ObsModTerrain::ObsModTerrain ( ChSystem system,
double  height = 0.0,
float  friction = 0.8f,
double  aa = 180.0,
double  length = 10.0,
double  obsheight = 0.0 
)
Parameters
[in]systempointer to the containing multibody system
height[m] global terrain height
friction[] terrain coefficient of friction
aa[deg] approach angle
length[m] obstacle length for mound, base length for trench
obsheight[m] allways >= 0, obstacle height for mound, obstacle depth for trench

Member Function Documentation

◆ EnableCollisionMesh()

void chrono::vehicle::ObsModTerrain::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::ObsModTerrain::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 ObsModTerrain, 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::ObsModTerrain::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::ObsModTerrain::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/ObsModTerrain.h
  • /builds/uwsbel/chrono/src/chrono_vehicle/terrain/ObsModTerrain.cpp