Ravelin
RevoluteJoint.h
1 /****************************************************************************
2  * Copyright 2014 Evan Drumwright
3  * This library is distributed under the terms of the Apache V2.0 License
4  ****************************************************************************/
5 
6 #ifndef REVOLUTEJOINT
7 #error This class is not to be included by the user directly. Use RevoluteJointd.h or RevoluteJointf.h instead.
8 #endif
9 
11 class REVOLUTEJOINT : public virtual JOINT
12 {
13  public:
14  REVOLUTEJOINT();
15  virtual void update_spatial_axes();
16  virtual void determine_q(VECTORN& q);
17  virtual boost::shared_ptr<const POSE3> get_induced_pose();
18  virtual const std::vector<SVELOCITY>& get_spatial_axes_dot();
19  virtual unsigned num_dof() const { return 1; }
20  virtual void evaluate_constraints(REAL C[]);
21  VECTOR3 get_axis() const;
22  void set_axis(const VECTOR3& axis);
23  virtual void calc_constraint_jacobian(bool inboard, MATRIXN& Cq);
24  virtual void calc_constraint_jacobian_dot(bool inboard, MATRIXN& Cq);
25 
27  virtual bool is_singular_config() const { return false; }
28 
29  protected:
30 
33 
35  VECTOR3 _ui, _uj;
36 
39 
41  std::vector<SVELOCITY> _s_dot;
42 }; // end class
43 
virtual void calc_constraint_jacobian(bool inboard, MATRIXN &Cq)
Computes the constraint jacobian with respect to a body.
Definition: RevoluteJoint.cpp:150
void set_axis(const VECTOR3 &axis)
Sets the axis of rotation for this joint (MUST BE CALLED AFTER set_location(.))
Definition: RevoluteJoint.cpp:27
virtual unsigned num_dof() const
Gets the number of degrees-of-freedom for this joint.
Definition: RevoluteJoint.h:19
A generic, possibly non-square matrix.
Definition: MatrixN.h:18
virtual void calc_constraint_jacobian_dot(bool inboard, MATRIXN &Cq)
Computes the time derivative of the constraint jacobian with respect to a body.
Definition: RevoluteJoint.cpp:250
virtual void evaluate_constraints(REAL C[])
Evaluates the constraint equations.
Definition: RevoluteJoint.cpp:118
virtual bool is_singular_config() const
Revolute joint can never be in a singular configuration.
Definition: RevoluteJoint.h:27
VECTOR3 _ui
Two unit vectors that make a orthonormal basis with _u.
Definition: RevoluteJoint.h:35
VECTOR3 _v2
The joint axis (defined in outer relative pose coordinates)
Definition: RevoluteJoint.h:38
VECTORN q
The position of this joint.
Definition: Joint.h:144
virtual const std::vector< SVELOCITY > & get_spatial_axes_dot()
Gets the derivative for the spatial axes for this joint.
Definition: RevoluteJoint.cpp:112
A generic N-dimensional floating point vector.
Definition: VectorN.h:16
virtual void determine_q(VECTORN &q)
Determines (and sets) the value of Q from the axis and the inboard link and outboard link transforms...
Definition: RevoluteJoint.cpp:70
std::vector< SVELOCITY > _s_dot
The time derivative of the spatial axis – should be zero vector 6x1.
Definition: RevoluteJoint.h:41
A three-dimensional floating point vector used for representing points and vectors in 3D with associa...
Definition: Vector3.h:15
REVOLUTEJOINT()
Initializes the joint.
Definition: RevoluteJoint.cpp:11
Defines a rotary joint.
Definition: RevoluteJoint.h:11
virtual boost::shared_ptr< const POSE3 > get_induced_pose()
Gets the pose for this joint.
Definition: RevoluteJoint.cpp:103
VECTOR3 _u
The joint axis (defined in inner relative pose coordinates)
Definition: RevoluteJoint.h:32
Defines a bilateral constraint (a joint)
Definition: Joint.h:14
virtual void update_spatial_axes()
Updates the spatial axis for this joint.
Definition: RevoluteJoint.cpp:56