Tesseract 0.28.4
Loading...
Searching...
No Matches
tesseract::kinematics::KDLFwdKinChain Class Reference

KDL kinematic chain implementation. More...

#include <kdl_fwd_kin_chain.h>

Inheritance diagram for tesseract::kinematics::KDLFwdKinChain:

Public Types

using Ptr = std::shared_ptr<KDLFwdKinChain>
using ConstPtr = std::shared_ptr<const KDLFwdKinChain>
using UPtr = std::unique_ptr<KDLFwdKinChain>
using ConstUPtr = std::unique_ptr<const KDLFwdKinChain>
Public Types inherited from tesseract::kinematics::ForwardKinematics
using Ptr = std::shared_ptr<ForwardKinematics>
using ConstPtr = std::shared_ptr<const ForwardKinematics>
using UPtr = std::unique_ptr<ForwardKinematics>
using ConstUPtr = std::unique_ptr<const ForwardKinematics>

Public Member Functions

 KDLFwdKinChain (const KDLFwdKinChain &other)
KDLFwdKinChain & operator= (const KDLFwdKinChain &other)
 KDLFwdKinChain (KDLFwdKinChain &&)=delete
KDLFwdKinChain & operator= (KDLFwdKinChain &&)=delete
 KDLFwdKinChain (const tesseract::scene_graph::SceneGraph &scene_graph, const tesseract::common::LinkId &base_link, const tesseract::common::LinkId &tip_link, std::string solver_name=KDL_FWD_KIN_CHAIN_SOLVER_NAME)
 Initializes Forward Kinematics as chain Creates a forward kinematic chain object.
 KDLFwdKinChain (const tesseract::scene_graph::SceneGraph &scene_graph, const std::vector< std::pair< tesseract::common::LinkId, tesseract::common::LinkId > > &chains, std::string solver_name=KDL_FWD_KIN_CHAIN_SOLVER_NAME)
 Construct Forward Kinematics as chain Creates a forward kinematic chain object from sequential chains.
void calcFwdKin (tesseract::common::LinkIdTransformMap &transforms, const Eigen::Ref< const Eigen::VectorXd > &joint_angles) const override final
 Calculates the transform for each tip link in the kinematic group.
void calcJacobian (Eigen::Ref< Eigen::MatrixXd > jacobian, const Eigen::Ref< const Eigen::VectorXd > &joint_angles, const tesseract::common::LinkId &link_id) const override final
 Calculates the Jacobian matrix for a given joint state in the reference frame of the specified link.
tesseract::common::LinkId getBaseLinkId () const override final
 Get the robot base link id.
std::vector< tesseract::common::JointId > getJointIds () const override final
 Get list of joint ids for kinematic object.
std::vector< tesseract::common::LinkId > getTipLinkIds () const override final
 Get list of tip link ids for kinematic object.
Eigen::Index numJoints () const override final
 Number of joints in robot.
std::string getSolverName () const override final
 Get the name of the solver. Recommend using the name of the class.
ForwardKinematics::UPtr clone () const override final
 Clone the forward kinematics object.
Public Member Functions inherited from tesseract::kinematics::ForwardKinematics
 ForwardKinematics (const ForwardKinematics &)=default
ForwardKinematics & operator= (const ForwardKinematics &)=default
 ForwardKinematics (ForwardKinematics &&)=default
ForwardKinematics & operator= (ForwardKinematics &&)=default
tesseract::common::LinkIdTransformMap calcFwdKin (const Eigen::Ref< const Eigen::VectorXd > &joint_angles) const
 Calculates the transform for each tip link in the kinematic group.
Eigen::MatrixXd calcJacobian (const Eigen::Ref< const Eigen::VectorXd > &joint_angles, const tesseract::common::LinkId &link_id) const
 Calculates the Jacobian matrix for a given joint state in the reference frame of the specified link.

Detailed Description

KDL kinematic chain implementation.

Typically, just wrappers around the equivalent KDL calls.

Constructor & Destructor Documentation

◆ KDLFwdKinChain() [1/2]

tesseract::kinematics::KDLFwdKinChain::KDLFwdKinChain ( const tesseract::scene_graph::SceneGraph & scene_graph,
const tesseract::common::LinkId & base_link,
const tesseract::common::LinkId & tip_link,
std::string solver_name = KDL_FWD_KIN_CHAIN_SOLVER_NAME )

Initializes Forward Kinematics as chain Creates a forward kinematic chain object.

Parameters
scene_graphThe Tesseract Scene Graph
base_linkThe name of the base link for the kinematic chain
tip_linkThe name of the tip link for the kinematic chain
solver_nameThe solver name of the kinematic chain

◆ KDLFwdKinChain() [2/2]

tesseract::kinematics::KDLFwdKinChain::KDLFwdKinChain ( const tesseract::scene_graph::SceneGraph & scene_graph,
const std::vector< std::pair< tesseract::common::LinkId, tesseract::common::LinkId > > & chains,
std::string solver_name = KDL_FWD_KIN_CHAIN_SOLVER_NAME )

Construct Forward Kinematics as chain Creates a forward kinematic chain object from sequential chains.

Parameters
scene_graphThe Tesseract Scene Graph
chainsA vector of kinematics chains <base_link, tip_link> that get concatenated
solver_nameThe solver name of the kinematic chain

Member Function Documentation

◆ calcFwdKin()

void tesseract::kinematics::KDLFwdKinChain::calcFwdKin ( tesseract::common::LinkIdTransformMap & transforms,
const Eigen::Ref< const Eigen::VectorXd > & joint_angles ) const
finaloverridevirtual

Calculates the transform for each tip link in the kinematic group.

This should return a transform for every link listed in getTipLinkIds() Throws an exception on failures (including uninitialized)

Parameters
transforms(out)The object to populate with transforms
joint_anglesVector of joint angles (size must match number of joints in robot chain)

Implements tesseract::kinematics::ForwardKinematics.

◆ calcJacobian()

void tesseract::kinematics::KDLFwdKinChain::calcJacobian ( Eigen::Ref< Eigen::MatrixXd > jacobian,
const Eigen::Ref< const Eigen::VectorXd > & joint_angles,
const tesseract::common::LinkId & link_id ) const
finaloverridevirtual

Calculates the Jacobian matrix for a given joint state in the reference frame of the specified link.

This should be able to return a jacobian given any link listed in getTipLinkIds() Throws an exception on failures (including uninitialized)

Parameters
jacobian[out]The object to populate (assumes already the correct size)
joint_anglesInput vector of joint angles
link_idThe link id to calculate jacobian
Returns
The jacobian at the provided link

Implements tesseract::kinematics::ForwardKinematics.

◆ getBaseLinkId()

tesseract::common::LinkId tesseract::kinematics::KDLFwdKinChain::getBaseLinkId ( ) const
finaloverridevirtual

Get the robot base link id.

Implements tesseract::kinematics::ForwardKinematics.

◆ getJointIds()

std::vector< tesseract::common::JointId > tesseract::kinematics::KDLFwdKinChain::getJointIds ( ) const
finaloverridevirtual

Get list of joint ids for kinematic object.

Returns
A vector of joint ids

Implements tesseract::kinematics::ForwardKinematics.

◆ getTipLinkIds()

std::vector< tesseract::common::LinkId > tesseract::kinematics::KDLFwdKinChain::getTipLinkIds ( ) const
finaloverridevirtual

Get list of tip link ids for kinematic object.

Returns
A vector of link ids

Implements tesseract::kinematics::ForwardKinematics.

◆ numJoints()

Eigen::Index tesseract::kinematics::KDLFwdKinChain::numJoints ( ) const
finaloverridevirtual

Number of joints in robot.

Returns
Number of joints in robot

Implements tesseract::kinematics::ForwardKinematics.

◆ getSolverName()

std::string tesseract::kinematics::KDLFwdKinChain::getSolverName ( ) const
finaloverridevirtual

Get the name of the solver. Recommend using the name of the class.

Implements tesseract::kinematics::ForwardKinematics.

◆ clone()

ForwardKinematics::UPtr tesseract::kinematics::KDLFwdKinChain::clone ( ) const
finaloverridevirtual

Clone the forward kinematics object.

Implements tesseract::kinematics::ForwardKinematics.