AGX Dynamics 2.42.3.1
Loading...
Searching...
No Matches
Brake.h
Go to the documentation of this file.
1/*
2Copyright 2007-2025. Algoryx Simulation AB.
3
4All AGX source code, intellectual property, documentation, sample code,
5tutorials, scene files and technical white papers, are copyrighted, proprietary
6and confidential material of Algoryx Simulation AB. You may not download, read,
7store, distribute, publish, copy or otherwise disseminate, use or expose this
8material unless having a written signed agreement with Algoryx Simulation AB, or having been
9advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10valid commercial license from Algoryx Simulation AB.
11
12Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13from using this software, unless otherwise stated in written agreements with
14Algoryx Simulation AB.
15*/
16
17#pragma once
18
19#include <agxDriveTrain/Shaft.h>
22
23
24namespace agxDriveTrain
25{
26
28 {
29 public:
71
78 void setEngage(bool engage);
79
83 bool isEngaged() const;
84
88 void setFraction(agx::Real fraction);
89
95
103
111
117 void setManualMode(bool manual);
118
122 bool isManualMode() const;
123
128
133
138 void setLock(bool setLock);
139
143 bool isLocked() const;
144
150
155
160 void setAutoLock(bool autoLock);
161
165 bool isAutoLock() const;
166
171
176
181 void setMinRelativeSlip(agx::Real minRelativeSlip);
182
187
192
197
199
200 bool preUpdate(agx::Real timeStep) override;
201
205 virtual bool addNotification(agxSDK::Simulation* simulation) override;
206
210 virtual bool removeNotification(agxUtil::ConstraintHolder* constraintHolder, agxSDK::Simulation* simulation) override;
211
215 virtual bool store(agxStream::StorageStream& str) const override;
216
220 virtual bool postStore(agxStream::StorageStream& str) const override;
221
225 virtual bool restore(agxStream::StorageStream& str) override;
226
230 virtual bool postRestore(agxStream::StorageStream& str) override;
231
234
235 protected:
236 virtual ~Brake();
237
239 agx::Real m_torqueCapacity;
240 bool m_isEngaged;
241 bool m_isAutoLock;
242 bool m_isManual;
243 agx::Real m_engageTimeConstant;
244 agx::Real m_disengageTimeConstant;
245 agx::Real m_minRelativeSlip;
246 agx::Real m_fraction;
247 bool m_isLocked;
248 };
249 typedef agx::ref_ptr< Brake > BrakeRef;
250}
#define AGXSTREAM_DECLARE_SERIALIZABLE(T)
Use this in a Serializable class to add the required methods Important: Use full namespace in the dec...
Definition: Serializable.h:207
#define AGXMODEL_EXPORT
agx::Real getTorqueCapacity() const
void setFraction(agx::Real fraction)
void setEngageTimeConstant(agx::Real tau)
Set the time constant for the brake engagement.
agx::Real getEngageTimeConstant() const
void setDisengageTimeConstant(agx::Real tau)
Set the time constant for brake disengagement.
agx::Real getTorque() const
bool isAutoLock() const
void setMinRelativeSlip(agx::Real minRelativeSlip)
In autolock mode, the friction plates will lock with the ratio of slip is less than this threshold.
void setTorqueCapacity(agx::Real capacity)
This is the maximum torque that the brake plates can transfer: it will slip if this MinRelativeSlip i...
bool isEngaged() const
agx::Real getDisengageTimeConstant() const
bool isLocked() const
Returns the lock status.
bool isManualMode() const
agx::Real getFraction() const
agx::Real getInputVelocity() const
agxDriveTrain::VelocityConstraint * getConstraint()
void setAutoLock(bool autoLock)
In auto lock mode, the friction plates will lock when the slip is small enough.
void setEngage(bool engage)
Puts the brake pedal in assisted mode so it will fully engage or disengage in a time period determine...
void setManualMode(bool manual)
When manual mode is true, user must control all aspects of the brake engagement and disengagement.
void setLock(bool setLock)
Lock or unlock the brake.
const agxDriveTrain::VelocityConstraint * getConstraint() const
agx::Real getMinRelativeSlip() const
Brake()
This model represents a brake system with dry friction between a brake pad and a rotational plate.
A Shaft is the most basic PowerLine Unit.
Definition: Shaft.h:35
A constraint holding a single VelocityConstraintImplementation.
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:89
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:88
A library of agxPowerLine components designed to model the various parts of a vehicle drive train.
The agxSDK namespace contain classes to bridge the collision detection system and the dynamical simul...
Definition: Constraint.h:31
This namespace contain classes for streaming classes into archives, ASCII, binary for storage (serial...
The agxUtil namespace contain classes and methods for utility functionality.
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
double Real
Definition: Real.h:41