33#ifndef DART_DYNAMICS_DETAIL_GenericJointASPECT_HPP_
34#define DART_DYNAMICS_DETAIL_GenericJointASPECT_HPP_
44template <
class ConfigSpaceT>
class GenericJoint;
49template <
class ConfigSpaceT>
52 constexpr static std::size_t
NumDofs = ConfigSpaceT::NumDofs;
54 using Vector =
typename ConfigSpaceT::Vector;
73 const Vector& velocities = Vector::Zero(),
74 const Vector& accelerations = Vector::Zero(),
75 const Vector& forces = Vector::Zero(),
76 const Vector& commands = Vector::Zero());
81 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
85template <
class ConfigSpaceT>
88 constexpr static std::size_t
NumDofs = ConfigSpaceT::NumDofs;
90 using Vector =
typename ConfigSpaceT::Vector;
150 const Vector& initialVelocities = Vector::Zero(),
158 const Vector& coulombFrictions = Vector::Zero());
169 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
174template <
class ConfigSpaceT>
188 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
198template <
class ConfigSpaceT>
201template <
class ConfigSpaceT>
205template <
class ConfigSpaceT>
209 const Vector& accelerations,
212 : mPositions(positions),
213 mVelocities(velocities),
214 mAccelerations(accelerations),
222template <
class ConfigSpaceT>
227 const Vector& velocityLowerLimits,
228 const Vector& velocityUpperLimits,
229 const Vector& initialVelocities,
230 const Vector& accelerationLowerLimits,
231 const Vector& accelerationUpperLimits,
232 const Vector& forceLowerLimits,
233 const Vector& forceUpperLimits,
237 const Vector& coulombFrictions)
238 : mPositionLowerLimits(positionLowerLimits),
239 mPositionUpperLimits(positionUpperLimits),
240 mInitialPositions(initialPositions),
241 mVelocityLowerLimits(velocityLowerLimits),
242 mVelocityUpperLimits(velocityUpperLimits),
243 mInitialVelocities(initialVelocities),
244 mAccelerationLowerLimits(accelerationLowerLimits),
245 mAccelerationUpperLimits(accelerationUpperLimits),
246 mForceLowerLimits(forceLowerLimits),
247 mForceUpperLimits(forceUpperLimits),
251 mFrictions(coulombFrictions)
253 for (
auto i = 0u; i <
NumDofs; ++i)
261template <
class ConfigSpaceT>
264 : mPositionLowerLimits(_other.mPositionLowerLimits),
265 mPositionUpperLimits(_other.mPositionUpperLimits),
266 mInitialPositions(_other.mInitialPositions),
267 mVelocityLowerLimits(_other.mVelocityLowerLimits),
268 mVelocityUpperLimits(_other.mVelocityUpperLimits),
269 mInitialVelocities(_other.mInitialVelocities),
270 mAccelerationLowerLimits(_other.mAccelerationLowerLimits),
271 mAccelerationUpperLimits(_other.mAccelerationUpperLimits),
272 mForceLowerLimits(_other.mForceLowerLimits),
273 mForceUpperLimits(_other.mForceUpperLimits),
274 mSpringStiffnesses(_other.mSpringStiffnesses),
275 mRestPositions(_other.mRestPositions),
276 mDampingCoefficients(_other.mDampingCoefficients),
277 mFrictions(_other.mFrictions)
279 for (
auto i = 0u; i <
NumDofs; ++i)
287template <
class ConfigSpaceT>
291 :
Joint::Properties(jointProperties),
298template <
class Derived,
class ConfigSpaceT>
double * springStiffness
Definition SkelParser.cpp:1636
double * dampingCoefficient
Definition SkelParser.cpp:1638
double * restPosition
Definition SkelParser.cpp:1637
This is an alternative to EmbedStateAndProperties which allows your class to also inherit other Compo...
Definition EmbeddedAspect.hpp:438
class Joint
Definition Joint.hpp:59
Definition BulletCollisionDetector.cpp:63
Definition GenericJointAspect.hpp:178
GenericJointProperties(const Joint::Properties &jointProperties=Joint::Properties(), const GenericJointUniqueProperties< ConfigSpaceT > &genericProperties=GenericJointUniqueProperties< ConfigSpaceT >())
Definition GenericJointAspect.hpp:288
virtual ~GenericJointProperties()=default
Definition GenericJointAspect.hpp:51
Vector mAccelerations
Generalized acceleration.
Definition GenericJointAspect.hpp:63
static constexpr std::size_t NumDofs
Definition GenericJointAspect.hpp:52
EuclideanPoint mPositions
Position.
Definition GenericJointAspect.hpp:57
typename ConfigSpaceT::EuclideanPoint EuclideanPoint
Definition GenericJointAspect.hpp:53
Vector mCommands
Command.
Definition GenericJointAspect.hpp:69
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:206
typename ConfigSpaceT::Vector Vector
Definition GenericJointAspect.hpp:54
Vector mVelocities
Generalized velocity.
Definition GenericJointAspect.hpp:60
virtual ~GenericJointState()=default
Vector mForces
Generalized force.
Definition GenericJointAspect.hpp:66
Definition GenericJointAspect.hpp:87
Vector mAccelerationLowerLimits
Min value allowed.
Definition GenericJointAspect.hpp:113
EuclideanPoint mPositionUpperLimits
Upper limit of position.
Definition GenericJointAspect.hpp:98
BoolArray mPreserveDofNames
True if the name of the corresponding DOF is not allowed to be overwritten.
Definition GenericJointAspect.hpp:138
virtual ~GenericJointUniqueProperties()=default
Vector mVelocityUpperLimits
Max value allowed.
Definition GenericJointAspect.hpp:107
StringArray mDofNames
The name of the DegreesOfFreedom for this Joint.
Definition GenericJointAspect.hpp:141
Vector mAccelerationUpperLimits
upper limit of generalized acceleration
Definition GenericJointAspect.hpp:116
std::array< std::string, NumDofs > StringArray
Definition GenericJointAspect.hpp:92
Vector mDampingCoefficients
Joint damping coefficient.
Definition GenericJointAspect.hpp:131
EuclideanPoint mInitialPositions
Initial positions.
Definition GenericJointAspect.hpp:101
EuclideanPoint mPositionLowerLimits
Lower limit of position.
Definition GenericJointAspect.hpp:95
Vector mForceLowerLimits
Min value allowed.
Definition GenericJointAspect.hpp:119
typename ConfigSpaceT::EuclideanPoint EuclideanPoint
Definition GenericJointAspect.hpp:89
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:223
static constexpr std::size_t NumDofs
Definition GenericJointAspect.hpp:88
Vector mFrictions
Joint Coulomb friction.
Definition GenericJointAspect.hpp:134
Vector mVelocityLowerLimits
Min value allowed.
Definition GenericJointAspect.hpp:104
EuclideanPoint mRestPositions
Rest joint position for joint spring.
Definition GenericJointAspect.hpp:128
std::array< bool, NumDofs > BoolArray
Definition GenericJointAspect.hpp:91
typename ConfigSpaceT::Vector Vector
Definition GenericJointAspect.hpp:90
Vector mInitialVelocities
Initial velocities.
Definition GenericJointAspect.hpp:110
Vector mSpringStiffnesses
Joint spring stiffness.
Definition GenericJointAspect.hpp:125
Vector mForceUpperLimits
Max value allowed.
Definition GenericJointAspect.hpp:122
Definition JointAspect.hpp:112
static constexpr T inf()
Definition Constants.hpp:54