10 #include <boost/weak_ptr.hpp>
11 #include <boost/shared_ptr.hpp>
12 #include <Ravelin/Pose3d.h>
13 #include <Ravelin/MatrixNd.h>
14 #include <Ravelin/SAcceld.h>
15 #include <Ravelin/LinAlgd.h>
16 #include <Ravelin/DynamicBodyd.h>
17 #include <Moby/Base.h>
18 #include <Moby/RigidBody.h>
19 #include <Moby/Visualizable.h>
20 #include <Moby/Joint.h>
24 class VisualizationData;
36 virtual void save_to_xml(
XMLTreePtr node, std::list<boost::shared_ptr<const Base> >& shared_objects)
const;
37 virtual void load_from_xml(boost::shared_ptr<const XMLTree> node, std::map<std::string, BasePtr>& id_map);
38 virtual void set_inboard_pose(boost::shared_ptr<const Ravelin::Pose3d> link,
bool update_joint_pose);
39 virtual void set_outboard_pose(boost::shared_ptr<const Ravelin::Pose3d> link,
bool update_joint_pose);
44 virtual unsigned num_dof()
const {
return 0; }
45 virtual unsigned num_constraint_eqns()
const {
return 1; }
46 virtual void determine_q(Ravelin::VectorNd& q) {}
47 virtual boost::shared_ptr<const Ravelin::Pose3d> get_induced_pose() {
return boost::shared_ptr<const Ravelin::Pose3d>(); }
48 virtual bool is_singular_config()
const {
return false; }
49 virtual const std::vector<Ravelin::SVelocityd>& get_spatial_axes_dot() {
return _sdot; }
54 std::vector<Ravelin::SVelocityd> _sdot;
virtual void calc_constraint_jacobian(bool inboard, Ravelin::MatrixNd &Cq)
Computes the constraint Jacobian.
Definition: Gears.cpp:64
virtual void load_from_xml(boost::shared_ptr< const XMLTree > node, std::map< std::string, BasePtr > &id_map)
Implements Base::load_from_xml()
Definition: Gears.cpp:107
virtual void set_inboard_pose(boost::shared_ptr< const Ravelin::Pose3d > link, bool update_joint_pose)
Sets the inboard pose.
Definition: Gears.cpp:48
virtual void calc_constraint_jacobian_dot(bool inboard, Ravelin::MatrixNd &Cq)
Computes the time derivative of the constraint Jacobian.
Definition: Gears.cpp:100
virtual void evaluate_constraints(double C[])
Evaluates the joint constraint.
Definition: Gears.cpp:34
virtual void evaluate_constraints_dot(double C[])
Evaluates the time derivative of the constraint.
Definition: Gears.cpp:41
boost::shared_ptr< XMLTree > XMLTreePtr
XML tree smart pointer.
Definition: Types.h:104
virtual void save_to_xml(XMLTreePtr node, std::list< boost::shared_ptr< const Base > > &shared_objects) const
Implements Base::save_to_xml()
Definition: Gears.cpp:122
Defines a gear ("joint") constraint.
Definition: Gears.h:30
Defines a joint used in articulated rigid body dynamics simulation.
Definition: Joint.h:30
Gears()
Initializes the joint.
Definition: Gears.cpp:27
virtual void set_outboard_pose(boost::shared_ptr< const Ravelin::Pose3d > link, bool update_joint_pose)
Sets the outboard pose.
Definition: Gears.cpp:56