From 92fa86278fff86d48abe9f1826f2e1bffb86f7b5 Mon Sep 17 00:00:00 2001 From: Levi Armstrong Date: Sat, 21 Dec 2024 09:47:14 -0600 Subject: [PATCH] Expose Inverse Kinematics in Kinematics Group --- .../include/tesseract_kinematics/core/kinematic_group.h | 6 ++++++ tesseract_kinematics/core/src/kinematic_group.cpp | 3 +++ 2 files changed, 9 insertions(+) diff --git a/tesseract_kinematics/core/include/tesseract_kinematics/core/kinematic_group.h b/tesseract_kinematics/core/include/tesseract_kinematics/core/kinematic_group.h index 53b8e490512..3c62510d185 100644 --- a/tesseract_kinematics/core/include/tesseract_kinematics/core/kinematic_group.h +++ b/tesseract_kinematics/core/include/tesseract_kinematics/core/kinematic_group.h @@ -143,6 +143,12 @@ class KinematicGroup : public JointGroup */ std::vector getAllPossibleTipLinkNames() const; + /** + * @brief Get the inverse kinematics sovler + * @return The inverse kinematics solver + */ + const InverseKinematics& getInverseKinematics() const; + private: std::vector joint_names_; bool reorder_required_{ false }; diff --git a/tesseract_kinematics/core/src/kinematic_group.cpp b/tesseract_kinematics/core/src/kinematic_group.cpp index 7e8df92bd27..f67786457c2 100644 --- a/tesseract_kinematics/core/src/kinematic_group.cpp +++ b/tesseract_kinematics/core/src/kinematic_group.cpp @@ -204,4 +204,7 @@ std::vector KinematicGroup::getAllPossibleTipLinkNames() const return ik_tip_links; } + +const InverseKinematics& KinematicGroup::getInverseKinematics() const { return *inv_kin_; } + } // namespace tesseract_kinematics