Go to the documentation of this file.
29 #include <console_bridge/console.h>
40 std::string base_link_name,
41 std::string tip_link_name,
42 std::vector<std::string> joint_names,
43 std::string solver_name)
45 , base_link_name_(std::move(base_link_name))
46 , tip_link_name_(std::move(tip_link_name))
47 , joint_names_(std::move(joint_names))
48 , solver_name_(std::move(solver_name))
51 throw std::runtime_error(
"OPWInvKin, only support six joints!");
69 const Eigen::Ref<const Eigen::VectorXd>& )
const
71 assert(tip_link_poses.size() == 1);
72 assert(tip_link_poses.find(
tip_link_name_) != tip_link_poses.end());
73 assert(std::abs(1.0 - tip_link_poses.at(
tip_link_name_).matrix().determinant()) < 1e-6);
80 solution_set.reserve(sols.size());
81 for (
auto& sol : sols)
83 if (opw_kinematics::isValid<double>(sol))
84 solution_set.emplace_back(Eigen::Map<Eigen::VectorXd>(sol.data(),
static_cast<Eigen::Index
>(sol.size())));
opw_kinematics::Parameters< double > params_
The opw kinematics parameters.
std::string getWorkingFrame() const override final
Get the inverse kinematics working frame.
std::string getBaseLinkName() const override final
Get the robot base link name.
AlignedMap< std::string, Eigen::Isometry3d > TransformMap
std::string base_link_name_
Link name of first link in the kinematic object.
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
Eigen::Index numJoints() const override final
Number of joints in robot.
std::array< std::array< T, 6 >, 8 > Solutions
OPWInvKin(const OPWInvKin &other)
std::string tip_link_name_
Link name of last kink in the kinematic object.
std::unique_ptr< InverseKinematics > UPtr
Kinematics utility functions.
std::vector< std::string > getTipLinkNames() const override final
Get the names of the tip links of the kinematics group.
Tesseract OPW Inverse kinematics Wrapper.
std::string solver_name_
Name of this solver.
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.
Solutions< T > inverse(const Parameters< T > ¶ms, const Transform< T > &pose) noexcept
std::vector< std::string > getJointNames() const override final
Get list of joint names for kinematic object.
OPWInvKin & operator=(const OPWInvKin &other)
#define TESSERACT_COMMON_IGNORE_WARNINGS_POP
std::string getSolverName() const override final
Get the name of the solver. Recommend using the name of the class.
InverseKinematics::UPtr clone() const override final
Clone the forward kinematics object.
std::vector< Eigen::VectorXd > IKSolutions
The inverse kinematics solutions container.
std::vector< std::string > joint_names_
Joint names for the kinematic object.
OPW Inverse Kinematics Implementation.