AGXDynamics  2.35.0.2
WireWinchActuator.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2022. Algoryx Simulation AB.
3 
4 All AGX source code, intellectual property, documentation, sample code,
5 tutorials, scene files and technical white papers, are copyrighted, proprietary
6 and confidential material of Algoryx Simulation AB. You may not download, read,
7 store, distribute, publish, copy or otherwise disseminate, use or expose this
8 material unless having a written signed agreement with Algoryx Simulation AB, or having been
9 advised so by Algoryx Simulation AB for a time limited evaluation, or having purchased a
10 valid commercial license from Algoryx Simulation AB.
11 
12 Algoryx Simulation AB disclaims all responsibilities for loss or damage caused
13 from using this software, unless otherwise stated in written agreements with
14 Algoryx Simulation AB.
15 */
16 
17 #ifndef AGXPOWERLINE_ROTATIONAL_WIRE_WINCH_H
18 #define AGXPOWERLINE_ROTATIONAL_WIRE_WINCH_H
19 
22 
24 
26 
27 namespace agxPowerLine
28 {
30 
36  {
37  public:
42 
43  void setWinch(agxWire::WireWinchController* winch);
44 
45  agxWire::WireWinchController* getWinch() const;
46 
47  void setEnable(bool enabled);
48  bool getEnable() const;
49 
50  agx::Bool getBounceSpoolDirectionBeforeOutOfWire() const;
51 
52  void setBounceSpoolDirectionBeforeOutOfWire(agx::Bool bounce);
53 
54  agxPowerLine::TranslationalUnit* getInputRod();
55 
56  virtual bool preUpdate(agx::Real timeStamp) override;
57 
58  virtual bool postUpdate(agx::Real timeStamp) override;
59 
60 
61  virtual void prepareForStore() override;
62  virtual void prepareForRestore() override;
63 
64 
68  virtual bool store(agxStream::StorageStream& str) const override;
69 
73  virtual bool restore(agxStream::StorageStream& str) override;
74 
75 
77 
78 
79  public:
80  // Methods called by the rest of the PowerLine framework.
82 
83  virtual agxPowerLine::DimensionAndSide getConnectableDimension(
85  agxPowerLine::Side side) override;
86 
88 
89 
90  private:
91  void takeWinchControlParameters();
92  void returnWinchControlParameters();
93  void clearTakenWinchControlParameters();
94 
95  protected:
96 
98  virtual ~WireWinchActuator();
99 
100  void detachActuatorUnitsFromEachOther();
101 
102  void connectWireWinchConnector();
103  void disconnectWireWinchConnector();
104  void reconnectWireWinchConnector();
105 
106  protected:
107  agx::observer_ptr<agxWire::WireWinchController> m_winchController;
108 
110  agxPowerLine::detail::WireWinchConnectorRef m_wireWinchConnector;
111 
112  agx::RangeReal m_tmpForceRange;
113  agx::RangeReal m_tmpBrakeRange;
114  agx::Bool m_bounceSpoolDirectionBeforeOutOfWire;
115  };
116 
117 
118 }
119 
120 #endif //
agxPowerLine::WireWinchActuator
This actuator can be used to connect a Winch (which is a linear constraint) to a powerline for exampl...
Definition: WireWinchActuator.h:35
agx::Real
double Real
Definition: Real.h:42
agxPowerLine::Side
Side
Definition: Sides.h:30
agxPowerLine::detail::WireWinchConnectorRef
agx::ref_ptr< WireWinchConnector > WireWinchConnectorRef
Definition: WireWinchConnector.h:31
DOXYGEN_END_INTERNAL_BLOCK
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: macros.h:97
DOXYGEN_START_INTERNAL_BLOCK
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: macros.h:96
agxStream::StorageStream
Abstract base class for storing/restoring a line/drums with version control.
Definition: StorageStream.h:48
agxPowerLine::PhysicalDimension
Pure virtual class.
Definition: PhysicalDimension.h:93
AGXSTREAM_DECLARE_SERIALIZABLE
#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
agx
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Definition: AddedMassInteraction.h:22
agx::ref_ptr< TranslationalUnit >
agxWire
Implements a Wire model with adaptive resolution.
Definition: MergedBody.h:39
Actuator1DOF.h
AGX_DECLARE_POINTER_TYPES
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:248
agxPowerLine
agxPowerLine contains a collection of connected components that transport power across a system.
Definition: MotorUnit.h:23
agx::Bool
bool Bool
Definition: Integer.h:48
agxPowerLine::TranslationalActuator
Definition: Actuator1DOF.h:246
AGXMODEL_EXPORT
#define AGXMODEL_EXPORT
Definition: agxModel/export.h:42
agx::RangeReal
Range< Real > RangeReal
A short hand for ranges of floating point numbers.
Definition: Range.h:191
WireWinchConnector.h
WireWinchController.h
TranslationalUnit.h
agxWire::WireWinchController
Winch class for handling in and out hauling of wires.
Definition: WireWinchController.h:41
agxStream::ElementTypes::Type
Type
Definition: Types.h:37
agxPowerLine::DimensionAndSide
std::pair< agxPowerLine::PhysicalDimension *, agxPowerLine::Side > DimensionAndSide
Definition: PhysicalDimension.h:78