chrono::vehicle::FlatTerrain 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., ChTMeasy ChPac89, ChPac02, ChFiala).

#include <FlatTerrain.h>

Inheritance diagram for chrono::vehicle::FlatTerrain:
Collaboration diagram for chrono::vehicle::FlatTerrain:

Public Member Functions

 FlatTerrain (double height, float friction=0.8f)
 
virtual double GetHeight (const ChVector3d &loc) const override
 Get the terrain height below the specified location. More...
 
virtual ChVector3d GetNormal (const ChVector3d &loc) const override
 Get the terrain normal at the point below the specified location. More...
 
virtual float GetCoefficientFriction (const ChVector3d &loc) const override
 Get the terrain coefficient of friction at the point below the specified location. More...
 
- 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 ChVector3d &loc, double &height, ChVector3d &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

◆ FlatTerrain()

chrono::vehicle::FlatTerrain::FlatTerrain ( double  height,
float  friction = 0.8f 
)
Parameters
[in]heightterrain height
[in]frictionterrain coefficient of friction

Member Function Documentation

◆ GetCoefficientFriction()

float chrono::vehicle::FlatTerrain::GetCoefficientFriction ( const ChVector3d 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 FlatTerrain, 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::FlatTerrain::GetHeight ( const ChVector3d loc) const
overridevirtual

Get the terrain height below the specified location.

Returns the constant value passed at construction.

Reimplemented from chrono::vehicle::ChTerrain.

◆ GetNormal()

ChVector3d chrono::vehicle::FlatTerrain::GetNormal ( const ChVector3d 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/FlatTerrain.h
  • /builds/uwsbel/chrono/src/chrono_vehicle/terrain/FlatTerrain.cpp