KDL::Segment Class Reference

This class encapsulates a simple segment, that is a "rigid body" (i.e., a frame and a rigid body inertia) with a joint and with "handles", root and tip to connect to other segments. More...

#include <src/segment.hpp>

Collaboration diagram for KDL::Segment:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 Segment (const std::string &name, const Joint &joint=Joint(Joint::None), const Frame &f_tip=Frame::Identity(), const RigidBodyInertia &I=RigidBodyInertia::Zero())
 Constructor of the segment.
 Segment (const Joint &joint=Joint(Joint::None), const Frame &f_tip=Frame::Identity(), const RigidBodyInertia &I=RigidBodyInertia::Zero())
 Constructor of the segment.
 Segment (const Segment &in)
Segmentoperator= (const Segment &arg)
virtual ~Segment ()
Frame pose (const double &q) const
 Request the pose of the segment, given the joint position q.
Twist twist (const double &q, const double &qdot) const
 Request the 6D-velocity of the tip of the segment, given the joint position q and the joint velocity qdot.
const std::string & getName () const
 Request the name of the segment.
const JointgetJoint () const
 Request the joint of the segment.
const RigidBodyInertiagetInertia () const
 Request the inertia of the segment.
void setInertia (const RigidBodyInertia &Iin)
 Request the inertia of the segment.
Frame getFrameToTip () const
 Request the pose from the joint end to the tip of the segment.

Private Attributes

std::string name
Joint joint
RigidBodyInertia I
Frame f_tip

Friends

class Chain

Detailed Description

This class encapsulates a simple segment, that is a "rigid body" (i.e., a frame and a rigid body inertia) with a joint and with "handles", root and tip to connect to other segments.

A simple segment is described by the following properties :


Constructor & Destructor Documentation

KDL::Segment::Segment ( const std::string &  name,
const Joint joint = Joint(Joint::None),
const Frame f_tip = Frame::Identity(),
const RigidBodyInertia I = RigidBodyInertia::Zero() 
)

Constructor of the segment.

Parameters:
name name of the segment
joint joint of the segment, default: Joint(Joint::None)
f_tip frame from the end of the joint to the tip of the segment, default: Frame::Identity()
M rigid body inertia of the segment, default: Inertia::Zero()
KDL::Segment::Segment ( const Joint joint = Joint(Joint::None),
const Frame f_tip = Frame::Identity(),
const RigidBodyInertia I = RigidBodyInertia::Zero() 
)

Constructor of the segment.

Parameters:
joint joint of the segment, default: Joint(Joint::None)
f_tip frame from the end of the joint to the tip of the segment, default: Frame::Identity()
M rigid body inertia of the segment, default: Inertia::Zero()
KDL::Segment::Segment ( const Segment in  ) 
KDL::Segment::~Segment (  )  [virtual]

Member Function Documentation

Frame KDL::Segment::getFrameToTip (  )  const [inline]

Request the pose from the joint end to the tip of the segment.

Returns:
the original parent end - segment end pose.

References f_tip, joint, and KDL::Joint::pose().

const RigidBodyInertia& KDL::Segment::getInertia (  )  const [inline]

Request the inertia of the segment.

Returns:
const reference to the inertia of the segment

References I.

Referenced by KDL::ChainIdSolver_RNE::CartToJnt().

const Joint& KDL::Segment::getJoint (  )  const [inline]

Request the joint of the segment.

Returns:
const reference to the joint of the segment

References joint.

Referenced by KDL::Tree::addSegment(), KDL::Chain::addSegment(), KDL::ChainIdSolver_RNE::CartToJnt(), KDL::Tree::getChain(), and KDL::ChainJntToJacSolver::JntToJac().

const std::string& KDL::Segment::getName (  )  const [inline]

Request the name of the segment.

Returns:
const reference to the name of the segment

Referenced by KDL::Tree::addChain(), and KDL::Tree::addSegment().

Segment & KDL::Segment::operator= ( const Segment arg  ) 

References f_tip, I, joint, and name.

Frame KDL::Segment::pose ( const double &  q  )  const

Request the pose of the segment, given the joint position q.

Parameters:
q 1D position of the joint
Returns:
pose from the root to the tip of the segment

References f_tip, joint, and KDL::Joint::pose().

Referenced by KDL::ChainIdSolver_RNE::CartToJnt(), KDL::Tree::getChain(), and KDL::ChainJntToJacSolver::JntToJac().

void KDL::Segment::setInertia ( const RigidBodyInertia Iin  )  [inline]

Request the inertia of the segment.

Returns:
const reference to the inertia of the segment

References I.

Twist KDL::Segment::twist ( const double &  q,
const double &  qdot 
) const

Request the 6D-velocity of the tip of the segment, given the joint position q and the joint velocity qdot.

Parameters:
q 1D position of the joint
qdot 1D velocity of the joint
Returns:
6D-velocity of the tip of the segment, expressed in the base-frame of the segment(root) and with the tip of the segment as reference point.

References f_tip, joint, KDL::Frame::M, KDL::Frame::p, KDL::Joint::pose(), KDL::Twist::RefPoint(), and KDL::Joint::twist().

Referenced by KDL::ChainIdSolver_RNE::CartToJnt(), and KDL::ChainJntToJacSolver::JntToJac().


Friends And Related Function Documentation

friend class Chain [friend]

Member Data Documentation

Referenced by getFrameToTip(), operator=(), pose(), and twist().

Referenced by getInertia(), operator=(), and setInertia().

std::string KDL::Segment::name [private]

Referenced by operator=().


The documentation for this class was generated from the following files:
Generated on Tue Jan 11 16:11:34 2011 for KDL by  doxygen 1.6.3