Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
kinematic_group.h
Go to the documentation of this file.
1
26#ifndef TESSERACT_KINEMATICS_KINEMATIC_GROUP_H
27#define TESSERACT_KINEMATICS_KINEMATIC_GROUP_H
28
31#include <memory>
32#include <Eigen/Geometry>
34
37
39{
48{
49 // LCOV_EXCL_START
50 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
51 // LCOV_EXCL_STOP
52
53 KinGroupIKInput(const Eigen::Isometry3d& p, std::string wf, std::string tl)
54 : pose(p), working_frame(std::move(wf)), tip_link_name(std::move(tl))
55 {
56 }
57
58 KinGroupIKInput() = default;
59
61 Eigen::Isometry3d pose;
62
67 std::string working_frame;
68
73 std::string tip_link_name; // This defines the internal kinematic group the information belongs to
74};
76
78{
79public:
80 // LCOV_EXCL_START
81 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
82 // LCOV_EXCL_STOP
83
84 using Ptr = std::shared_ptr<KinematicGroup>;
85 using ConstPtr = std::shared_ptr<const KinematicGroup>;
86 using UPtr = std::unique_ptr<KinematicGroup>;
87 using ConstUPtr = std::unique_ptr<const KinematicGroup>;
88
89 ~KinematicGroup() override = default;
90 KinematicGroup(const KinematicGroup& other);
94
102 KinematicGroup(std::string name,
103 std::vector<std::string> joint_names,
107
116 IKSolutions calcInvKin(const KinGroupIKInputs& tip_link_poses, const Eigen::Ref<const Eigen::VectorXd>& seed) const;
117
126 IKSolutions calcInvKin(const KinGroupIKInput& tip_link_pose, const Eigen::Ref<const Eigen::VectorXd>& seed) const;
127
136 std::vector<std::string> getAllValidWorkingFrames() const;
137
146 std::vector<std::string> getAllPossibleTipLinkNames() const;
147
148private:
149 std::vector<std::string> joint_names_;
150 bool reorder_required_{ false };
151 std::vector<Eigen::Index> inv_kin_joint_map_;
153 Eigen::Isometry3d inv_to_fwd_base_{ Eigen::Isometry3d::Identity() };
154 std::vector<std::string> working_frames_;
155 std::unordered_map<std::string, std::string> inv_tip_links_map_;
156};
157
158} // namespace tesseract_kinematics
159
160#endif // TESSERACT_KINEMATICS_KINEMATIC_GROUP_H
std::unique_ptr< InverseKinematics > UPtr
Definition: inverse_kinematics.h:55
A Joint Group is defined by a list of joint_names.
Definition: joint_group.h:43
Definition: kinematic_group.h:78
std::unique_ptr< KinematicGroup > UPtr
Definition: kinematic_group.h:86
Eigen::Isometry3d inv_to_fwd_base_
Definition: kinematic_group.h:153
KinematicGroup & operator=(KinematicGroup &&)=default
InverseKinematics::UPtr inv_kin_
Definition: kinematic_group.h:152
std::vector< std::string > getAllPossibleTipLinkNames() const
Get the tip link name.
Definition: kinematic_group.cpp:186
bool reorder_required_
Definition: kinematic_group.h:150
std::shared_ptr< const KinematicGroup > ConstPtr
Definition: kinematic_group.h:85
KinematicGroup & operator=(const KinematicGroup &other)
Definition: kinematic_group.cpp:98
std::unordered_map< std::string, std::string > inv_tip_links_map_
Definition: kinematic_group.h:155
IKSolutions calcInvKin(const KinGroupIKInputs &tip_link_poses, const Eigen::Ref< const Eigen::VectorXd > &seed) const
Calculates joint solutions given a pose.
Definition: kinematic_group.cpp:111
std::vector< Eigen::Index > inv_kin_joint_map_
Definition: kinematic_group.h:151
std::vector< std::string > joint_names_
Definition: kinematic_group.h:149
KinematicGroup(KinematicGroup &&)=default
std::vector< std::string > getAllValidWorkingFrames() const
Returns all possible working frames in which goal poses can be defined.
Definition: kinematic_group.cpp:184
std::shared_ptr< KinematicGroup > Ptr
Definition: kinematic_group.h:84
std::vector< std::string > working_frames_
Definition: kinematic_group.h:154
std::unique_ptr< const KinematicGroup > ConstUPtr
Definition: kinematic_group.h:87
Definition: graph.h:125
Eigen::VectorXd seed
Definition: ikfast_kinematics_7dof_unit.cpp:48
auto scene_graph
Definition: ikfast_kinematics_7dof_unit.cpp:51
auto inv_kin
Definition: ikfast_kinematics_unit.cpp:59
Inverse kinematics functions.
A joint group with forward kinematics, Jacobian, limits methods.
tesseract_scene_graph::SceneState scene_state
Definition: kinematics_factory_unit.cpp:265
Common Tesseract Macros.
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
Definition: macros.h:71
Definition: create_convex_hull.cpp:36
std::vector< T, Eigen::aligned_allocator< T > > AlignedVector
Enable easy switching to std::filesystem when available.
Definition: types.h:50
Definition: forward_kinematics.h:44
tesseract_common::AlignedVector< KinGroupIKInput > KinGroupIKInputs
Definition: kinematic_group.h:75
std::vector< Eigen::VectorXd > IKSolutions
The inverse kinematics solutions container.
Definition: types.h:41
Structure containing the data required to solve inverse kinematics.
Definition: kinematic_group.h:48
EIGEN_MAKE_ALIGNED_OPERATOR_NEW KinGroupIKInput(const Eigen::Isometry3d &p, std::string wf, std::string tl)
Definition: kinematic_group.h:53
Eigen::Isometry3d pose
The desired inverse kinematic pose.
Definition: kinematic_group.h:61
std::string tip_link_name
The tip link of the kinematic object to solve IK.
Definition: kinematic_group.h:73
std::string working_frame
The link name the pose is relative to.
Definition: kinematic_group.h:67
This holds a state of the scene.
Definition: scene_state.h:54
joint_state joint_names
Definition: tesseract_common_serialization_unit.cpp:75