7 #error This class is not to be included by the user directly. Use SphericalJointd.h or SphericalJointf.h instead.
14 enum Axis { eAxis1, eAxis2, eAxis3 };
21 virtual unsigned num_dof()
const {
return 3; }
Defines a joint for purely rotational motion.
Definition: SphericalJoint.h:11
MATRIX3 get_rotation() const
Gets the (local) rotation induced by this joint.
Definition: SphericalJoint.cpp:298
VECTOR3 get_axis(Axis a) const
Gets the global axis for this joint.
Definition: SphericalJoint.cpp:48
virtual bool is_singular_config() const
Spherical joint is singular if sin(q1) = 0 and cos(q2) = 0.
Definition: SphericalJoint.h:29
SPHERICALJOINT()
Initializes the joint.
Definition: SphericalJoint.cpp:11
virtual void determine_q(VECTORN &q)
Determines (and sets) the value of Q from the axes and the inboard link and outboard link transforms...
Definition: SphericalJoint.cpp:292
virtual void update_spatial_axes()
Updates the spatial axis for this joint.
Definition: SphericalJoint.cpp:99
A generic, possibly non-square matrix.
Definition: MatrixN.h:18
REAL SINGULAR_TOL
The tolerance to which a joint configuration is considered singular.
Definition: SphericalJoint.h:37
virtual void calc_constraint_jacobian(bool inboard, MATRIXN &Cq)
Computes the constraint jacobian with respect to a body.
Definition: SphericalJoint.cpp:349
std::vector< SVELOCITY > _s_dot
The derivative of the spatial axis.
Definition: SphericalJoint.h:49
VECTORN q
The position of this joint.
Definition: Joint.h:144
virtual boost::shared_ptr< const POSE3 > get_induced_pose()
Gets the (local) transform for this joint.
Definition: SphericalJoint.cpp:319
virtual void calc_constraint_jacobian_dot(bool inboard, MATRIXN &Cq)
Computes the time derivative of the constraint jacobian with respect to a body.
Definition: SphericalJoint.cpp:413
A generic N-dimensional floating point vector.
Definition: VectorN.h:16
A three-dimensional floating point vector used for representing points and vectors in 3D with associa...
Definition: Vector3.h:15
VECTOR3 _u[3]
The local joint axes.
Definition: SphericalJoint.h:46
Defines a bilateral constraint (a joint)
Definition: Joint.h:14
virtual const std::vector< SVELOCITY > & get_spatial_axes()
Gets the spatial axes for this joint.
Definition: SphericalJoint.cpp:204
bool assign_axes()
Attempts to compute unassigned axes.
Definition: SphericalJoint.cpp:131
virtual const std::vector< SVELOCITY > & get_spatial_axes_dot()
Gets the derivative of the spatial-axis.
Definition: SphericalJoint.cpp:243
virtual void evaluate_constraints(REAL C[])
Evaluates the constraint equations.
Definition: SphericalJoint.cpp:327
virtual unsigned num_dof() const
Gets the number of degrees-of-freedom for this joint.
Definition: SphericalJoint.h:21
static bool rel_equal(REAL x, REAL y)
Determines whether two values are relatively equal.
Definition: SphericalJoint.cpp:36
A 3x3 matrix that may be used for orientation, inertia tensors, etc.
Definition: Matrix3.h:20
void set_axis(const VECTOR3 &axis, Axis a)
Sets the local axis of rotation for this joint (MUST BE CALLED AFTER set_location(.))
Definition: SphericalJoint.cpp:90