7 #ifndef ARTICULATED_BODY
8 #error This class is not to be included by the user directly. Use ArticulatedBodyd.h or ArticulatedBodyf.h instead.
20 virtual bool is_floating_base()
const = 0;
21 virtual boost::shared_ptr<RIGIDBODY> get_base_link()
const = 0;
26 virtual REAL
calc_kinetic_energy(boost::shared_ptr<const POSE3> P = boost::shared_ptr<const POSE3>());
27 boost::shared_ptr<RIGIDBODY> find_link(
const std::string&
id)
const;
28 boost::shared_ptr<JOINT> find_joint(
const std::string&
id)
const;
29 void get_adjacent_links(std::list<sorted_pair<boost::shared_ptr<RIGIDBODY> > >& links)
const;
30 virtual void set_links_and_joints(
const std::vector<boost::shared_ptr<RIGIDBODY> >& links,
const std::vector<boost::shared_ptr<JOINT> >& joints);
32 void find_loops(std::vector<unsigned>& loop_indices, std::vector<std::vector<unsigned> >& loop_links)
const;
33 virtual MATRIXN&
calc_jacobian(boost::shared_ptr<const POSE3> source_pose, boost::shared_ptr<const POSE3> target_pose, boost::shared_ptr<DYNAMIC_BODY> body,
MATRIXN& J);
34 virtual MATRIXN& calc_jacobian_dot(boost::shared_ptr<const POSE3> source_pose, boost::shared_ptr<const POSE3> target_pose, boost::shared_ptr<DYNAMIC_BODY> body,
MATRIXN& J);
36 virtual MATRIXN& calc_jacobian_dot(boost::shared_ptr<const POSE3> target_pose, boost::shared_ptr<DYNAMIC_BODY> body,
MATRIXN& J);
48 virtual const std::vector<boost::shared_ptr<RIGIDBODY> >&
get_links()
const {
return _links; }
51 virtual const std::vector<boost::shared_ptr<JOINT> >&
get_joints()
const {
return _joints; }
63 boost::shared_ptr<const ARTICULATED_BODY>
get_this()
const {
return boost::dynamic_pointer_cast<
const ARTICULATED_BODY>(shared_from_this()); }
88 std::vector<boost::shared_ptr<RIGIDBODY> >
_links;
91 std::vector<boost::shared_ptr<JOINT> >
_joints;
97 std::vector<REAL> _cvio;
100 std::vector<REAL> _cvel_vio;
std::vector< boost::shared_ptr< JOINT > > _joints
The set of joints for this articulated body.
Definition: ArticulatedBody.h:91
virtual const std::vector< boost::shared_ptr< RIGIDBODY > > & get_links() const
Gets the set of links.
Definition: ArticulatedBody.h:48
Abstract class for articulated bodies.
Definition: ArticulatedBody.h:15
virtual void rotate(const QUAT &q)
Transforms all links in the articulated body by the given transform.
Definition: ArticulatedBody.cpp:374
Quaternion class used for orientation.
Definition: Quat.h:21
virtual const std::vector< boost::shared_ptr< JOINT > > & get_joints() const
Gets the set of joints.
Definition: ArticulatedBody.h:51
virtual bool is_enabled() const
Articulated bodies are always enabled.
Definition: ArticulatedBody.h:39
virtual void apply_impulse(const SMOMENTUM &w, boost::shared_ptr< RIGIDBODY > link)=0
Abstract method for applying an impulse to this articulated body.
A spatial (six dimensional) momentum.
Definition: SMomentum.h:12
virtual const std::vector< boost::shared_ptr< JOINT > > & get_implicit_joints() const =0
Gets the set of implicit joints.
A generic, possibly non-square matrix.
Definition: MatrixN.h:18
Represents a single rigid body.
Definition: RigidBody.h:23
virtual void reset_accumulators()=0
Method for resetting the force and torque accumulators on all links.
Definition: ArticulatedBody.cpp:396
virtual REAL calc_kinetic_energy(boost::shared_ptr< const POSE3 > P=boost::shared_ptr< const POSE3 >())
Calculates the combined kinetic energy of all links in this body with respect to the base frame...
Definition: ArticulatedBody.cpp:382
virtual void translate(const ORIGIN3 &o)
Transforms all links in the articulated body by the given transform.
Definition: ArticulatedBody.cpp:363
virtual const std::vector< boost::shared_ptr< JOINT > > & get_explicit_joints() const =0
Gets the set of explicit joints.
virtual void compile()
Method for "compiling" the body.
Definition: ArticulatedBody.cpp:22
boost::shared_ptr< ARTICULATED_BODY > get_this()
Gets shared pointer to this object as type ARTICULATED_BODY.
Definition: ArticulatedBody.h:60
Superclass for deformable bodies and single and multi-rigid bodies.
Definition: DynamicBody.h:14
unsigned num_constraint_eqns_explicit() const
Gets the number of explicit joint constraint equations.
Definition: ArticulatedBody.cpp:304
virtual unsigned num_joint_dof() const
Gets the number of joint degrees of freedom permitted by both implicit and explicit joint constraints...
Definition: ArticulatedBody.cpp:326
A generic N-dimensional floating point vector.
Definition: VectorN.h:16
unsigned num_constraint_eqns_implicit() const
Gets the number of implicit joint constraint equations.
Definition: ArticulatedBody.cpp:315
std::vector< unsigned > _processed
Vector for processing links.
Definition: ArticulatedBody.h:77
Defines a bilateral constraint (a joint)
Definition: Joint.h:14
A three-dimensional floating point vector used for representing points and vectors in 3D and without ...
Definition: Origin3.h:16
virtual unsigned num_joint_dof_explicit() const =0
Gets the number of degrees-of-freedom permitted by explicit constraints.
std::vector< boost::shared_ptr< RIGIDBODY > > _links
The set of links for this articulated body.
Definition: ArticulatedBody.h:88
boost::shared_ptr< const ARTICULATED_BODY > get_this() const
Gets shared pointer to this object as type const ArticulateBody.
Definition: ArticulatedBody.h:63
virtual MATRIXN & calc_jacobian(boost::shared_ptr< const POSE3 > source_pose, boost::shared_ptr< const POSE3 > target_pose, boost::shared_ptr< DYNAMIC_BODY > body, MATRIXN &J)
The Jacobian transforms from the generalized coordinate from to the given frame.
virtual unsigned num_joint_dof_implicit() const =0
Gets the number of degrees-of-freedom permitted by implicit constraints.