26#ifndef TESSERACT_KINEMATICS_KDL_FWD_KINEMATIC_CHAIN_H
27#define TESSERACT_KINEMATICS_KDL_FWD_KINEMATIC_CHAIN_H
31#include <kdl/tree.hpp>
32#include <kdl/chain.hpp>
33#include <kdl/chainfksolverpos_recursive.hpp>
34#include <kdl/chainjnttojacsolver.hpp>
35#include <unordered_map>
36#include <console_bridge/console.h>
59 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
62 using Ptr = std::shared_ptr<KDLFwdKinChain>;
63 using ConstPtr = std::shared_ptr<const KDLFwdKinChain>;
64 using UPtr = std::unique_ptr<KDLFwdKinChain>;
65 using ConstUPtr = std::unique_ptr<const KDLFwdKinChain>;
83 const std::string& tip_link,
94 const std::vector<std::pair<std::string, std::string> >& chains,
99 Eigen::MatrixXd
calcJacobian(
const Eigen::Ref<const Eigen::VectorXd>& joint_angles,
100 const std::string& joint_link_name)
const override final;
105 Eigen::Index
numJoints() const override final;
122 const Eigen::Ref<const Eigen::VectorXd>& joint_angles,
123 int segment_num = -1)
const;
#define vector(a, b, c)
Definition: FloatMath.inl:3227
Forward kinematics functions.
Definition: forward_kinematics.h:47
KDL kinematic chain implementation.
Definition: kdl_fwd_kin_chain.h:56
bool calcJacobianHelper(KDL::Jacobian &jacobian, const Eigen::Ref< const Eigen::VectorXd > &joint_angles, int segment_num=-1) const
calcJacobian helper function
Definition: kdl_fwd_kin_chain.cpp:107
std::shared_ptr< const KDLFwdKinChain > ConstPtr
Definition: kdl_fwd_kin_chain.h:63
KDLFwdKinChain & operator=(const KDLFwdKinChain &other)
Definition: kdl_fwd_kin_chain.cpp:66
std::string solver_name_
Name of this solver.
Definition: kdl_fwd_kin_chain.h:114
std::mutex mutex_
KDL is not thread safe due to mutable variables in Joint Class.
Definition: kdl_fwd_kin_chain.h:115
std::unique_ptr< KDLFwdKinChain > UPtr
Definition: kdl_fwd_kin_chain.h:64
std::shared_ptr< KDLFwdKinChain > Ptr
Definition: kdl_fwd_kin_chain.h:62
Eigen::MatrixXd calcJacobian(const Eigen::Ref< const Eigen::VectorXd > &joint_angles, const std::string &joint_link_name) const override final
Calculates the Jacobian matrix for a given joint state in the reference frame of the specified link.
Definition: kdl_fwd_kin_chain.cpp:131
std::string getSolverName() const override final
Get the name of the solver. Recommend using the name of the class.
Definition: kdl_fwd_kin_chain.cpp:157
std::unique_ptr< KDL::ChainFkSolverPos_recursive > fk_solver_
Definition: kdl_fwd_kin_chain.h:112
KDLFwdKinChain(KDLFwdKinChain &&)=delete
KDLChainData kdl_data_
Definition: kdl_fwd_kin_chain.h:110
~KDLFwdKinChain() override=default
KDLFwdKinChain & operator=(KDLFwdKinChain &&)=delete
ForwardKinematics::UPtr clone() const override final
Clone the forward kinematics object.
Definition: kdl_fwd_kin_chain.cpp:63
Eigen::Index numJoints() const override final
Number of joints in robot.
Definition: kdl_fwd_kin_chain.cpp:151
std::string name_
Definition: kdl_fwd_kin_chain.h:111
std::vector< std::string > getTipLinkNames() const override final
Get list of tip link names for kinematic object.
Definition: kdl_fwd_kin_chain.cpp:155
std::vector< std::string > getJointNames() const override final
Get list of joint names for kinematic object.
Definition: kdl_fwd_kin_chain.cpp:149
tesseract_common::TransformMap calcFwdKinHelperAll(const Eigen::Ref< const Eigen::VectorXd > &joint_angles) const
calcFwdKin helper function
Definition: kdl_fwd_kin_chain.cpp:77
std::string getBaseLinkName() const override final
Get the robot base link name.
Definition: kdl_fwd_kin_chain.cpp:153
std::unique_ptr< const KDLFwdKinChain > ConstUPtr
Definition: kdl_fwd_kin_chain.h:65
std::unique_ptr< KDL::ChainJntToJacSolver > jac_solver_
Definition: kdl_fwd_kin_chain.h:113
tesseract_common::TransformMap calcFwdKin(const Eigen::Ref< const Eigen::VectorXd > &joint_angles) const override final
Calculates the transform for each tip link in the kinematic group.
Definition: kdl_fwd_kin_chain.cpp:100
Forward kinematics functions.
A basic scene graph using boost.
auto scene_graph
Definition: ikfast_kinematics_7dof_unit.cpp:51
Tesseract KDL utility functions.
Eigen::MatrixXd jacobian
Definition: kinematics_core_unit.cpp:153
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
Definition: macros.h:71
Definition: create_convex_hull.cpp:36
AlignedMap< std::string, Eigen::Isometry3d > TransformMap
Definition: types.h:66
Definition: forward_kinematics.h:44
static const std::string KDL_FWD_KIN_CHAIN_SOLVER_NAME
Definition: kdl_fwd_kin_chain.h:47
The KDLChainData struct.
Definition: kdl_utils.h:95
Link base_link("base_link")