KDL
1.4.0
|
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>
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. More... | |
Segment (const Joint &joint=Joint(Joint::None), const Frame &f_tip=Frame::Identity(), const RigidBodyInertia &I=RigidBodyInertia::Zero()) | |
Constructor of the segment. More... | |
Segment (const Segment &in) | |
Segment & | operator= (const Segment &arg) |
virtual | ~Segment () |
Frame | pose (const double &q) const |
Request the pose of the segment, given the joint position q. More... | |
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. More... | |
const std::string & | getName () const |
Request the name of the segment. More... | |
const Joint & | getJoint () const |
Request the joint of the segment. More... | |
const RigidBodyInertia & | getInertia () const |
Request the inertia of the segment. More... | |
void | setInertia (const RigidBodyInertia &Iin) |
Request the inertia of the segment. More... | |
Frame | getFrameToTip () const |
Request the pose from the joint end to the tip of the segment. More... | |
void | setFrameToTip (const Frame &f_tip_new) |
Set the pose from the joint end to the tip of the segment. More... | |
Private Attributes | |
std::string | name |
Joint | joint |
RigidBodyInertia | I |
Frame | f_tip |
Friends | |
class | Chain |
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 :
|
explicit |
Constructor of the segment.
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() |
|
explicit |
Constructor 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 Segment & | in | ) |
|
virtual |
|
inline |
Request the pose from the joint end to the tip of the segment.
References f_tip, KDL::Joint::pose(), and setFrameToTip().
Referenced by KDL::operator<<().
|
inline |
Request the inertia of the segment.
References I.
Referenced by KDL::ChainIdSolver_RNE::CartToJnt(), KDL::ChainIdSolver_Vereshchagin::initial_upwards_sweep(), and KDL::ChainDynParam::JntToMass().
|
inline |
Request the joint of the segment.
References joint.
Referenced by KDL::Chain::addSegment(), KDL::Tree::addSegment(), KDL::ChainIdSolver_RNE::CartToJnt(), KDL::ChainIkSolverPos_LMA::compute_fwdpos(), KDL::ChainIkSolverPos_LMA::compute_jacobian(), KDL::ChainIdSolver_Vereshchagin::downwards_sweep(), KDL::ChainIdSolver_Vereshchagin::final_upwards_sweep(), KDL::Tree::getChain(), KDL::ChainIdSolver_Vereshchagin::initial_upwards_sweep(), KDL::ChainFkSolverPos_recursive::JntToCart(), KDL::ChainFkSolverVel_recursive::JntToCart(), KDL::ChainJntToJacSolver::JntToJac(), KDL::ChainJntToJacDotSolver::JntToJacDot(), KDL::ChainDynParam::JntToMass(), and KDL::operator<<().
|
inline |
Request the name of the segment.
References name.
Referenced by KDL::Tree::addChain(), KDL::Tree::addSegment(), and KDL::operator<<().
Frame KDL::Segment::pose | ( | const double & | q | ) | const |
Request the pose of the segment, given the joint position q.
q | 1D position of the joint |
References f_tip, joint, and KDL::Joint::pose().
Referenced by KDL::ChainIdSolver_RNE::CartToJnt(), KDL::ChainIkSolverPos_LMA::compute_fwdpos(), KDL::Tree::getChain(), KDL::ChainIdSolver_Vereshchagin::initial_upwards_sweep(), KDL::ChainFkSolverPos_recursive::JntToCart(), KDL::ChainFkSolverVel_recursive::JntToCart(), KDL::ChainJntToJacSolver::JntToJac(), and KDL::ChainDynParam::JntToMass().
void KDL::Segment::setFrameToTip | ( | const Frame & | f_tip_new | ) |
Set the pose from the joint end to the tip of the segment.
f_tip_new | pose from the joint end to the tip of the segment |
References f_tip, KDL::Frame::Inverse(), joint, and KDL::Joint::pose().
Referenced by getFrameToTip().
|
inline |
Request the inertia of the segment.
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.
q | 1D position of the joint |
qdot | 1D velocity of the joint |
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(), KDL::ChainIkSolverPos_LMA::compute_jacobian(), KDL::ChainIdSolver_Vereshchagin::initial_upwards_sweep(), KDL::ChainFkSolverVel_recursive::JntToCart(), KDL::ChainJntToJacSolver::JntToJac(), and KDL::ChainDynParam::JntToMass().
|
friend |
|
private |
Referenced by getFrameToTip(), operator=(), pose(), setFrameToTip(), and twist().
|
private |
Referenced by getInertia(), and operator=().
|
private |
Referenced by getJoint(), operator=(), pose(), setFrameToTip(), and twist().
|
private |
Referenced by getName(), and operator=().