Tesseract
Motion Planning Environment
Loading...
Searching...
No Matches
srdf_model.h
Go to the documentation of this file.
1
27#ifndef TESSERACT_SRDF_SRDF_MODEL_H
28#define TESSERACT_SRDF_SRDF_MODEL_H
29
32#include <boost/serialization/access.hpp>
33#include <string>
34#include <memory>
35#include <array>
36#include <Eigen/Core>
38
44
46namespace tesseract_srdf
47{
50
53{
54public:
55 // LCOV_EXCL_START
56 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
57 // LCOV_EXCL_STOP
58
59 using Ptr = std::shared_ptr<SRDFModel>;
60 using ConstPtr = std::shared_ptr<const SRDFModel>;
61
62 SRDFModel() = default;
63 virtual ~SRDFModel() = default;
64 SRDFModel(const SRDFModel&) = default;
65 SRDFModel& operator=(const SRDFModel&) = default;
66 SRDFModel(SRDFModel&&) = default;
68
74 const std::string& filename,
76
82 const std::string& xmlstring,
84
86 bool saveToFile(const std::string& file_path) const;
87
89 void clear();
90
92 std::string name{ "undefined" };
93
95 std::array<int, 3> version{ { 1, 0, 0 } };
96
99
102
105
108
111
112 bool operator==(const SRDFModel& rhs) const;
113 bool operator!=(const SRDFModel& rhs) const;
114
115private:
117 template <class Archive>
118 void serialize(Archive& ar, const unsigned int version); // NOLINT
119};
120
121} // namespace tesseract_srdf
122
123#include <boost/serialization/export.hpp>
124#include <boost/serialization/tracking.hpp>
125BOOST_CLASS_EXPORT_KEY2(tesseract_srdf::SRDFModel, "SRDFModel")
126
127#endif // TESSERACT_SRDF_SRDF_MODEL_H
Definition: allowed_collision_matrix.h:23
Stores information about how the margins allowed between collision objects.
Definition: collision_margin_data.h:74
std::shared_ptr< CollisionMarginData > Ptr
Definition: collision_margin_data.h:78
Abstract class for resource loaders.
Definition: resource_locator.h:43
Definition: graph.h:125
Representation of semantic information about the robot.
Definition: srdf_model.h:53
SRDFModel & operator=(SRDFModel &&)=default
bool saveToFile(const std::string &file_path) const
Save the model to a file.
Definition: srdf_model.cpp:248
SRDFModel(const SRDFModel &)=default
tesseract_common::CollisionMarginData::Ptr collision_margin_data
Collision margin data.
Definition: srdf_model.h:107
void serialize(Archive &ar, const unsigned int version)
Definition: srdf_model.cpp:444
void clear()
Clear the model.
Definition: srdf_model.cpp:418
std::string name
The name of the srdf model.
Definition: srdf_model.h:92
KinematicsInformation kinematics_information
Contact information related to kinematics.
Definition: srdf_model.h:98
tesseract_common::CalibrationInfo calibration_info
The calibration information.
Definition: srdf_model.h:110
std::array< int, 3 > version
The version number major.minor[.patch].
Definition: srdf_model.h:95
bool operator==(const SRDFModel &rhs) const
Definition: srdf_model.cpp:428
bool operator!=(const SRDFModel &rhs) const
Definition: srdf_model.cpp:441
tesseract_common::ContactManagersPluginInfo contact_managers_plugin_info
The contact managers plugin information.
Definition: srdf_model.h:101
std::shared_ptr< const SRDFModel > ConstPtr
Definition: srdf_model.h:60
tesseract_common::AllowedCollisionMatrix acm
The allowed collision matrix.
Definition: srdf_model.h:104
SRDFModel(SRDFModel &&)=default
std::shared_ptr< SRDFModel > Ptr
Definition: srdf_model.h:59
SRDFModel & operator=(const SRDFModel &)=default
void initString(const tesseract_scene_graph::SceneGraph &scene_graph, const std::string &xmlstring, const tesseract_common::ResourceLocator &locator)
Load Model from a XML-string.
Definition: srdf_model.cpp:89
friend class boost::serialization::access
Definition: srdf_model.h:116
virtual ~SRDFModel()=default
void initFile(const tesseract_scene_graph::SceneGraph &scene_graph, const std::string &filename, const tesseract_common::ResourceLocator &locator)
Load Model given a filename.
Definition: srdf_model.cpp:57
This is used to store collision margin information.
A basic scene graph using boost.
auto scene_graph
Definition: ikfast_kinematics_7dof_unit.cpp:51
This hold the kinematics information.
Common Tesseract Macros.
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
Definition: macros.h:71
Definition: create_convex_hull.cpp:36
std::unordered_map< tesseract_common::LinkNamesPair, double, tesseract_common::PairHash > PairsCollisionMarginData
Definition: collision_margin_data.h:70
Main namespace.
Definition: collision_margins.h:49
tesseract_common::PairsCollisionMarginData PairsCollisionMarginData
Definition: srdf_model.h:49
Locate and retrieve resource data.
tesseract_common::fs::path file_path(__FILE__)
ResourceLocator::Ptr locator
Definition: resource_locator_unit.cpp:57
The CalibrationInfo struct.
Definition: types.h:257
The contact managers plugin information structure.
Definition: types.h:185
This hold the kinematics information used to create the SRDF and is the data container for the manipu...
Definition: kinematics_information.h:63