![]() |
AGX Dynamics 2.40.0.0
|
Winch class for handling in and out hauling of wires. More...
#include <WireWinchController.h>
Public Member Functions | |
WireWinchController (agx::RigidBody *body, const agx::Vec3 &positionInBodyFrame, const agx::Vec3 &normalInBodyFrame, agx::Real pulledInLength=agx::Real(0)) | |
Construct this winch given position, normal and body this winch is attached to. | |
agx::Constraint1DOF * | get1DOFConstraint () |
Get pointer to Constraint1DOF. | |
const agx::Constraint1DOF * | get1DOFConstraint () const |
bool | getAutoFeed () const |
const agx::RangeReal & | getBrakeForceRange () const |
virtual agx::Real | getCurrentBrakeForce () const |
virtual agx::Real | getCurrentForce () const |
virtual agx::Real | getCurrentSpeed () const |
agxWire::BodyFixedNode * | getFixedNode () const |
const agx::RangeReal & | getForceRange () const |
agx::Vec3 | getLumpNodeReferencePosition () const |
const agx::Vec3 & | getNormal () const |
virtual agx::Real | getPulledInWireLength () const |
agx::RigidBody * | getRigidBody () const |
agx::Real | getSpeed () const |
agxWire::StopNode * | getStopNode () const |
bool | getStopNodeInserted () const |
agx::Real | getStopNodeReferenceDistance () const |
virtual bool | getWithinEndRange () const |
agx::Vec3 | getWorldNormal () const |
void | setAutoFeed (bool autoFeed) |
Set auto feed to this winch. | |
void | setBrakeForceRange (agx::RangeReal brakeForceRange) |
Set the desired brake force range where range::lower is the force in which this winch brake can hold the wire from hauling out and ranger::upper the brake force hold the wire from hauling in. | |
void | setBrakeForceRange (agx::Real brakeForce) |
Same as setBrakeForceRange( agx::RangeReal brakeForceRange ) but this method will set range as [-brakeForce, brakeForce]. | |
void | setCompliance (agx::Prismatic *prismatic) const |
Sets the default compliance for the prismatic constraint. | |
void | setForceRange (agx::RangeReal forceRange) |
Set the desired winch force where range::lower is the force in which this winch may haul in wire, range::upper haul out. | |
void | setForceRange (agx::Real force) |
Same as setForceRange( agx::RangeReal forceRange ) but this method will set range as [-force, force]. | |
void | setParameterController (agxWire::WireParameterController *parameters) |
Associate a parameter controller to this winch. | |
void | setPulledInWireLength (agx::Real pulledInLength) |
Set the pulled in length for this winch. | |
void | setSpeed (agx::Real speed) |
Set winch motor speed. | |
void | setStabilityController (agxWire::WireStabilityController *stabilityController) |
Associate a stability controller to this winch. | |
![]() | |
virtual | ~Serializable () |
Destructor for normal C++ use but hidden from SWIG bindings. | |
virtual const char * | getClassName () const |
bool | getEnableSerialization () const |
bool | getEnableUuidGeneration () |
agx::UInt32 | getIndex () const |
This index is given at creation of this object. | |
virtual StorageAgent * | getStorageAgent () const =0 |
agx::Uuid | getUuid () const |
bool | isFinished () const |
void | setEnableSerialization (bool flag) |
Set to false to disable serialization of this object. | |
void | setFinished () |
Tells this class that it is restored correctly and should not be deleted during destruction of an Archive. | |
void | setUuid (const agx::Uuid &uuid) |
Explicitly set a Uuid on a serializable object. | |
Protected Member Functions | |
WireWinchController () | |
Default constructor for serialization. | |
virtual | ~WireWinchController () |
virtual void | addNotification (agxSDK::SimulationProxy *) |
Called from Wire::addNotification. | |
virtual bool | attach (WireDistanceCompositeConstraint *constraint, WireParameterController *parameters, bool begin) |
Create new nodes for new wire. | |
agx::Real | configureInitialState () |
This method will set the position of the lumped node given the stop node and pulled in length. | |
agx::Prismatic * | createPrismatic (Node *fixedNode, Node *lumpedNode, const agx::Vec3 &worldNormal) const |
Creates a prismatic constraint given the fixed-, lumped node and a normal. | |
BodyFixedNode * | findParametersHoldingNode (bool begin) |
Search the wire, given begin true of false, for the parameters holding node. | |
virtual void | forcePulledInLength (agx::Real newLength) |
BodyFixedNode * | getNextLumpedNode (BodyFixedNode *from, bool begin) |
Finds the next (or previous) lumped node given a lumped node and the direction of the search. | |
virtual agx::Real | getReferenceCurrentLength (bool begin) const override |
virtual Node * | getReferenceNode () override |
virtual void | incrementPulledInLength (agx::Real dl) |
virtual void | initialize (bool begin, WireParameterController *parameters) override |
Initializes this winch (inserts the stop node and move the lump for example). | |
bool | insertStopNode (bool begin) |
Inserts the stop wire node in the wire. | |
void | massUpdate (agx::Real restLengthChange, bool begin) |
Updates mass for lumped nodes where the rest length is changed by restLengthChange. | |
virtual bool | owns (const Node *node) const override |
For the wire to know if node belongs to this attachment. | |
virtual void | postUpdate (agx::Bool, agxSDK::SimulationProxy *) |
Post update call from the wire. | |
virtual void | preCollideUpdate (agx::Bool, agxSDK::SimulationProxy *) |
Pre-collide update call from the wire. | |
virtual void | preUpdate (agx::Bool, agxSDK::SimulationProxy *) |
Pre update call from the wire. | |
agx::Real | resetLumpPosition (agx::Real angle) |
Resets the lump position to reference. | |
virtual void | unitialize () |
Forgets about all wire parameters and clears the constraint. | |
virtual void | update (Node *controlledNode, Node *lumpedNode, bool begin) override |
Called when it's time to update the constraint and reset the position of the lump. | |
void | updateConstraintSettings (agx::Prismatic *prismatic, agx::Real desiredSpeed, const agx::RangeReal &forceRange, const agx::RangeReal &brakeRange, bool rangeEnable, bool forcedBrake=false) const |
Updates motor, lock and range parameters. | |
![]() | |
Serializable () | |
Default constructor. | |
Serializable (const Serializable &other) | |
Copy constructor. | |
void | generateUuid () |
Protected Attributes | |
bool | m_autoFeed |
agx::RangeReal | m_brakeRange |
BodyFixedNodeRef | m_fixedNode |
bool | m_forcedBrake |
agx::RangeReal | m_forceRange |
agx::observer_ptr< BodyFixedNode > | m_lumpedNode |
agx::Vec3 | m_normal |
WireParameterController * | m_parameters |
agx::observer_ptr< BodyFixedNode > | m_parametersHoldingNode |
To access and change rest/current length. | |
agx::Real | m_pulledInLength |
agx::Real | m_speed |
agx::observer_ptr< WireStabilityController > | m_stabilityController |
If by the initialization controller, this winch can merge segments and change mass of the lumps via this controller. | |
StopNodeRef | m_stopNode |
bool | m_withinEndRange |
Additional Inherited Members | |
![]() | |
static void | setEnableUuidGeneration (bool flag) |
Specify if there should be UUID:s generated for each new Serializable object. By default it is enabled. | |
Winch class for handling in and out hauling of wires.
Definition at line 41 of file WireWinchController.h.
agxWire::WireWinchController::WireWinchController | ( | agx::RigidBody * | body, |
const agx::Vec3 & | positionInBodyFrame, | ||
const agx::Vec3 & | normalInBodyFrame, | ||
agx::Real | pulledInLength = agx::Real(0) |
||
) |
Construct this winch given position, normal and body this winch is attached to.
Both position and normal are in body frame. The normal defines the direction out from the winch, i.e., the positive direction in which the wire will be hauled out.
body | - rigid body this winch is attached to |
positionInBodyFrame | - position of this winch on body |
normalInBodyFrame | - direction of this winch |
pulledInLength | - pulled in length in this winch |
|
protected |
Default constructor for serialization.
|
protectedvirtual |
|
inlineprotectedvirtual |
Called from Wire::addNotification.
Reimplemented in agxWire::Winch.
Definition at line 251 of file WireWinchController.h.
|
protectedvirtual |
Create new nodes for new wire.
|
protected |
This method will set the position of the lumped node given the stop node and pulled in length.
|
protected |
Creates a prismatic constraint given the fixed-, lumped node and a normal.
|
protected |
Search the wire, given begin true of false, for the parameters holding node.
If this winch is located at the beginning of the wire, the parameters holding node will be the first lump after m_lumpedNode. If at end, the parameters holding node is equal to the lumped node.
begin | - if this winch is located at the beginning or at the end of the wire |
|
protectedvirtual |
agx::Constraint1DOF * agxWire::WireWinchController::get1DOFConstraint | ( | ) |
Get pointer to Constraint1DOF.
const agx::Constraint1DOF * agxWire::WireWinchController::get1DOFConstraint | ( | ) | const |
|
inline |
Definition at line 403 of file WireWinchController.h.
References m_autoFeed.
|
inline |
Definition at line 418 of file WireWinchController.h.
References m_brakeRange.
|
virtual |
Reimplemented in agxWire::WireSimpleDrumController.
|
virtual |
Reimplemented in agxWire::WireSimpleDrumController.
|
virtual |
Reimplemented in agxWire::WireSimpleDrumController.
agxWire::BodyFixedNode * agxWire::WireWinchController::getFixedNode | ( | ) | const |
|
inline |
Definition at line 413 of file WireWinchController.h.
References m_forceRange.
agx::Vec3 agxWire::WireWinchController::getLumpNodeReferencePosition | ( | ) | const |
|
protected |
Finds the next (or previous) lumped node given a lumped node and the direction of the search.
from | - the search will start from this body fixed wire node |
begin | - direction of the search, begin == true the search will be forward, false backward (in the list) |
|
inline |
Definition at line 398 of file WireWinchController.h.
References m_normal.
|
virtual |
|
overrideprotectedvirtual |
|
inlineoverrideprotectedvirtual |
Definition at line 330 of file WireWinchController.h.
agx::RigidBody * agxWire::WireWinchController::getRigidBody | ( | ) | const |
|
inline |
Definition at line 408 of file WireWinchController.h.
References m_speed.
agxWire::StopNode * agxWire::WireWinchController::getStopNode | ( | ) | const |
bool agxWire::WireWinchController::getStopNodeInserted | ( | ) | const |
agx::Real agxWire::WireWinchController::getStopNodeReferenceDistance | ( | ) | const |
|
virtual |
agx::Vec3 agxWire::WireWinchController::getWorldNormal | ( | ) | const |
|
protectedvirtual |
|
overrideprotectedvirtual |
Initializes this winch (inserts the stop node and move the lump for example).
begin | - true if this attachment is at the beginning of the wire |
parameters | - pointer to the parameter object |
Reimplemented in agxWire::WireSimpleDrumController.
|
protected |
Inserts the stop wire node in the wire.
|
protected |
Updates mass for lumped nodes where the rest length is changed by restLengthChange.
|
inlineoverrideprotectedvirtual |
For the wire to know if node
belongs to this attachment.
node | - node |
node
is part of this attachment Definition at line 322 of file WireWinchController.h.
|
inlineprotectedvirtual |
Post update call from the wire.
Definition at line 315 of file WireWinchController.h.
|
inlineprotectedvirtual |
Pre-collide update call from the wire.
Definition at line 300 of file WireWinchController.h.
|
inlineprotectedvirtual |
Pre update call from the wire.
Reimplemented in agxWire::Winch.
Definition at line 305 of file WireWinchController.h.
Resets the lump position to reference.
angle | - the current angle of the constraint |
void agxWire::WireWinchController::setAutoFeed | ( | bool | autoFeed | ) |
Set auto feed to this winch.
This mode can be used to facilitate routing. E.g., put all wire in this winch (start of route), set mode to auto feed, and route. The wire will automatically decrease in this winch to fulfill the rout without initial tension. Default: false
autoFeed | - true for auto feed mode |
void agxWire::WireWinchController::setBrakeForceRange | ( | agx::RangeReal | brakeForceRange | ) |
Set the desired brake force range where range::lower is the force in which this winch brake can hold the wire from hauling out and ranger::upper the brake force hold the wire from hauling in.
It's important that the lower value is smaller than zero and the upper larger than zero. Default: (-0, 0)
brakeForceRange | - brake force range |
void agxWire::WireWinchController::setBrakeForceRange | ( | agx::Real | brakeForce | ) |
Same as setBrakeForceRange( agx::RangeReal brakeForceRange ) but this method will set range as [-brakeForce, brakeForce].
brakeForce | - brake force (Newton) to define the total brake force range |
void agxWire::WireWinchController::setCompliance | ( | agx::Prismatic * | prismatic | ) | const |
Sets the default compliance for the prismatic constraint.
prismatic | - a prismatic constraint |
void agxWire::WireWinchController::setForceRange | ( | agx::RangeReal | forceRange | ) |
Set the desired winch force where range::lower is the force in which this winch may haul in wire, range::upper haul out.
It's important that the lower value is smaller than zero and the upper larger than zero. Default: (-Infinity, Infinity)
forceRange | - force (Newton) range [haul_in, haul_out] where haul_in <= 0 and haul_out >= 0 |
void agxWire::WireWinchController::setForceRange | ( | agx::Real | force | ) |
Same as setForceRange( agx::RangeReal forceRange ) but this method will set range as [-force, force].
force | - force (Newton) to define the total force range |
void agxWire::WireWinchController::setParameterController | ( | agxWire::WireParameterController * | parameters | ) |
Associate a parameter controller to this winch.
void agxWire::WireWinchController::setPulledInWireLength | ( | agx::Real | pulledInLength | ) |
Set the pulled in length for this winch.
pulledInLength | - pulled in length |
void agxWire::WireWinchController::setSpeed | ( | agx::Real | speed | ) |
Set winch motor speed.
speed | - speed of the winch motor (Default: 0) |
void agxWire::WireWinchController::setStabilityController | ( | agxWire::WireStabilityController * | stabilityController | ) |
Associate a stability controller to this winch.
This winch will use the stability controller to calculate and set masses to the neighboring lumped nodes when hauling in and out wire. It makes it also possible for this winch to merge two lumps if the haul in speed is large.
stabilityController | - new stability controller |
|
protectedvirtual |
Forgets about all wire parameters and clears the constraint.
|
overrideprotectedvirtual |
Called when it's time to update the constraint and reset the position of the lump.
Reimplemented in agxWire::WireSimpleDrumController.
|
protected |
Updates motor, lock and range parameters.
prismatic | - the prismatic constraint |
desiredSpeed | - desired speed of the prismatic motor |
forceRange | - force range of the motor |
brakeRange | - force range of the lock |
rangeEnable | - if pulled in length < reference distance the range should be enabled |
forcedBrake | - true for "emergency stop" of this winch, brake force will be infinite |
|
protected |
Definition at line 373 of file WireWinchController.h.
Referenced by getAutoFeed().
|
protected |
Definition at line 376 of file WireWinchController.h.
Referenced by getBrakeForceRange().
|
protected |
Definition at line 381 of file WireWinchController.h.
|
protected |
Definition at line 379 of file WireWinchController.h.
|
protected |
Definition at line 375 of file WireWinchController.h.
Referenced by getForceRange().
|
protected |
Definition at line 384 of file WireWinchController.h.
|
protected |
Definition at line 383 of file WireWinchController.h.
Referenced by getNormal().
|
protected |
Definition at line 389 of file WireWinchController.h.
|
protected |
To access and change rest/current length.
If this winch is located at begin this will be the lumped node after m_lumpedNode, if at end m_lumpedNode == m_parametersHoldingNode.
Definition at line 385 of file WireWinchController.h.
|
protected |
Definition at line 377 of file WireWinchController.h.
|
protected |
Definition at line 374 of file WireWinchController.h.
Referenced by getSpeed().
|
protected |
If by the initialization controller, this winch can merge segments and change mass of the lumps via this controller.
Definition at line 387 of file WireWinchController.h.
|
protected |
Definition at line 382 of file WireWinchController.h.
|
protected |
Definition at line 378 of file WireWinchController.h.