33 #ifndef DART_DYNAMICS_DETAIL_GenericJointASPECT_HPP_
34 #define DART_DYNAMICS_DETAIL_GenericJointASPECT_HPP_
44 template <
class ConfigSpaceT>
50 template <
class ConfigSpaceT>
53 constexpr
static std::size_t
NumDofs = ConfigSpaceT::NumDofs;
55 using Vector =
typename ConfigSpaceT::Vector;
74 const Vector& velocities = Vector::Zero(),
75 const Vector& accelerations = Vector::Zero(),
76 const Vector& forces = Vector::Zero(),
77 const Vector& commands = Vector::Zero());
82 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
86 template <
class ConfigSpaceT>
89 constexpr
static std::size_t
NumDofs = ConfigSpaceT::NumDofs;
91 using Vector =
typename ConfigSpaceT::Vector;
151 const Vector& velocityLowerLimits
153 const Vector& velocityUpperLimits
155 const Vector& initialVelocities = Vector::Zero(),
156 const Vector& accelerationLowerLimits
158 const Vector& accelerationUpperLimits
160 const Vector& forceLowerLimits
162 const Vector& forceUpperLimits
167 const Vector& coulombFrictions = Vector::Zero());
184 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
188 template <
class ConfigSpaceT>
201 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
211 template <
class ConfigSpaceT>
214 template <
class ConfigSpaceT>
218 template <
class ConfigSpaceT>
222 const Vector& accelerations,
225 : mPositions(positions),
226 mVelocities(velocities),
227 mAccelerations(accelerations),
235 template <
class ConfigSpaceT>
240 const Vector& velocityLowerLimits,
241 const Vector& velocityUpperLimits,
242 const Vector& initialVelocities,
243 const Vector& accelerationLowerLimits,
244 const Vector& accelerationUpperLimits,
245 const Vector& forceLowerLimits,
246 const Vector& forceUpperLimits,
250 const Vector& coulombFrictions)
251 : mPositionLowerLimits(positionLowerLimits),
252 mPositionUpperLimits(positionUpperLimits),
253 mInitialPositions(initialPositions),
254 mVelocityLowerLimits(velocityLowerLimits),
255 mVelocityUpperLimits(velocityUpperLimits),
256 mInitialVelocities(initialVelocities),
257 mAccelerationLowerLimits(accelerationLowerLimits),
258 mAccelerationUpperLimits(accelerationUpperLimits),
259 mForceLowerLimits(forceLowerLimits),
260 mForceUpperLimits(forceUpperLimits),
264 mFrictions(coulombFrictions)
266 for (
auto i = 0u; i <
NumDofs; ++i)
274 template <
class ConfigSpaceT>
277 : mPositionLowerLimits(_other.mPositionLowerLimits),
278 mPositionUpperLimits(_other.mPositionUpperLimits),
279 mInitialPositions(_other.mInitialPositions),
280 mVelocityLowerLimits(_other.mVelocityLowerLimits),
281 mVelocityUpperLimits(_other.mVelocityUpperLimits),
282 mInitialVelocities(_other.mInitialVelocities),
283 mAccelerationLowerLimits(_other.mAccelerationLowerLimits),
284 mAccelerationUpperLimits(_other.mAccelerationUpperLimits),
285 mForceLowerLimits(_other.mForceLowerLimits),
286 mForceUpperLimits(_other.mForceUpperLimits),
287 mSpringStiffnesses(_other.mSpringStiffnesses),
288 mRestPositions(_other.mRestPositions),
289 mDampingCoefficients(_other.mDampingCoefficients),
290 mFrictions(_other.mFrictions)
292 for (
auto i = 0u; i <
NumDofs; ++i)
300 template <
class ConfigSpaceT>
322 for (
auto i = 0u; i < NumDofs; ++i)
332 template <
class ConfigSpaceT>
336 :
Joint::Properties(jointProperties),
343 template <
class Derived,
class ConfigSpaceT>
double * springStiffness
Definition: SkelParser.cpp:1691
double * dampingCoefficient
Definition: SkelParser.cpp:1693
double * restPosition
Definition: SkelParser.cpp:1692
This is an alternative to EmbedStateAndProperties which allows your class to also inherit other Compo...
Definition: EmbeddedAspect.hpp:435
class Joint
Definition: Joint.hpp:60
Definition: BulletCollisionDetector.cpp:65
Definition: GenericJointAspect.hpp:191
GenericJointProperties(const Joint::Properties &jointProperties=Joint::Properties(), const GenericJointUniqueProperties< ConfigSpaceT > &genericProperties=GenericJointUniqueProperties< ConfigSpaceT >())
Definition: GenericJointAspect.hpp:333
virtual ~GenericJointProperties()=default
Definition: GenericJointAspect.hpp:52
Vector mAccelerations
Generalized acceleration.
Definition: GenericJointAspect.hpp:64
constexpr static std::size_t NumDofs
Definition: GenericJointAspect.hpp:53
EuclideanPoint mPositions
Position.
Definition: GenericJointAspect.hpp:58
typename ConfigSpaceT::EuclideanPoint EuclideanPoint
Definition: GenericJointAspect.hpp:54
Vector mCommands
Command.
Definition: GenericJointAspect.hpp:70
GenericJointState(const EuclideanPoint &positions=EuclideanPoint::Zero(), const Vector &velocities=Vector::Zero(), const Vector &accelerations=Vector::Zero(), const Vector &forces=Vector::Zero(), const Vector &commands=Vector::Zero())
Definition: GenericJointAspect.hpp:219
typename ConfigSpaceT::Vector Vector
Definition: GenericJointAspect.hpp:55
Vector mVelocities
Generalized velocity.
Definition: GenericJointAspect.hpp:61
virtual ~GenericJointState()=default
Vector mForces
Generalized force.
Definition: GenericJointAspect.hpp:67
Definition: GenericJointAspect.hpp:88
Vector mAccelerationLowerLimits
Min value allowed.
Definition: GenericJointAspect.hpp:114
EuclideanPoint mPositionUpperLimits
Upper limit of position.
Definition: GenericJointAspect.hpp:99
BoolArray mPreserveDofNames
True if the name of the corresponding DOF is not allowed to be overwritten.
Definition: GenericJointAspect.hpp:139
GenericJointUniqueProperties & operator=(const GenericJointUniqueProperties &other)
Copy assignment operator.
Definition: GenericJointAspect.hpp:302
virtual ~GenericJointUniqueProperties()=default
Vector mVelocityUpperLimits
Max value allowed.
Definition: GenericJointAspect.hpp:108
StringArray mDofNames
The name of the DegreesOfFreedom for this Joint.
Definition: GenericJointAspect.hpp:142
Vector mAccelerationUpperLimits
upper limit of generalized acceleration
Definition: GenericJointAspect.hpp:117
std::array< std::string, NumDofs > StringArray
Definition: GenericJointAspect.hpp:93
Vector mDampingCoefficients
Joint damping coefficient.
Definition: GenericJointAspect.hpp:132
EuclideanPoint mInitialPositions
Initial positions.
Definition: GenericJointAspect.hpp:102
EuclideanPoint mPositionLowerLimits
Lower limit of position.
Definition: GenericJointAspect.hpp:96
Vector mForceLowerLimits
Min value allowed.
Definition: GenericJointAspect.hpp:120
typename ConfigSpaceT::EuclideanPoint EuclideanPoint
Definition: GenericJointAspect.hpp:90
GenericJointUniqueProperties(const EuclideanPoint &positionLowerLimits=EuclideanPoint::Constant(-math::constantsd::inf()), const EuclideanPoint &positionUpperLimits=EuclideanPoint::Constant(math::constantsd::inf()), const EuclideanPoint &initialPositions=EuclideanPoint::Zero(), const Vector &velocityLowerLimits=Vector::Constant(-math::constantsd::inf()), const Vector &velocityUpperLimits=Vector::Constant(math::constantsd::inf()), const Vector &initialVelocities=Vector::Zero(), const Vector &accelerationLowerLimits=Vector::Constant(-math::constantsd::inf()), const Vector &accelerationUpperLimits=Vector::Constant(math::constantsd::inf()), const Vector &forceLowerLimits=Vector::Constant(-math::constantsd::inf()), const Vector &forceUpperLimits=Vector::Constant(math::constantsd::inf()), const Vector &springStiffness=Vector::Zero(), const EuclideanPoint &restPosition=EuclideanPoint::Zero(), const Vector &dampingCoefficient=Vector::Zero(), const Vector &coulombFrictions=Vector::Zero())
Default constructor.
Definition: GenericJointAspect.hpp:236
constexpr static std::size_t NumDofs
Definition: GenericJointAspect.hpp:89
Vector mFrictions
Joint Coulomb friction.
Definition: GenericJointAspect.hpp:135
Vector mVelocityLowerLimits
Min value allowed.
Definition: GenericJointAspect.hpp:105
EuclideanPoint mRestPositions
Rest joint position for joint spring.
Definition: GenericJointAspect.hpp:129
std::array< bool, NumDofs > BoolArray
Definition: GenericJointAspect.hpp:92
typename ConfigSpaceT::Vector Vector
Definition: GenericJointAspect.hpp:91
Vector mInitialVelocities
Initial velocities.
Definition: GenericJointAspect.hpp:111
Vector mSpringStiffnesses
Joint spring stiffness.
Definition: GenericJointAspect.hpp:126
Vector mForceUpperLimits
Max value allowed.
Definition: GenericJointAspect.hpp:123
Definition: JointAspect.hpp:112
static constexpr T inf()
Definition: Constants.hpp:68