Project Chrono: chrono::vehicle::ChBrake Class Reference

Public Member Functions | Protected Member Functions | Protected Attributes | List of all members
chrono::vehicle::ChBrake Class Referenceabstract
VEHICLE module » Wheeled vehicles » Brake subsystem

## Description

Base class for a brake subsystem.

`#include <ChBrake.h>`

Inheritance diagram for chrono::vehicle::ChBrake:
[legend]
Collaboration diagram for chrono::vehicle::ChBrake:
[legend]

## Public Member Functions
virtual void | Initialize (std::shared_ptr< ChChassis > chassis, std::shared_ptr< ChSuspension > suspension, VehicleSide side)
| Initialize the brake by associating it to an existing suspension subsystem.
virtual void | Synchronize (double time, double braking)=0
| Update the brake subsystem for the given braking driver input.
virtual void | Advance (double step)
| Advance the state of the brake subsystem by the specified time step.
void | EnableLocking (bool val)
| Enable/disable ability of locking (default: false).
virtual double | GetBrakeTorque ()=0
| Get the current brake torque.
Public Member Functions inherited from chrono::vehicle::ChPart
const std::string & | GetName () const
| Get the name identifier for this subsystem.
void | SetName (const std::string &name)
| Set the name identifier for this subsystem.
virtual std::string | GetTemplateName () const =0
| Get the name of the vehicle subsystem template.
bool | IsInitialized () const
| Return flag indicating whether or not the part is fully constructed.
double | GetMass () const
| Get the subsystem mass.
const ChFrame & | GetCOMFrame () const
| Get the current subsystem COM frame (relative to and expressed in the subsystem's reference frame).
const ChMatrix33 & | GetInertia () const
| Get the current subsystem inertia (relative to the subsystem COM frame).
const ChFrame & | GetTransform () const
| Get the current subsystem position relative to the global frame.
void | SetVisualizationType (VisualizationType vis)
| Set the visualization mode for this subsystem.
virtual void | AddVisualizationAssets (VisualizationType vis)
| Add visualization assets to this subsystem, for the specified visualization mode.
virtual void | RemoveVisualizationAssets ()
| Remove all visualization assets from this subsystem.
virtual void | SetOutput (bool state)
| Enable/disable output for this subsystem.
bool | OutputEnabled () const
| Return the output state for this subsystem.
virtual void | ExportComponentList (rapidjson::Document &jsonDocument) const
| Export this subsystem's component list to the specified JSON object.
virtual void | Output (ChVehicleOutput &database) const
| Output data for this subsystem's component list to the specified database.

## Protected Member Functions
| ChBrake (const std::string &name)
virtual void | InitializeInertiaProperties () override
| Initialize subsystem inertia properties.
virtual void | UpdateInertiaProperties () override
| Update subsystem inertia properties.
Protected Member Functions inherited from chrono::vehicle::ChPart
| ChPart (const std::string &name)
| Construct a vehicle subsystem with the specified name.
void | AddMass (double &mass)
| Add this subsystem's mass.
void | AddInertiaProperties (ChVector3d &com, ChMatrix33<> &inertia)
| Add this subsystem's inertia properties.
virtual void | Create (const rapidjson::Document &d)
| Create a vehicle subsystem from JSON data.
void | ExportBodyList (rapidjson::Document &jsonDocument, std::vector< std::shared_ptr< ChBody > > bodies) const
| Export the list of bodies to the specified JSON document.
void | ExportShaftList (rapidjson::Document &jsonDocument, std::vector< std::shared_ptr< ChShaft > > shafts) const
| Export the list of shafts to the specified JSON document.
void | ExportJointList (rapidjson::Document &jsonDocument, std::vector< std::shared_ptr< ChLink > > joints) const
| Export the list of joints to the specified JSON document.
void | ExportCouplesList (rapidjson::Document &jsonDocument, std::vector< std::shared_ptr< ChShaftsCouple > > couples) const
| Export the list of shaft couples to the specified JSON document.
void | ExportMarkerList (rapidjson::Document &jsonDocument, std::vector< std::shared_ptr< ChMarker > > markers) const
| Export the list of markers to the specified JSON document.
void | ExportLinSpringList (rapidjson::Document &jsonDocument, std::vector< std::shared_ptr< ChLinkTSDA > > springs) const
| Export the list of translational springs to the specified JSON document.
void | ExportRotSpringList (rapidjson::Document &jsonDocument, std::vector< std::shared_ptr< ChLinkRSDA > > springs) const
| Export the list of rotational springs to the specified JSON document.
void | ExportBodyLoadList (rapidjson::Document &jsonDocument, std::vector< std::shared_ptr< ChLoadBodyBody > > loads) const
| Export the list of body-body loads to the specified JSON document.

## Protected Attributes
bool | m_can_lock
| can the brake lock?
Protected Attributes inherited from chrono::vehicle::ChPart
std::string | m_name
| subsystem name
bool | m_initialized
| specifies whether ot not the part is fully constructed
bool | m_output
| specifies whether or not output is generated for this subsystem
std::shared_ptr< ChPart > | m_parent
| parent subsystem (empty if parent is vehicle)
double | m_mass
| subsystem mass
ChMatrix33 | m_inertia
| inertia tensor (relative to subsystem COM)
ChFrame | m_com
| COM frame (relative to subsystem reference frame).
ChFrame | m_xform
| subsystem frame expressed in the global frame

## Additional Inherited Members
Static Public Member Functions inherited from chrono::vehicle::ChPart
static ChMatrix33 | TransformInertiaMatrix (const ChVector3d &moments, const ChVector3d &products, const ChMatrix33<> &vehicle_rot, const ChMatrix33<> &body_rot)
| Utility function for transforming inertia tensors between centroidal frames.
Static Protected Member Functions inherited from chrono::vehicle::ChPart
static void | RemoveVisualizationAssets (std::shared_ptr< ChPhysicsItem > item)
| Erase all visual shapes from the visual model associated with the specified physics item (if any).
static void | RemoveVisualizationAsset (std::shared_ptr< ChPhysicsItem > item, std::shared_ptr< ChVisualShape > shape)
| Erase the given shape from the visual model associated with the specified physics item (if any).

## Member Function Documentation

## ◆ EnableLocking()

void chrono::vehicle::ChBrake::EnableLocking | ( | bool | val | ) |
| inline

Enable/disable ability of locking (default: false).

Note that a derived class may or may not support this option.

## ◆ GetBrakeTorque()

virtual double chrono::vehicle::ChBrake::GetBrakeTorque | ( |  | ) |
| pure virtual

Get the current brake torque.

Implemented in chrono::vehicle::ChBrakeShafts, and chrono::vehicle::ChBrakeSimple.

## ◆ Initialize()

void chrono::vehicle::ChBrake::Initialize | ( | std::shared_ptr< ChChassis > | chassis,
|  | std::shared_ptr< ChSuspension > | suspension,
|  | VehicleSide | side )
| virtual

Initialize the brake by associating it to an existing suspension subsystem.

Parameters

  chassis | associated chassis subsystem
  suspension | associated suspension subsystem
  side | brake mounted on left/right side

Reimplemented in chrono::vehicle::ChBrakeShafts, and chrono::vehicle::ChBrakeSimple.

## ◆ InitializeInertiaProperties()

void chrono::vehicle::ChBrake::InitializeInertiaProperties | ( |  | ) |
| overrideprotectedvirtual

Initialize subsystem inertia properties.

Derived classes must override this function and set the subsystem mass (m_mass) and, if constant, the subsystem COM frame and its inertia tensor. This function is called during initialization of the vehicle system.

Implements chrono::vehicle::ChPart.

## ◆ Synchronize()

virtual void chrono::vehicle::ChBrake::Synchronize | ( | double | time,
|  | double | braking )
| pure virtual

Update the brake subsystem for the given braking driver input.

The input value is in the range [0,1].

      braking = 0 indicates no braking
      braking = 1 indicates that the subsystem should provide maximum braking torque

Implemented in chrono::vehicle::ChBrakeShafts, and chrono::vehicle::ChBrakeSimple.

## ◆ UpdateInertiaProperties()

void chrono::vehicle::ChBrake::UpdateInertiaProperties | ( |  | ) |
| overrideprotectedvirtual

Update subsystem inertia properties.

Derived classes must override this function and set the global subsystem transform (m_xform) and, unless constant, the subsystem COM frame (m_com) and its inertia tensor (m_inertia). Calculate the current inertia properties and global frame of this subsystem. This function is called every time the state of the vehicle system is advanced in time.

Implements chrono::vehicle::ChPart.

The documentation for this class was generated from the following files:

- D:/W/B/src/chrono-9.0.1/src/chrono_vehicle/wheeled_vehicle/ChBrake.h
- D:/W/B/src/chrono-9.0.1/src/chrono_vehicle/wheeled_vehicle/ChBrake.cpp