Orocos KDL
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 <segment.hpp>

Public Member Functions

 Segment (const std::string &name, const Joint &joint=Joint(Joint::Fixed), const Frame &f_tip=Frame::Identity(), const RigidBodyInertia &I=RigidBodyInertia::Zero())
 Segment (const Joint &joint=Joint(Joint::Fixed), const Frame &f_tip=Frame::Identity(), const RigidBodyInertia &I=RigidBodyInertia::Zero())
 Segment (const Segment &in)
Segment & operator= (const Segment &arg)
virtual ~Segment ()
Frame pose (const double &q) const
Twist twist (const double &q, const double &qdot) const
const std::string & getName () const
const Joint & getJoint () const
const RigidBodyInertia & getInertia () const
void setInertia (const RigidBodyInertia &Iin)
Frame getFrameToTip () const
void setFrameToTip (const Frame &f_tip_new)
const Frame & getFrameToTipZero () const

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 :

  • Joint
  • Rigid Body Inertia: of the rigid body part of the Segment
  • Offset from the end of the joint to the tip of the segment: the joint is located at the root of the segment.

Constructor & Destructor Documentation

◆ Segment() [1/3]

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

Constructor of the segment

Parameters
namename of the segment
jointjoint of the segment, default: Joint(Joint::Fixed)
f_tipframe from the end of the joint to the tip of the segment, default: Frame::Identity()
Mrigid body inertia of the segment, default: Inertia::Zero()

◆ Segment() [2/3]

KDL::Segment::Segment ( const Joint & joint = Joint(Joint::Fixed),
const Frame & f_tip = Frame::Identity(),
const RigidBodyInertia & I = RigidBodyInertia::Zero() )
explicit

Constructor of the segment

Parameters
jointjoint of the segment, default: Joint(Joint::Fixed)
f_tipframe from the end of the joint to the tip of the segment, default: Frame::Identity()
Mrigid body inertia of the segment, default: Inertia::Zero()

◆ Segment() [3/3]

KDL::Segment::Segment ( const Segment & in)

◆ ~Segment()

virtual KDL::Segment::~Segment ( )
virtual

Member Function Documentation

◆ getFrameToTip()

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.

◆ getFrameToTipZero()

const Frame & KDL::Segment::getFrameToTipZero ( ) const
inline

Request the pose from the end of the joint to the tip of the segment at joint position 0.

Returns
const reference to the pose from the end of the joint to the tip of the segment at joint position 0

◆ getInertia()

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

Request the inertia of the segment

Returns
const reference to the inertia of the segment

◆ getJoint()

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

Request the joint of the segment

Returns
const reference to the joint of the segment

◆ getName()

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

Request the name of the segment

Returns
const reference to the name of the segment

◆ operator=()

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

◆ pose()

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

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

Parameters
q1D position of the joint
Returns
pose from the root to the tip of the segment

◆ setFrameToTip()

void KDL::Segment::setFrameToTip ( const Frame & f_tip_new)

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

Parameters
f_tip_newpose from the joint end to the tip of the segment

◆ setInertia()

void KDL::Segment::setInertia ( const RigidBodyInertia & Iin)
inline

Request the inertia of the segment

Returns
const reference to the inertia of the segment

◆ twist()

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
q1D position of the joint
qdot1D 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.

◆ Chain

friend class Chain
friend

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