Moby
Public Member Functions | Protected Member Functions | List of all members
Moby::RCArticulatedBody Class Reference

Defines an articulated body for use with reduced-coordinate dynamics algorithms. More...

#include <RCArticulatedBody.h>

Inheritance diagram for Moby::RCArticulatedBody:
Moby::ArticulatedBody Moby::ControlledBody Moby::Visualizable Moby::Base

Public Member Functions

 RCArticulatedBody ()
 Default constructor. More...
 
RCArticulatedBodyPtr clone () const
 Clones this.
 
virtual void load_from_xml (boost::shared_ptr< const XMLTree > node, std::map< std::string, BasePtr > &id_map)
 Implements Base::load_from_xml() More...
 
virtual void save_to_xml (XMLTreePtr node, std::list< boost::shared_ptr< const Base > > &shared_objects) const
 Implements Base::save_to_xml()
 
virtual void set_links_and_joints (const std::vector< RigidBodyPtr > &links, const std::vector< JointPtr > &joints)
 Sets the vector of links and joints.
 
virtual void apply_generalized_impulse (const Ravelin::SharedVectorNd &gj)
 Applies a generalized impulse to the rigid body (calls the simulator)
 
- Public Member Functions inherited from Moby::ArticulatedBody
virtual void update_visualization ()
 Updates visualization for the body.
 
void update_joint_constraint_violations ()
 Updates joint constraint violation (after integration)
 
bool is_joint_constraint_violated () const
 Checks for a joint constraint violation.
 
virtual void prepare_to_calc_ode (Ravelin::SharedConstVectorNd &x, double t, double dt, void *data)
 Prepares to compute the ODE.
 
virtual void prepare_to_calc_ode_sustained_constraints (Ravelin::SharedConstVectorNd &x, double t, double dt, void *data)
 Integrates a dynamic body. More...
 
virtual void ode (double t, double dt, void *data, Ravelin::SharedVectorNd &dx)
 Returns the ODE's for position and velocity (concatenated into x)
 
template<class OutputIterator >
OutputIterator find_limit_constraints (OutputIterator begin) const
 Finds (joint) limit constraints. More...
 
ArticulatedBodyPtr get_this ()
 Gets shared pointer to this object as type ArticulatedBody.
 
boost::shared_ptr< const
ArticulatedBody
get_this () const
 Gets shared pointer to this object as type const ArticulateBody.
 
template<class OutputIterator >
OutputIterator find_limit_constraints (OutputIterator output_begin) const
 Gets joint limit constraints.
 
- Public Member Functions inherited from Moby::ControlledBody
const std::list
< RecurrentForcePtr > & 
get_recurrent_forces () const
 Gets the set of recurrent forces applied to this body.
 
std::list< RecurrentForcePtr > & get_recurrent_forces ()
 Gets the set of recurrent forces applied to this body.
 
- Public Member Functions inherited from Moby::Visualizable
 Visualizable (const Visualizable *v)
 
void set_visualization_relative_pose (const Ravelin::Pose3d &P)
 Sets the visualization relative pose.
 
virtual void set_visualization_data (osg::Node *vdata)
 Sets the visualization data from a node.
 
virtual void set_visualization_data (OSGGroupWrapperPtr vdata)
 Sets the visualization data from a OSGGroupWrapper.
 
osg::Group * get_visualization_data () const
 Gets the visualization data for this object.
 
boost::shared_ptr< const
Ravelin::Pose3d > 
get_visualization_pose ()
 Gets the pose for this visualizable object.
 
- Public Member Functions inherited from Moby::Base
 Base (const Base *b)
 

Protected Member Functions

virtual void compile ()
 Compiles this body (updates the link transforms and velocities)
 

Additional Inherited Members

- Static Public Member Functions inherited from Moby::Visualizable
static osg::Group * construct_from_node (boost::shared_ptr< const XMLTree > node, const std::map< std::string, BasePtr > &id_map)
 Utility method for load_from_xml() More...
 
- Static Public Member Functions inherited from Moby::Base
template<class T >
static boost::shared_ptr< T > clone (boost::shared_ptr< T > x)
 Static method for cloning a shared pointer.
 
- Public Attributes inherited from Moby::ControlledBody
Ravelin::VectorNd &(* controller )(boost::shared_ptr< ControlledBody > body, Ravelin::VectorNd &, double, void *)
 The controller callback, if any, for this body.
 
void * controller_arg
 Argument to be passed to the controller.
 
- Public Attributes inherited from Moby::Base
boost::shared_ptr< void > userdata
 Any relevant userdata.
 
std::string id
 The unique ID for this object.
 
- Protected Attributes inherited from Moby::ControlledBody
boost::weak_ptr< Simulatorsimulator
 Pointer to the simulator (necessary for applying impulses w/constraints)
 
- Protected Attributes inherited from Moby::Visualizable
boost::shared_ptr
< Ravelin::Pose3d > 
_vF
 The relative pose.
 
OSGGroupWrapperPtr _vizdata
 The underlying visualization data.
 

Detailed Description

Defines an articulated body for use with reduced-coordinate dynamics algorithms.

Reduced-coordinate articulated bodies cannot rely upon the integrator to automatically update the states (i.e., positions, velocities) of the links, as is done with maximal-coordinate articulated bodies. Rather, the integrator updates the joint positions and velocities; the states are obtained from this reduced-coordinate representation. Notes about concurrency:

It is generally desirable to be able to run forward dynamics and inverse dynamics algorithms concurrently to simulate actual robotic systems. In general, derived classes should not operate on state variables (joint positions, velocities, accelerations and floating base positions, velocites, and accelerations) directly during execution of the algorithm. Rather, derived classes should operate on copies of the state variables, updating the state variables on conclusion of the algorithms.

Constructor & Destructor Documentation

RCArticulatedBody::RCArticulatedBody ( )

Default constructor.

Constructs a reduced-coordinate articulated body with no joints and no links.

Member Function Documentation

void RCArticulatedBody::load_from_xml ( boost::shared_ptr< const XMLTree node,
std::map< std::string, BasePtr > &  id_map 
)
virtual

Implements Base::load_from_xml()

Precondition
all links and joints must be loaded using their respective serialization methods before this method is called

Reimplemented from Moby::ArticulatedBody.

References Moby::XMLAttrib::get_bool_value(), Moby::XMLAttrib::get_origin_value(), and Moby::XMLAttrib::get_rpy_value().


The documentation for this class was generated from the following files: