SCL  1.0
Standard Control Library : Control, dynamics, physics, and simulation
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Friends Macros Groups Pages
Public Member Functions | Protected Attributes | List of all members
scl::CDynamicsAnalyticBase Class Referenceabstract

#include <CDynamicsAnalyticBase.hpp>

Inheritance diagram for scl::CDynamicsAnalyticBase:
Inheritance graph
[legend]

Public Member Functions

virtual sBool computeGCModel (const Eigen::VectorXd &arg_q, SGcModel &arg_gc_model)=0
 
virtual sBool computeTransformationMatrix (const Eigen::VectorXd &arg_q, sInt arg_link_id, sInt arg_ancestor_link_id, Eigen::Affine3d &arg_T)=0
 
virtual sBool computeJacobian (const Eigen::VectorXd &arg_q, sInt arg_link_id, const Eigen::VectorXd &arg_pos_local, Eigen::MatrixXd &arg_J)=0
 
virtual sUInt getIdForLink (std::string arg_link_name)=0
 
 CDynamicsAnalyticBase ()
 
virtual ~CDynamicsAnalyticBase ()
 
virtual sBool init (const SRobotParsed &arg_robot_data)=0
 
virtual sBool hasBeenInit ()
 

Protected Attributes

sBool has_been_init_
 

Detailed Description

A base class for an analytic dynamics implementation for an actuated articulated body (a robot).

All dynamics implementations must try to be stateless. Ie. After one initial configuration that specifies the dynamic model's parameters, they must not store any more data. Pass in the model configuration as an argument and return the new state and/or dynamics matrices.

Constructor & Destructor Documentation

scl::CDynamicsAnalyticBase::CDynamicsAnalyticBase ( )
inline

Default constructor sets the initialization state to false

virtual scl::CDynamicsAnalyticBase::~CDynamicsAnalyticBase ( )
inlinevirtual

Default destructor does nothing

Member Function Documentation

virtual sBool scl::CDynamicsAnalyticBase::computeGCModel ( const Eigen::VectorXd &  arg_q,
SGcModel arg_gc_model 
)
pure virtual

Updates the generalized coordinate model matrices (Everything in SGcModel).

This is the most efficient method to access the standard matrices. Computing transformations and Jacobians individually is typically wasteful.

Parameters
arg_qThe generalized coordinates
arg_gc_modelAll individual dynamics matrices will be saved here.

Implemented in scl::CDynamicsAnalyticRPP.

virtual sBool scl::CDynamicsAnalyticBase::computeJacobian ( const Eigen::VectorXd &  arg_q,
sInt  arg_link_id,
const Eigen::VectorXd &  arg_pos_local,
Eigen::MatrixXd &  arg_J 
)
pure virtual

Calculates the Jacobian for the robot to which this dynamics object is assigned.

The Jacobian is specified by a link and an offset (in task space dimensions)from that link

Uses id based link lookup. The dynamics implementation should support this (maintain a map or something).

Parameters
arg_qThe generalized coordinates
arg_link_idThe link at which the Jacobian is to be calculated
arg_pos_localThe offset from the link's frame (in local coordinates).
arg_JThe Jacobian will be saved here.

Implemented in scl::CDynamicsAnalyticRPP.

virtual sBool scl::CDynamicsAnalyticBase::computeTransformationMatrix ( const Eigen::VectorXd &  arg_q,
sInt  arg_link_id,
sInt  arg_ancestor_link_id,
Eigen::Affine3d &  arg_T 
)
pure virtual

Calculates the Transformation Matrix for the robot to which this dynamics object is assigned.

The Transformation Matrix is specified by a link and an offset (in task space dimensions)from that link and is given by:

      x_ancestor_frame_coords = T * x_link_coords

Uses id based link lookup. The dynamics implementation should support this (maintain a map or something).

Parameters
arg_qThe generalized coordinates
arg_link_idThe link at which the transformation matrix is to be calculated
arg_ancestor_link_idThe link up to which the transformation matrix is to be calculated
arg_TThe transformation matrix will be saved here.

Implemented in scl::CDynamicsAnalyticRPP.

virtual sUInt scl::CDynamicsAnalyticBase::getIdForLink ( std::string  arg_link_name)
pure virtual

Gives an id for a link name.

Useful because:

  1. Allows storing any dynamic-engine specific objects in the controller.
  2. Avoids using inefficient repeated string based lookup (usually with maps)

Implemented in scl::CDynamicsAnalyticRPP.

virtual sBool scl::CDynamicsAnalyticBase::hasBeenInit ( )
inlinevirtual

Initialization state

Reimplemented in scl::CDynamicsAnalyticRPP.

virtual sBool scl::CDynamicsAnalyticBase::init ( const SRobotParsed arg_robot_data)
pure virtual

Initializes the dynamics to be computed for a specific robot.

Returns, true : Succeeds in creating a dynamics object

false : If it can't find the robot or if the information is inconsistent with what the implementation requires, it returns false

Implemented in scl::CDynamicsAnalyticRPP.

Member Data Documentation

sBool scl::CDynamicsAnalyticBase::has_been_init_
protected

True if the dynamics object has been initialized for a given robot


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