26#ifndef TESSERACT_KINEMATICS_KDL_INV_KIN_CHAIN_NR_H
27#define TESSERACT_KINEMATICS_KDL_INV_KIN_CHAIN_NR_H
30#include <kdl/tree.hpp>
31#include <kdl/chain.hpp>
32#include <kdl/chainiksolverpos_nr.hpp>
33#include <kdl/chainiksolvervel_pinv.hpp>
34#include <kdl/chainfksolverpos_recursive.hpp>
35#include <unordered_map>
36#include <console_bridge/console.h>
56 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
59 using Ptr = std::shared_ptr<KDLInvKinChainNR>;
60 using ConstPtr = std::shared_ptr<const KDLInvKinChainNR>;
61 using UPtr = std::unique_ptr<KDLInvKinChainNR>;
62 using ConstUPtr = std::unique_ptr<const KDLInvKinChainNR>;
80 const std::string& tip_link,
91 const std::vector<std::pair<std::string, std::string> >& chains,
95 const Eigen::Ref<const Eigen::VectorXd>&
seed)
const override final;
97 std::vector<std::string>
getJointNames() const override final;
98 Eigen::Index
numJoints() const override final;
115 const Eigen::Ref<const Eigen::VectorXd>&
seed,
116 int segment_num = -1)
const;
#define vector(a, b, c)
Definition: FloatMath.inl:3227
Inverse kinematics functions.
Definition: inverse_kinematics.h:47
KDL Inverse kinematic chain implementation.
Definition: kdl_inv_kin_chain_nr.h:53
std::mutex mutex_
KDL is not thread safe due to mutable variables in Joint Class.
Definition: kdl_inv_kin_chain_nr.h:111
std::shared_ptr< KDLInvKinChainNR > Ptr
Definition: kdl_inv_kin_chain_nr.h:59
KDLInvKinChainNR & operator=(const KDLInvKinChainNR &other)
Definition: kdl_inv_kin_chain_nr.cpp:71
IKSolutions calcInvKin(const tesseract_common::TransformMap &tip_link_poses, const Eigen::Ref< const Eigen::VectorXd > &seed) const override final
Calculates joint solutions given a pose for each tip link.
Definition: kdl_inv_kin_chain_nr.cpp:137
std::unique_ptr< KDL::ChainIkSolverPos_NR > ik_solver_
KDL Inverse kinematic solver.
Definition: kdl_inv_kin_chain_nr.h:109
std::string getBaseLinkName() const override final
Get the robot base link name.
Definition: kdl_inv_kin_chain_nr.cpp:148
std::string solver_name_
Name of this solver.
Definition: kdl_inv_kin_chain_nr.h:110
std::unique_ptr< KDL::ChainFkSolverPos_recursive > fk_solver_
KDL Forward Kinematic Solver.
Definition: kdl_inv_kin_chain_nr.h:107
std::unique_ptr< KDLInvKinChainNR > UPtr
Definition: kdl_inv_kin_chain_nr.h:61
KDLInvKinChainNR & operator=(KDLInvKinChainNR &&)=delete
std::shared_ptr< const KDLInvKinChainNR > ConstPtr
Definition: kdl_inv_kin_chain_nr.h:60
KDLChainData kdl_data_
KDL data parsed from Scene Graph.
Definition: kdl_inv_kin_chain_nr.h:106
std::string getSolverName() const override final
Get the name of the solver. Recommend using the name of the class.
Definition: kdl_inv_kin_chain_nr.cpp:154
Eigen::Index numJoints() const override final
Number of joints in robot.
Definition: kdl_inv_kin_chain_nr.cpp:146
std::unique_ptr< const KDLInvKinChainNR > ConstUPtr
Definition: kdl_inv_kin_chain_nr.h:62
std::vector< std::string > getJointNames() const override final
Get list of joint names for kinematic object.
Definition: kdl_inv_kin_chain_nr.cpp:144
std::unique_ptr< KDL::ChainIkSolverVel_pinv > ik_vel_solver_
KDL Inverse kinematic velocity solver.
Definition: kdl_inv_kin_chain_nr.h:108
IKSolutions calcInvKinHelper(const Eigen::Isometry3d &pose, const Eigen::Ref< const Eigen::VectorXd > &seed, int segment_num=-1) const
calcFwdKin helper function
Definition: kdl_inv_kin_chain_nr.cpp:82
~KDLInvKinChainNR() override=default
InverseKinematics::UPtr clone() const override final
Clone the forward kinematics object.
Definition: kdl_inv_kin_chain_nr.cpp:67
std::vector< std::string > getTipLinkNames() const override final
Get the names of the tip links of the kinematics group.
Definition: kdl_inv_kin_chain_nr.cpp:152
std::string getWorkingFrame() const override final
Get the inverse kinematics working frame.
Definition: kdl_inv_kin_chain_nr.cpp:150
KDLInvKinChainNR(KDLInvKinChainNR &&)=delete
A basic scene graph using boost.
Eigen::VectorXd seed
Definition: ikfast_kinematics_7dof_unit.cpp:48
auto scene_graph
Definition: ikfast_kinematics_7dof_unit.cpp:51
Inverse kinematics functions.
Tesseract KDL utility functions.
#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_INV_KIN_CHAIN_NR_SOLVER_NAME
Definition: kdl_inv_kin_chain_nr.h:47
std::vector< Eigen::VectorXd > IKSolutions
The inverse kinematics solutions container.
Definition: types.h:41
The KDLChainData struct.
Definition: kdl_utils.h:95
auto pose
Definition: tesseract_environment_collision.cpp:118
Link base_link("base_link")