AGX Dynamics  2.37.3.2
WireWinchActuator.h
Go to the documentation of this file.
1 /*
2 Copyright 2007-2024. 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 //
This actuator can be used to connect a Winch (which is a linear constraint) to a powerline for exampl...
bool Bool
Definition: Integer.h:48
agx::ref_ptr< WireWinchConnector > WireWinchConnectorRef
#define AGX_DECLARE_POINTER_TYPES(type)
Definition: Referenced.h:254
agxPowerLine contains a collection of connected components that transport power across a system...
Definition: MotorUnit.h:23
The agx namespace contains the dynamics/math part of the AGX Dynamics API.
Implements a Wire model with adaptive resolution.
Definition: MergedBody.h:39
Range< Real > RangeReal
A short hand for ranges of floating point numbers.
Definition: Range.h:196
Abstract base class for storing/restoring a line/drums with version control.
Definition: StorageStream.h:48
#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
std::pair< agxPowerLine::PhysicalDimension *, agxPowerLine::Side > DimensionAndSide
#define AGXMODEL_EXPORT
Winch class for handling in and out hauling of wires.
double Real
Definition: Real.h:42
#define DOXYGEN_END_INTERNAL_BLOCK()
Definition: Object.h:98
#define DOXYGEN_START_INTERNAL_BLOCK()
Definition: Object.h:97