1 #ifndef SimTK_SIMBODY_CABLE_PATH_H_
2 #define SimTK_SIMBODY_CABLE_PATH_H_
100 const Vec3& defaultOriginPoint,
102 const Vec3& defaultTerminationPoint);
195 const Impl&
getImpl()
const {assert(impl);
return *impl;}
279 const Impl&
getImpl()
const {assert(impl);
return *impl;}
300 const Vec3& defaultStation);
355 const Vec3& endHint);
Every Simbody header and source file should include this header before any other Simbody header.
#define SimTK_SIMBODY_EXPORT
Definition: Simbody/include/simbody/internal/common.h:68
This is a unique integer type for identifying obstacles comprising a particular cable path.
This obstacle is a solid object represented by a ContactGeometry surface.
Definition: CablePath.h:320
Surface(CablePath &path, const MobilizedBody &mobod, const Transform &X_BS, const ContactGeometry &surface)
Create a new wrapping surface obstacle and insert it into the given CablePath.
Surface & setContactPointHints(const Vec3 &startHint, const Vec3 &endHint)
Optionally provide some hints for the initialization algorithm to use as starting guesses for the con...
static bool isInstance(const CableObstacle &)
Return true if the given CableObstacle is a Surface.
static const Surface & downcast(const CableObstacle &)
Cast the given CableObstacle to a const Surface; will throw an exception if the obstacle is not a sur...
Surface()
Default constructor creates an empty handle.
Definition: CablePath.h:323
static Surface & updDowncast(CableObstacle &)
Cast the given CableObstacle to a writable Surface; will throw an exception if the obstacle is not a ...
Surface & setNearPoint(const Vec3 &point)
Optionally provide a "near point" that can be used during path initialization to disambiguate when th...
Surface & setDecorativeGeometry(const DecorativeGeometry &viz)
Provide visualization geometry to be used to display this obstacle.
Definition: CablePath.h:335
This is a point through which the cable must pass.
Definition: CablePath.h:294
ViaPoint()
Default constructor creates an empty handle.
Definition: CablePath.h:297
static const ViaPoint & downcast(const CableObstacle &)
Cast the given CableObstacle to a const ViaPoint; will throw an exception if the obstacle is not a vi...
ViaPoint(CablePath &path, const MobilizedBody &viaMobod, const Vec3 &defaultStation)
Insert a via point obstacle to the given cable path.
static bool isInstance(const CableObstacle &)
Return true if the given CableObstacle is a ViaPoint.
static ViaPoint & updDowncast(CableObstacle &)
Cast the given CableObstacle to a writable ViaPoint; will throw an exception if the obstacle is not a...
An obstacle is any significant object along the cable path – one of the end points,...
Definition: CablePath.h:210
const Impl & getImpl() const
Definition: CablePath.h:279
CableObstacle & operator=(const CableObstacle &source)
Copy assignment is shallow and reference-counted; this handle will point to the same object as does t...
void clear()
Clear this handle, deleting the referenced object if this was the last reference.
const MobilizedBody & getMobilizedBody() const
Get a reference to the Mobilized body to which this obstacle is fixed.
CableObstacle()
Create an empty obstacle handle that can refer to any type of obstacle.
Definition: CablePath.h:216
CableObstacle & setDecorativeGeometry(const DecorativeGeometry &viz)
Replace the decorative geometry used for automatically-generated visualization of this obstacle when ...
CableObstacle(Impl *impl)
CableObstacle(const CableObstacle &source)
Copy constructor is shallow and reference-counted; this handle will point to the same object as does ...
CableObstacleIndex getObstacleIndex() const
Return the obstacle index within this obstacle's CablePath.
const DecorativeGeometry & getDecorativeGeometry() const
Return decorative geometry that can be used to display this obstacle.
CableObstacle & setDisabledByDefault(bool shouldBeDisabled)
Set the "disabled by default" flag.
CableObstacle(CablePath &path)
Insert this obstacle into the given cable path.
CableObstacle & setDefaultTransform(const Transform &X_BS)
Replace the default transform for this obstacle; this is usually set in the constructor.
DecorativeGeometry & updDecorativeGeometry()
Obtain writable access to the decorative geometry stored with this obstacle so you can modify it.
const Transform & getDefaultTransform() const
Return the default pose X_BS of the obstacle S on its body B.
bool isDisabledByDefault() const
Is this obstacle disabled by default? Note that this does not tell you whether it is currently disabl...
~CableObstacle()
Destructor clears the handle, deleting the referenced object if this was the last reference.
Definition: CablePath.h:228
bool isEmpty() const
See if this handle is empty.
Definition: CablePath.h:275
Impl & updImpl()
Definition: CablePath.h:280
const CablePath & getCablePath() const
Return a reference to the CablePath in which this obstacle resides.
This class represents the path of a frictionless cable from an origin point fixed to a body,...
Definition: CablePath.h:92
CablePath(CableTrackerSubsystem &cables, const MobilizedBody &originBody, const MobilizedBody &terminationBody)
Constructor taking only the origin and terminal bodies with the expectation that you'll set the end p...
Real getCableLengthDot(const State &state) const
Return the cable rate (time derivative of cable length) that was calculated for the configuration and...
void setIntegratedCableLengthDot(State &state, Real value) const
(Advanced) Initialize the integral of the cable length rate.
Real getCableLength(const State &state) const
Return the total length of the cable that was calculated for the configuration supplied in state.
Impl & updImpl()
Definition: CablePath.h:196
int getNumObstacles() const
Return the total number of obstacles (origin point, surfaces and via points, and termination point) t...
void applyBodyForces(const State &state, Real tension, Vector_< SpatialVec > &bodyForcesInG) const
Given a tension > 0 acting uniformly along this cable, apply the resulting forces to the bodies it to...
CablePath()
Default constructor creates an empty cable path not associated with any subsystem; don't use this.
Definition: CablePath.h:193
Real calcCablePower(const State &state, Real tension) const
Calculate the power this cable would apply or dissipate at the given tension (>0) value,...
CablePath & operator=(const CablePath &source)
Copy assignment is shallow and reference counted.
CablePath(CableTrackerSubsystem &cables, const MobilizedBody &originBody, const Vec3 &defaultOriginPoint, const MobilizedBody &terminationBody, const Vec3 &defaultTerminationPoint)
Create a straight-line cable path connecting a point fixed on one body with one fixed on another body...
CablePath(const CablePath &source)
Copy constructor is shallow and reference counted.
const Impl & getImpl() const
Definition: CablePath.h:195
~CablePath()
Delete the cable path if this handle was the last reference to it.
Definition: CablePath.h:118
const CableObstacle & getObstacle(CableObstacleIndex obstacleIx) const
Return a const reference to one of the obstacles along this path, given by its index starting at zero...
Real getIntegratedCableLengthDot(const State &state) const
(Advanced) Get the time integral of cable length dot.
void solveForInitialCablePath(State &state) const
TODO: Calculate the initial cable path, without using any prior solution.
This subsystem tracks the paths of massless, frictionless cables that take the shortest route between...
Definition: CableTrackerSubsystem.h:68
This is the client-side interface to an implementation-independent representation of "Decorations" su...
Definition: DecorativeGeometry.h:86
A MobilizedBody is Simbody's fundamental body-and-joint object used to parameterize a system's motion...
Definition: MobilizedBody.h:169
This object is intended to contain all state information for a SimTK::System, except topological info...
Definition: State.h:280
This is the vector class intended to appear in user code for large, variable size column vectors.
Definition: Vector_.h:50
This is the top-level SimTK namespace into which all SimTK names are placed to avoid collision with o...
Definition: Assembler.h:37
SimTK_Real Real
This is the default compiled-in floating point type for SimTK, either float or double.
Definition: SimTKcommon/include/SimTKcommon/internal/common.h:607
SimTK_DEFINE_UNIQUE_INDEX_TYPE(AssemblyConditionIndex)