Description
Base class definition of a single-wheel test rig.
- Accepts an arbitrary wheel assembly (derived from ChWheelTestRig::WheelAssembly)
- Works with Rigid, SCM, DEM granular, or CRM terrain (deformable terrain requires a rigid or FEA tire; handling tires can only be used with rigid terrain)
- Allows variation of longitudinal speed, wheel angular speed, and wheel slip angle as functions of time
- Provides support for automatic selection of longitudinal and angular speeds in order to enforce a specified longitudinal slip value
- Allows specification of camber angle (kept constant through the simulation)
#include <ChWheelTestRig.h>
Classes | |
| class | SteeringActuator |
| Steering actuator of a wheel assembly. More... | |
| class | SteeringActuatorLinear |
| Steering actuator based on a linear position motor (actuator coordinate: motor displacement). More... | |
| class | SteeringActuatorRotational |
| Steering actuator based on a rotation angle motor (actuator coordinate: motor angle). More... | |
| struct | TerrainParamsGranular |
| Granular terrain patch parameters. More... | |
| struct | TerrainParamsRigid |
| Rigid terrain patch parameters. More... | |
| struct | TerrainParamsSCM |
| SCM terrain patch parameters. More... | |
| struct | TerrainPatchSize |
| Terrain patch dimensions. More... | |
| class | WheelAssembly |
| Definition of a wheel assembly for rig testing. More... | |
Public Types | |
| enum | Mode { Mode::SUSPEND, Mode::DROP, Mode::TEST } |
| Tire test rig operation mode. More... | |
| enum | TerrainType { SCM, RIGID, CRG, GRANULAR, CRM, NONE } |
| Terrain type. | |
Public Member Functions | |
| ChWheelTestRig (ChSystem &system, std::shared_ptr< WheelAssembly > wheel) | |
| Construct a test rig within the specified system using the given custom wheel. | |
| ChWheelTestRig (ChSystem &system, std::shared_ptr< ChWheel > wheel, std::shared_ptr< ChTire > tire) | |
| Construct a test rig within the specified system using the given Chrono::Vehicle wheel and tire. More... | |
| ChWheelTestRig (ChSystem &system, std::shared_ptr< ChWheel > wheel, std::shared_ptr< ChTire > tire, std::shared_ptr< ChSuspension > suspension) | |
| Construct a test rig within the specified system using the given Chrono::Vehicle wheel, tire, and suspension subsystems. More... | |
| void | SetGravitationalAcceleration (double grav) |
| Set gravitational acceleration (default: 9.81 m/s2). | |
| void | SetCamberAngle (double camber) |
| Set camber angle (default: 0 rad). More... | |
| void | SetNormalLoad (double load) |
| Set desired normal load (default: 1000 N). | |
| void | SetLongSpeedFunction (std::shared_ptr< ChFunction > funct) |
| Specify rig carrier longitudinal speed as function of time (default: none). More... | |
| void | SetAngSpeedFunction (std::shared_ptr< ChFunction > funct) |
| Specify wheel angular speed as function of time (default: none). More... | |
| void | SetConstantLongitudinalSlip (double long_slip, double base_speed=1) |
| Specify a constant given longitudinal slip. More... | |
| void | SetSlipAngleFunction (std::shared_ptr< ChFunction > funct) |
| Specify wheel slip angle as function of time (default: constant value 0). More... | |
| void | SetSteeringAngleFunction (std::shared_ptr< ChFunction > funct) |
| Specify wheel steering angle as function of time (default: none). More... | |
| void | SetSteeringActuatorFunction (std::shared_ptr< ChFunction > funct) |
| Specify the steering actuator coordinate as function of time (default: none). More... | |
| void | EnableSteeringFeedback (bool enable, double time_constant=0.05) |
| Enable feedback correction of the steering actuator coordinate (default: false). More... | |
| void | SetStepsize (double step) |
| Set the step size for the multibody system and the wheel assembly dynamics (default: 1e-3 s). More... | |
| void | SetVisualizationType (VisualizationType vis) |
| Set visualization type for the wheel assembly (default: PRIMITIVES). | |
| void | SetTerrainRigid (const TerrainPatchSize &size, const TerrainParamsRigid ¶ms) |
| Enable use of rigid terrain. | |
| void | SetTerrainRigid (const TerrainPatchSize &size, float mu, float cr, float Y) |
| Enable use of rigid terrain. More... | |
| void | SetTerrainSCM (const TerrainPatchSize &size, const TerrainParamsSCM ¶ms) |
| Enable use of SCM terrain. More... | |
| void | SetTerrainSCM (const TerrainPatchSize &size, double Bekker_Kphi, double Bekker_Kc, double Bekker_n, double Mohr_cohesion, double Mohr_friction, double Janosi_shear, double grid_spacing=0.125, bool vis_mesh=true) |
| Enable use of SCM terrain. More... | |
| void | SetTerrainGranular (const TerrainPatchSize &size, const TerrainParamsGranular ¶ms) |
| Enable use of granular terrain. More... | |
| void | SetTerrainGranular (const TerrainPatchSize &size, double radius, double density, double friction, double cohesion, double Young_modulus) |
| Enable use of granular terrain. More... | |
| void | SetTimeDelay (double delay) |
| Set time delay before applying motion functions (default: 0 s). More... | |
| void | SetSettlingTime (double time) |
| Set the duration of the initial terrain settling phase (TEST mode only). More... | |
| double | GetSettlingTime () const |
| Get the duration of the initial terrain settling phase (TEST mode only). | |
| double | GetTimeDelay () const |
| Get time delay after which measurements are calculated. More... | |
| bool | OutputEnabled () const |
| Check if kinematic and kinetic quantities are collected. More... | |
| void | Initialize (Mode mode, double drop_speed=0.1) |
| Initialize the rig system. More... | |
| void | Advance (double step) |
| Advance the rig state by the specified time interval. More... | |
| void | GetSuggestedCollisionSettings (double &collision_envelope, ChVector3i &collision_bins) const |
| Get suggested collision settings. More... | |
| double | GetNormalLoad () const |
| Get the normal load. | |
| double | GetMass () const |
| Get total rig mass. | |
| std::shared_ptr< ChTerrain > | GetTerrain () const |
| Get a handle to the underlying terrain subsystem. | |
| const ChVector3d & | GetPos () const |
| Get current carrier body position. | |
| ChVector3d | GetWheelPos () const |
| Get current wheel position. | |
| bool | PatchEndReached () const |
| Return true if the wheel has reached either end of the terrain patch. More... | |
| TerrainForce | ReportWheelForce () const |
| Get the current terrain forces acting on the wheel as applied to the wheel hub. | |
| double | GetDBP () const |
| Return current drawbar-pull value. More... | |
| double | GetLongitudinalSlip () const |
| Get current wheel longitudinal slip. More... | |
| double | GetSlipAngle () const |
| Get current wheel slip angle. More... | |
| double | GetCamberAngle () const |
| Get current wheel camber angle. More... | |
| double | GetSteeringAngle () const |
| Get current wheel steering angle, relative to the initial configuration (positive to the left). More... | |
| double | GetSteeringActuatorCoordinate () const |
| Get current steering actuator coordinate (0 if the wheel assembly has no steering actuator). | |
| std::vector< ChOutput::Channel > | GetOutputChannels () const |
| Get the current values of the rig output channels. More... | |
| const ChFunctionInterp & | GetSteeringMap () const |
| Get the kinematic steering map (steering angle as a function of steering actuator coordinate). More... | |
| std::shared_ptr< ChLinkMotorLinearSpeed > | GetMotorCarrier () const |
| Get the linear motor used to actuate the carrier. | |
| std::shared_ptr< ChShaftsMotorSpeed > | GetMotorWheel () const |
| Get the rotation motor used to actuate the wheel. | |
Static Public Member Functions | |
| static TerrainForce | CalculateTerrainForce (const std::vector< std::shared_ptr< ChBody >> &bodies, ChTerrain &terrain, const ChVector3d &point) |
| Calculate the resultant terrain force and moment on the specified bodies, applied at the given point. More... | |
Member Enumeration Documentation
◆ Mode
|
strong |
Constructor & Destructor Documentation
◆ ChWheelTestRig() [1/2]
| chrono::vehicle::ChWheelTestRig::ChWheelTestRig | ( | ChSystem & | system, |
| std::shared_ptr< ChWheel > | wheel, | ||
| std::shared_ptr< ChTire > | tire | ||
| ) |
Construct a test rig within the specified system using the given Chrono::Vehicle wheel and tire.
- Parameters
-
system containing mechanical system wheel wheel subsystem tire tire subsystem
◆ ChWheelTestRig() [2/2]
| chrono::vehicle::ChWheelTestRig::ChWheelTestRig | ( | ChSystem & | system, |
| std::shared_ptr< ChWheel > | wheel, | ||
| std::shared_ptr< ChTire > | tire, | ||
| std::shared_ptr< ChSuspension > | suspension | ||
| ) |
Construct a test rig within the specified system using the given Chrono::Vehicle wheel, tire, and suspension subsystems.
- Parameters
-
system containing mechanical system wheel wheel subsystem tire tire subsystem suspension suspension subsystem
Member Function Documentation
◆ Advance()
| void chrono::vehicle::ChWheelTestRig::Advance | ( | double | step | ) |
Advance the rig state by the specified time interval.
The multibody system is advanced with the step size set through SetStepsize, using as many steps as needed to cover the given interval. With CRM terrain, the interval is the FSI coupling step: the multibody and SPH systems are each advanced over it with their own step sizes and exchange data at its end.
◆ CalculateTerrainForce()
|
static |
Calculate the resultant terrain force and moment on the specified bodies, applied at the given point.
The force and moment are expressed in the global frame. The interaction forces are obtained from the FSI system for CRM terrain, from the terrain for SCM terrain, and from the collision system otherwise. This utility can be used to implement WheelAssembly::ReportForces for a custom wheel assembly.
◆ EnableSteeringFeedback()
| void chrono::vehicle::ChWheelTestRig::EnableSteeringFeedback | ( | bool | enable, |
| double | time_constant = 0.05 |
||
| ) |
Enable feedback correction of the steering actuator coordinate (default: false).
Used only with a steering angle function. An integral correction, normalized by the local slope of the kinematic steering map, drives the actual steering angle to the specified one with the given time constant. Note that this cancels bump and compliance steer.
◆ GetCamberAngle()
| double chrono::vehicle::ChWheelTestRig::GetCamberAngle | ( | ) | const |
Get current wheel camber angle.
This value is calculated from the current hub normal direction.
◆ GetDBP()
| double chrono::vehicle::ChWheelTestRig::GetDBP | ( | ) | const |
Return current drawbar-pull value.
This is the reaction force in the linear motor used to enforce the specified rig longitudinal speed.
◆ GetLongitudinalSlip()
| double chrono::vehicle::ChWheelTestRig::GetLongitudinalSlip | ( | ) | const |
Get current wheel longitudinal slip.
This value is calculated from the horizontal speed of the hub body and its angular rotation speed.
◆ GetOutputChannels()
| std::vector< ChOutput::Channel > chrono::vehicle::ChWheelTestRig::GetOutputChannels | ( | ) | const |
Get the current values of the rig output channels.
The channels include the rig measurements (zero until measurements are enabled, see OutputEnabled), the rig and wheel kinematics, and any channels provided by the wheel assembly (see WheelAssembly::AddOutputChannels). All quantities are in SI units, with angles in radians. The set of channels is the same at every call.
◆ GetSlipAngle()
| double chrono::vehicle::ChWheelTestRig::GetSlipAngle | ( | ) | const |
Get current wheel slip angle.
This value is calculated from the current hub normal direction, relative to the direction of travel. For a wheel with a steerable suspension, the slip angle includes the static toe of the loaded configuration, i.e., it is the negative of the sum of the steering angle (see GetSteeringAngle) and the loaded toe angle.
◆ GetSteeringAngle()
| double chrono::vehicle::ChWheelTestRig::GetSteeringAngle | ( | ) | const |
Get current wheel steering angle, relative to the initial configuration (positive to the left).
This value is calculated from the current hub normal direction, relative to the rig chassis. For a wheel with a suspension, the initial configuration is the loaded configuration with the steering actuator at zero; a zero steering angle therefore retains the static toe of the suspension in that configuration.
◆ GetSteeringMap()
|
inline |
Get the kinematic steering map (steering angle as a function of steering actuator coordinate).
This map is computed during initialization, only if a steering angle function was specified.
◆ GetSuggestedCollisionSettings()
| void chrono::vehicle::ChWheelTestRig::GetSuggestedCollisionSettings | ( | double & | collision_envelope, |
| ChVector3i & | collision_bins | ||
| ) | const |
Get suggested collision settings.
These values are meaningful only when using granular terrain and Chrono::Multicore.
- Parameters
-
collision_envelope suggested envelope based on particle radius collision_bins suggested number of bins for broad-phase collision detection
◆ GetTimeDelay()
|
inline |
Get time delay after which measurements are calculated.
After the drop phase (TEST mode only), this value is set to the input time delay increased by the wheel drop time. Before the drop phase is completed, this function returns the input time delay.
◆ Initialize()
| void chrono::vehicle::ChWheelTestRig::Initialize | ( | Mode | mode, |
| double | drop_speed = 0.1 |
||
| ) |
Initialize the rig system.
It is the user's responsibility to set the operation mode and motion functions in a consistent way. In TEST mode, the wheel is held above the terrain during the terrain settling phase (see SetSettlingTime) and then lowered onto the terrain with a speed equal to drop_speed. For a wheel assembly with a suspension, the suspension travel is held during this drop phase at the static equilibrium configuration under the specified normal load (computed during initialization) and released once the wheel carries the normal load.
◆ OutputEnabled()
|
inline |
Check if kinematic and kinetic quantities are collected.
This function returns true only in TEST mode once the motion functions are activated.
◆ PatchEndReached()
| bool chrono::vehicle::ChWheelTestRig::PatchEndReached | ( | ) | const |
Return true if the wheel has reached either end of the terrain patch.
The patch end is reached when the wheel hub is within one wheel radius of the patch boundary, measured along the direction of travel. Always false for terrain types without a fixed patch (granular terrain uses a moving patch).
◆ SetAngSpeedFunction()
| void chrono::vehicle::ChWheelTestRig::SetAngSpeedFunction | ( | std::shared_ptr< ChFunction > | funct | ) |
Specify wheel angular speed as function of time (default: none).
If a function is not specified, the wheel is not actuated.
◆ SetCamberAngle()
|
inline |
Set camber angle (default: 0 rad).
Camber angle is set only if the wheel is not attached to a suspension subsystem (in that case, the suspension geometry dictates camber).
◆ SetConstantLongitudinalSlip()
| void chrono::vehicle::ChWheelTestRig::SetConstantLongitudinalSlip | ( | double | long_slip, |
| double | base_speed = 1 |
||
| ) |
Specify a constant given longitudinal slip.
This version overrides the motion functions for the carrier longitudinal slip and for the wheel angular speed to enforce the specified longitudinal slip value. A positive slip value indicates that the wheel is spinning. A negative slip value indicates that the wheel is sliding (skidding); in particular, s=-1 indicates sliding without rotation.
◆ SetLongSpeedFunction()
| void chrono::vehicle::ChWheelTestRig::SetLongSpeedFunction | ( | std::shared_ptr< ChFunction > | funct | ) |
Specify rig carrier longitudinal speed as function of time (default: none).
If a function is not specified, the carrier is not actuated.
◆ SetSettlingTime()
|
inline |
Set the duration of the initial terrain settling phase (TEST mode only).
During this phase, the wheel is held above the terrain and the drop phase starts at its end. For CRM terrain, the FSI active domains are disabled during settling, so that all SPH particles settle (not only those near the wheel). By default (or if a negative value is specified), the settling time is 0.5 s for CRM and granular terrain and 0 for rigid and SCM terrain.
◆ SetSlipAngleFunction()
|
inline |
Specify wheel slip angle as function of time (default: constant value 0).
A slip angle function can be used only if the wheel is not attached to a suspension subsystem (in that case, the suspension dictates slip angle).
◆ SetSteeringActuatorFunction()
| void chrono::vehicle::ChWheelTestRig::SetSteeringActuatorFunction | ( | std::shared_ptr< ChFunction > | funct | ) |
Specify the steering actuator coordinate as function of time (default: none).
The actuator coordinate is specific to the steering mechanism of the wheel assembly (for a Chrono::Vehicle steerable suspension, the displacement of the steering rack along the rig lateral axis). See SetSteeringAngleFunction for the steering requirements. This function overrides any steering angle function.
◆ SetSteeringAngleFunction()
| void chrono::vehicle::ChWheelTestRig::SetSteeringAngleFunction | ( | std::shared_ptr< ChFunction > | funct | ) |
Specify wheel steering angle as function of time (default: none).
Steering requires a wheel assembly with a steering actuator (see WheelAssembly::GetSteeringActuator) and is ignored otherwise; for a wheel without a suspension, use SetSlipAngleFunction instead. The wheel is steered through the assembly steering mechanism (for a Chrono::Vehicle steerable suspension, a rack to which the tierods are attached). The actuator coordinate is obtained from the specified steering angle through a kinematic map, computed during initialization at the loaded configuration of the suspension. Steering angles are relative to that configuration and positive to the left (positive rotation about the vertical axis). Away from it, the actual steering angle includes bump and compliance steer. Note that a zero steering angle retains the static toe of the suspension in the loaded configuration (in general different from the design toe, because of bump steer), so that the wheel may run at a non-zero slip angle. This function overrides any steering actuator function.
◆ SetStepsize()
|
inline |
Set the step size for the multibody system and the wheel assembly dynamics (default: 1e-3 s).
With CRM terrain, the SPH (CFD) step size is set separately, through TerrainParamsCRM::step_cfd.
◆ SetTerrainGranular() [1/2]
| void chrono::vehicle::ChWheelTestRig::SetTerrainGranular | ( | const TerrainPatchSize & | size, |
| const TerrainParamsGranular & | params | ||
| ) |
Enable use of granular terrain.
The terrain subsystem consists of identical spherical particles initialized in layers. A moving-patch option is used.
◆ SetTerrainGranular() [2/2]
| void chrono::vehicle::ChWheelTestRig::SetTerrainGranular | ( | const TerrainPatchSize & | size, |
| double | radius, | ||
| double | density, | ||
| double | friction, | ||
| double | cohesion, | ||
| double | Young_modulus | ||
| ) |
Enable use of granular terrain.
Specify contact material properties. The terrain subsystem consists of identical spherical particles initialized in layers. A moving-patch option is used.
- Parameters
-
size terrain patch size radius particle radius [m] density particle material density [kg/m3] friction inter-particle coefficient of friction cohesion inter-particle cohesion pressure [Pa] Young_modulus particle contact material Young's modulus [Pa], used with SMC contact
◆ SetTerrainRigid()
| void chrono::vehicle::ChWheelTestRig::SetTerrainRigid | ( | const TerrainPatchSize & | size, |
| float | mu, | ||
| float | cr, | ||
| float | Y | ||
| ) |
Enable use of rigid terrain.
Specify contact material properties and patch dimensions.
- Parameters
-
size terrain patch size mu coefficient of friction cr coefficient of restitution Y contact material Young's modulus [Pa]
◆ SetTerrainSCM() [1/2]
| void chrono::vehicle::ChWheelTestRig::SetTerrainSCM | ( | const TerrainPatchSize & | size, |
| const TerrainParamsSCM & | params | ||
| ) |
Enable use of SCM terrain.
For a headless run, the visualization of the SCM terrain patch can be disabled (via TerrainParamsSCM::vis_mesh).
◆ SetTerrainSCM() [2/2]
| void chrono::vehicle::ChWheelTestRig::SetTerrainSCM | ( | const TerrainPatchSize & | size, |
| double | Bekker_Kphi, | ||
| double | Bekker_Kc, | ||
| double | Bekker_n, | ||
| double | Mohr_cohesion, | ||
| double | Mohr_friction, | ||
| double | Janosi_shear, | ||
| double | grid_spacing = 0.125, |
||
| bool | vis_mesh = true |
||
| ) |
Enable use of SCM terrain.
Specify SCM soil parameters and patch dimensions.
- Parameters
-
size terrain patch size Bekker_Kphi Kphi, frictional modulus in Bekker model Bekker_Kc Kc, cohesive modulus in Bekker model Bekker_n n, exponent of sinkage in Bekker model (usually 0.6...1.8) Mohr_cohesion cohesion [Pa], for shear failure Mohr_friction Friction angle [degrees], for shear failure Janosi_shear shear parameter J [m], (usually a few mm or cm) grid_spacing SCM grid spacing vis_mesh enable visualization mesh
◆ SetTimeDelay()
|
inline |
Set time delay before applying motion functions (default: 0 s).
In TEST mode, this delay is measured after the wheel bottom point reaches the terrain height.
The documentation for this class was generated from the following files:
- /builds/uwsbel/chrono/src/chrono_vehicle/wheeled_vehicle/test_rig/ChWheelTestRig.h
- /builds/uwsbel/chrono/src/chrono_vehicle/wheeled_vehicle/test_rig/ChWheelTestRig.cpp