26#ifndef TESSERACT_COMMON_TYPES_H
27#define TESSERACT_COMMON_TYPES_H
31#include <boost/serialization/access.hpp>
33#include <Eigen/Geometry>
37#include <unordered_map>
38#include <boost/filesystem.hpp>
39#include <yaml-cpp/yaml.h>
47namespace fs = boost::filesystem;
52template <
typename Key,
typename Value>
53using AlignedMap = std::map<Key, Value, std::less<Key>, Eigen::aligned_allocator<std::pair<const Key, Value>>>;
55template <
typename Key,
typename Value>
60 Eigen::aligned_allocator<std::pair<const Key, Value>>>;
69using TrajArray = Eigen::Matrix<double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor>;
119 template <
class Archive>
120 void save(Archive& ar,
const unsigned int version)
const;
122 template <
class Archive>
123 void load(Archive& ar,
const unsigned int version);
125 template <
class Archive>
126 void serialize(Archive& ar,
const unsigned int version);
143 template <
class Archive>
144 void serialize(Archive& ar,
const unsigned int version);
172 static inline const std::string
CONFIG_KEY{
"kinematic_plugins" };
179 template <
class Archive>
180 void serialize(Archive& ar,
const unsigned int version);
208 static inline const std::string
CONFIG_KEY{
"contact_manager_plugins" };
215 template <
class Archive>
216 void serialize(Archive& ar,
const unsigned int version);
244 static inline const std::string
CONFIG_KEY{
"task_composer_plugins" };
251 template <
class Archive>
252 void serialize(Archive& ar,
const unsigned int version);
259 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
288 template <
class Archive>
289 void serialize(Archive& ar,
const unsigned int version);
293#include <boost/serialization/export.hpp>
294#include <boost/serialization/tracking.hpp>
296BOOST_CLASS_EXPORT_KEY2(
tesseract_common::PluginInfoContainer, "PluginInfoContainer")
297BOOST_CLASS_EXPORT_KEY2(
tesseract_common::KinematicsPluginInfo, "KinematicsPluginInfo")
298BOOST_CLASS_EXPORT_KEY2(
tesseract_common::ContactManagersPluginInfo, "ContactManagersPluginInfo")
299BOOST_CLASS_EXPORT_KEY2(
tesseract_common::TaskComposerPluginInfo, "TaskComposerPluginInfo")
300BOOST_CLASS_EXPORT_KEY2(
tesseract_common::CalibrationInfo, "CalibrationInfo")
Common Tesseract Kinematic Limits and Related Utility Functions.
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
Definition: macros.h:71
Definition: create_convex_hull.cpp:36
Definition: allowed_collision_matrix.h:16
std::vector< T, Eigen::aligned_allocator< T > > AlignedVector
Enable easy switching to std::filesystem when available.
Definition: types.h:50
LinkNamesPair makeOrderedLinkPair(const std::string &link_name1, const std::string &link_name2)
Create a pair of strings, where the pair.first is always <= pair.second.
Definition: types.cpp:56
std::map< Key, Value, std::less< Key >, Eigen::aligned_allocator< std::pair< const Key, Value > > > AlignedMap
Definition: types.h:53
Eigen::Matrix< double, Eigen::Dynamic, Eigen::Dynamic, Eigen::RowMajor > TrajArray
Definition: types.h:69
std::map< std::string, PluginInfo > PluginInfoMap
A map of PluginInfo to user defined name.
Definition: types.h:130
std::pair< std::string, std::string > LinkNamesPair
Definition: types.h:71
AlignedMap< std::string, Eigen::Isometry3d > TransformMap
Definition: types.h:66
AlignedVector< Eigen::Vector4d > VectorVector4d
Definition: types.h:63
std::unordered_map< Key, Value, std::hash< Key >, std::equal_to< Key >, Eigen::aligned_allocator< std::pair< const Key, Value > > > AlignedUnorderedMap
Definition: types.h:60
AlignedVector< VectorIsometry3d > Toolpath
Definition: types.h:67
AlignedVector< Eigen::Isometry3d > VectorIsometry3d
Definition: types.h:62
AlignedVector< Eigen::Vector2d > VectorVector2d
Definition: types.h:65
std::vector< Eigen::Vector3d > VectorVector3d
Definition: types.h:64
The CalibrationInfo struct.
Definition: types.h:257
bool operator==(const CalibrationInfo &rhs) const
Definition: types.cpp:334
EIGEN_MAKE_ALIGNED_OPERATOR_NEW CalibrationInfo()=default
bool empty() const
Check if structure is empty.
Definition: types.cpp:332
void insert(const CalibrationInfo &other)
Insert the content of an other CalibrationInfo.
Definition: types.cpp:324
static const std::string CONFIG_KEY
Definition: types.h:281
bool operator!=(const CalibrationInfo &rhs) const
Definition: types.cpp:345
void serialize(Archive &ar, const unsigned int version)
Definition: types.cpp:348
void clear()
Clear the contents.
Definition: types.cpp:330
friend class boost::serialization::access
Definition: types.h:287
tesseract_common::TransformMap joints
The joint origin calibration information.
Definition: types.h:269
The kinematics plugin information structure.
Definition: types.h:149
bool empty() const
Check if structure is empty.
Definition: types.cpp:177
void insert(const KinematicsPluginInfo &other)
Insert the content of an other KinematicsPluginInfo.
Definition: types.cpp:145
static const std::string CONFIG_KEY
Definition: types.h:172
std::map< std::string, tesseract_common::PluginInfoContainer > inv_plugin_infos
A map of group name to inverse kinematics plugin information.
Definition: types.h:160
std::set< std::string > search_libraries
A list of library names without the prefix or suffix that contain plugins.
Definition: types.h:154
bool operator==(const KinematicsPluginInfo &rhs) const
Definition: types.cpp:182
friend class boost::serialization::access
Definition: types.h:178
std::map< std::string, tesseract_common::PluginInfoContainer > fwd_plugin_infos
A map of group name to forward kinematics plugin information.
Definition: types.h:157
std::set< std::string > search_paths
A list of paths to search for plugins.
Definition: types.h:151
bool operator!=(const KinematicsPluginInfo &rhs) const
Definition: types.cpp:194
void serialize(Archive &ar, const unsigned int version)
Definition: types.cpp:197
void clear()
Clear the contents.
Definition: types.cpp:169
std::size_t operator()(const LinkNamesPair &pair) const
Definition: types.cpp:47
void clear()
Definition: types.cpp:119
PluginInfoMap plugins
Definition: types.h:135
bool operator!=(const PluginInfoContainer &rhs) const
Definition: types.cpp:133
void serialize(Archive &ar, const unsigned int version)
Definition: types.cpp:136
std::string default_plugin
Definition: types.h:134
bool operator==(const PluginInfoContainer &rhs) const
Definition: types.cpp:125
friend class boost::serialization::access
Definition: types.h:142
The Plugin Information struct.
Definition: types.h:104
void load(Archive &ar, const unsigned int version)
Definition: types.cpp:100
std::string class_name
The plugin class name.
Definition: types.h:106
YAML::Node config
The plugin config data.
Definition: types.h:109
std::string getConfigString() const
Get the yaml config as a string.
Definition: types.cpp:79
bool operator==(const PluginInfo &rhs) const
Definition: types.cpp:81
void save(Archive &ar, const unsigned int version) const
Definition: types.cpp:92
friend class boost::serialization::access
Definition: types.h:118
void serialize(Archive &ar, const unsigned int version)
Definition: types.cpp:110
bool operator!=(const PluginInfo &rhs) const
Definition: types.cpp:89
The task composer plugin information structure.
Definition: types.h:221
bool empty() const
Check if structure is empty.
Definition: types.cpp:295
void clear()
Clear the contents.
Definition: types.cpp:287
tesseract_common::PluginInfoContainer task_plugin_infos
A map of name to task composer task plugin information.
Definition: types.h:232
void insert(const TaskComposerPluginInfo &other)
Insert the content of an other TaskComposerPluginInfo.
Definition: types.cpp:269
bool operator==(const TaskComposerPluginInfo &rhs) const
Definition: types.cpp:301
bool operator!=(const TaskComposerPluginInfo &rhs) const
Definition: types.cpp:310
static const std::string CONFIG_KEY
Definition: types.h:244
tesseract_common::PluginInfoContainer executor_plugin_infos
A map of name to task composer executor plugin information.
Definition: types.h:229
std::set< std::string > search_libraries
A list of library names without the prefix or suffix that contain plugins.
Definition: types.h:226
std::set< std::string > search_paths
A list of paths to search for plugins.
Definition: types.h:223
friend class boost::serialization::access
Definition: types.h:250
void serialize(Archive &ar, const unsigned int version)
Definition: types.cpp:313