Ravelin
FixedJoint.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 FIXEDJOINT
7 #error This class is not to be included by the user directly. Use FixedJointd.h or FixedJointf.h instead.
8 #endif
9 
11 class FIXEDJOINT : public virtual JOINT
12 {
13  public:
14  FIXEDJOINT();
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 0; }
20  virtual void evaluate_constraints(REAL C[]);
21  virtual void set_inboard_pose(boost::shared_ptr<const POSE3> inboard_pose, bool update_joint_pose);
22  virtual void set_outboard_pose(boost::shared_ptr<POSE3> outboard_pose, bool update_joint_pose);
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  private:
30  void setup_joint();
31 
33  boost::shared_ptr<POSE3> _T;
34 
36  VECTOR3 _rconst;
37 
39  VECTOR3 _ui;
40 
42  std::vector<SVELOCITY> _s_dot;
43 
45  boost::shared_ptr<POSE3> _F1, _F2;
46 }; // end class
47 
virtual void calc_constraint_jacobian_dot(bool inboard, MATRIXN &Cq)
Computes the constraint Jacobian.
Definition: FixedJoint.cpp:117
virtual const std::vector< SVELOCITY > & get_spatial_axes_dot()
Gets the derivative for the spatial axes for this joint.
Definition: FixedJoint.cpp:95
virtual void evaluate_constraints(REAL C[])
Evaluates the constraint equations.
Definition: FixedJoint.cpp:124
virtual unsigned num_dof() const
Gets the number of degrees-of-freedom for this joint.
Definition: FixedJoint.h:19
virtual boost::shared_ptr< const POSE3 > get_induced_pose()
Gets the (local) transform for this joint (constant)
Definition: FixedJoint.cpp:88
Defines a joint for fixing two bodies together or fixing one body to the ground.
Definition: FixedJoint.h:11
virtual void determine_q(VECTORN &q)
Abstract method to determine the value of Q (joint position) from current transforms.
Definition: FixedJoint.h:16
A generic, possibly non-square matrix.
Definition: MatrixN.h:18
virtual void calc_constraint_jacobian(bool inboard, MATRIXN &Cq)
Computes the constraint Jacobian.
Definition: FixedJoint.cpp:101
VECTORN q
The position of this joint.
Definition: Joint.h:144
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
Defines a bilateral constraint (a joint)
Definition: Joint.h:14
FIXEDJOINT()
Initializes the joint.
Definition: FixedJoint.cpp:10
virtual void update_spatial_axes()
Sets spatial axes to zero.
Definition: FixedJoint.cpp:24
virtual bool is_singular_config() const
Fixed joint can never be in a singular configuration.
Definition: FixedJoint.h:27