Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
kinematics_information.h
Go to the documentation of this file.
1
26#ifndef TESSERACT_SRDF_KINEMATICS_INFORMATION_H
27#define TESSERACT_SRDF_KINEMATICS_INFORMATION_H
28
31#include <boost/serialization/access.hpp>
32#include <unordered_map>
33#include <string>
34#include <vector>
35#include <array>
36#include <map>
37#include <Eigen/Geometry>
39
42
43namespace tesseract_srdf
44{
45using GroupsJointState = std::unordered_map<std::string, double>;
46using GroupsJointStates = std::unordered_map<std::string, GroupsJointState>;
47using GroupJointStates = std::unordered_map<std::string, GroupsJointStates>;
50using ChainGroup = std::vector<std::pair<std::string, std::string>>;
51using ChainGroups = std::unordered_map<std::string, ChainGroup>;
52using JointGroup = std::vector<std::string>;
53using JointGroups = std::unordered_map<std::string, JointGroup>;
54using LinkGroup = std::vector<std::string>;
55using LinkGroups = std::unordered_map<std::string, LinkGroup>;
56using GroupNames = std::set<std::string>;
57
63{
64 // LCOV_EXCL_START
65 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
66 // LCOV_EXCL_STOP
67
70
73
76
79
82
85
88
90 void insert(const KinematicsInformation& other);
91
93 void clear();
94
96 bool hasGroup(const std::string& group_name) const;
97
99 void addChainGroup(const std::string& group_name, const ChainGroup& chain_group);
100
102 void removeChainGroup(const std::string& group_name);
103
105 bool hasChainGroup(const std::string& group_name) const;
106
108 void addJointGroup(const std::string& group_name, const JointGroup& joint_group);
109
111 void removeJointGroup(const std::string& group_name);
112
114 bool hasJointGroup(const std::string& group_name) const;
115
117 void addLinkGroup(const std::string& group_name, const LinkGroup& link_group);
118
120 void removeLinkGroup(const std::string& group_name);
121
123 bool hasLinkGroup(const std::string& group_name) const;
124
126 void addGroupJointState(const std::string& group_name,
127 const std::string& state_name,
129
131 void removeGroupJointState(const std::string& group_name, const std::string& state_name);
132
134 bool hasGroupJointState(const std::string& group_name, const std::string& state_name) const;
135
137 void addGroupTCP(const std::string& group_name, const std::string& tcp_name, const Eigen::Isometry3d& tcp);
138
140 void removeGroupTCP(const std::string& group_name, const std::string& tcp_name);
141
143 bool hasGroupTCP(const std::string& group_name, const std::string& tcp_name) const;
144
145 bool operator==(const KinematicsInformation& rhs) const;
146 bool operator!=(const KinematicsInformation& rhs) const;
147
148private:
150 template <class Archive>
151 void serialize(Archive& ar, const unsigned int version); // NOLINT
152};
153
154} // namespace tesseract_srdf
155
156#include <boost/serialization/export.hpp>
157#include <boost/serialization/tracking.hpp>
158BOOST_CLASS_EXPORT_KEY2(tesseract_srdf::KinematicsInformation, "KinematicsInformation")
159#endif // TESSERACT_SRDF_KINEMATICS_INFORMATION_H
Common Tesseract Macros.
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
Definition: macros.h:71
Definition: create_convex_hull.cpp:36
std::map< Key, Value, std::less< Key >, Eigen::aligned_allocator< std::pair< const Key, Value > > > AlignedMap
Definition: types.h:53
Main namespace.
Definition: collision_margins.h:49
std::unordered_map< std::string, double > GroupsJointState
Definition: kinematics_information.h:45
std::unordered_map< std::string, GroupsJointState > GroupsJointStates
Definition: kinematics_information.h:46
std::unordered_map< std::string, LinkGroup > LinkGroups
Definition: kinematics_information.h:55
std::unordered_map< std::string, JointGroup > JointGroups
Definition: kinematics_information.h:53
std::vector< std::string > JointGroup
Definition: kinematics_information.h:52
std::set< std::string > GroupNames
Definition: kinematics_information.h:56
std::unordered_map< std::string, ChainGroup > ChainGroups
Definition: kinematics_information.h:51
tesseract_common::AlignedMap< std::string, GroupsTCPs > GroupTCPs
Definition: kinematics_information.h:49
std::vector< std::string > LinkGroup
Definition: kinematics_information.h:54
std::unordered_map< std::string, GroupsJointStates > GroupJointStates
Definition: kinematics_information.h:47
std::vector< std::pair< std::string, std::string > > ChainGroup
Definition: kinematics_information.h:50
tesseract_common::AlignedMap< std::string, Eigen::Isometry3d > GroupsTCPs
Definition: kinematics_information.h:48
The kinematics plugin information structure.
Definition: types.h:149
This hold the kinematics information used to create the SRDF and is the data container for the manipu...
Definition: kinematics_information.h:63
bool operator==(const KinematicsInformation &rhs) const
Definition: kinematics_information.cpp:187
void insert(const KinematicsInformation &other)
Insert the content of an other KinematicsInformation.
Definition: kinematics_information.cpp:55
GroupTCPs group_tcps
A map of group tool center points.
Definition: kinematics_information.h:84
bool hasChainGroup(const std::string &group_name) const
Check if chain group exists.
Definition: kinematics_information.cpp:100
void addJointGroup(const std::string &group_name, const JointGroup &joint_group)
Add joint group.
Definition: kinematics_information.cpp:105
EIGEN_MAKE_ALIGNED_OPERATOR_NEW GroupNames group_names
A set of group names.
Definition: kinematics_information.h:69
void removeGroupJointState(const std::string &group_name, const std::string &state_name)
Remove group joint state.
Definition: kinematics_information.cpp:146
void addChainGroup(const std::string &group_name, const ChainGroup &chain_group)
Add chain group.
Definition: kinematics_information.cpp:88
bool hasGroupTCP(const std::string &group_name, const std::string &tcp_name) const
Check if group tool center point exists.
Definition: kinematics_information.cpp:178
void removeGroupTCP(const std::string &group_name, const std::string &tcp_name)
Remove group tool center point.
Definition: kinematics_information.cpp:170
tesseract_common::KinematicsPluginInfo kinematics_plugin_info
The kinematics plugin information.
Definition: kinematics_information.h:87
bool hasLinkGroup(const std::string &group_name) const
Check if link group exists.
Definition: kinematics_information.cpp:134
void addGroupTCP(const std::string &group_name, const std::string &tcp_name, const Eigen::Isometry3d &tcp)
Add group tool center point.
Definition: kinematics_information.cpp:163
bool hasGroupJointState(const std::string &group_name, const std::string &state_name) const
Check if group joint state exists.
Definition: kinematics_information.cpp:154
JointGroups joint_groups
A map of joint groups.
Definition: kinematics_information.h:75
ChainGroups chain_groups
A map of chains groups.
Definition: kinematics_information.h:72
void clear()
Clear the kinematics information.
Definition: kinematics_information.cpp:44
void removeChainGroup(const std::string &group_name)
Remove chain group.
Definition: kinematics_information.cpp:94
bool hasGroup(const std::string &group_name) const
Check if group exists.
Definition: kinematics_information.cpp:83
bool operator!=(const KinematicsInformation &rhs) const
Definition: kinematics_information.cpp:248
void serialize(Archive &ar, const unsigned int version)
Definition: kinematics_information.cpp:251
LinkGroups link_groups
A map of link groups.
Definition: kinematics_information.h:78
void removeLinkGroup(const std::string &group_name)
Remove link group.
Definition: kinematics_information.cpp:128
bool hasJointGroup(const std::string &group_name) const
Check if joint group exists.
Definition: kinematics_information.cpp:117
void addGroupJointState(const std::string &group_name, const std::string &state_name, const GroupsJointState &joint_state)
Add group joint state.
Definition: kinematics_information.cpp:139
GroupJointStates group_states
A map of group states.
Definition: kinematics_information.h:81
friend class boost::serialization::access
Definition: kinematics_information.h:149
void addLinkGroup(const std::string &group_name, const LinkGroup &link_group)
Add link group.
Definition: kinematics_information.cpp:122
void removeJointGroup(const std::string &group_name)
Remove joint group.
Definition: kinematics_information.cpp:111
Common Tesseract Types.
Common Tesseract Utility Functions.
tesseract_common::JointState joint_state(joint_names, positons)
Definition: tesseract_common_unit.cpp:315
JointGroup joint_group
Definition: tesseract_srdf_unit.cpp:1805
ChainGroup chain_group
Definition: tesseract_srdf_unit.cpp:1768
LinkGroup link_group
Definition: tesseract_srdf_unit.cpp:1845