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/export.hpp>
33 #include <string>
34 #include <memory>
35 #include <array>
36 #include <Eigen/Core>
38 
39 #include <tesseract_common/fwd.h>
44 
45 namespace boost::serialization
46 {
47 class access;
48 }
49 
51 namespace tesseract_srdf
52 {
54 class SRDFModel
55 {
56 public:
57  // LCOV_EXCL_START
58  EIGEN_MAKE_ALIGNED_OPERATOR_NEW
59  // LCOV_EXCL_STOP
60 
61  using Ptr = std::shared_ptr<SRDFModel>;
62  using ConstPtr = std::shared_ptr<const SRDFModel>;
63 
64  SRDFModel() = default;
65  virtual ~SRDFModel() = default;
66  SRDFModel(const SRDFModel&) = default;
67  SRDFModel& operator=(const SRDFModel&) = default;
68  SRDFModel(SRDFModel&&) = default;
69  SRDFModel& operator=(SRDFModel&&) = default;
70 
75  void initFile(const tesseract_scene_graph::SceneGraph& scene_graph,
76  const std::string& filename,
77  const tesseract_common::ResourceLocator& locator);
78 
83  void initString(const tesseract_scene_graph::SceneGraph& scene_graph,
84  const std::string& xmlstring,
85  const tesseract_common::ResourceLocator& locator);
86 
88  bool saveToFile(const std::string& file_path) const;
89 
91  void clear();
92 
94  std::string name{ "undefined" };
95 
97  std::array<int, 3> version{ { 1, 0, 0 } };
98 
101 
104 
107 
109  std::shared_ptr<tesseract_common::CollisionMarginData> collision_margin_data;
110 
113 
114  bool operator==(const SRDFModel& rhs) const;
115  bool operator!=(const SRDFModel& rhs) const;
116 
117 private:
120  template <class Archive>
121  void serialize(Archive& ar, const unsigned int version); // NOLINT
122 };
123 
124 } // namespace tesseract_srdf
125 
126 BOOST_CLASS_EXPORT_KEY(tesseract_srdf::SRDFModel)
127 
128 #endif // TESSERACT_SRDF_SRDF_MODEL_H
tesseract_srdf::SRDFModel::serialize
void serialize(Archive &ar, const unsigned int version)
Definition: srdf_model.cpp:449
tesseract_srdf::SRDFModel::Ptr
std::shared_ptr< SRDFModel > Ptr
Definition: srdf_model.h:61
tesseract_srdf
Main namespace.
Definition: collision_margins.h:43
tesseract_srdf::SRDFModel::name
std::string name
The name of the srdf model.
Definition: srdf_model.h:94
allowed_collision_matrix.h
tesseract_srdf::SRDFModel::contact_managers_plugin_info
tesseract_common::ContactManagersPluginInfo contact_managers_plugin_info
The contact managers plugin information.
Definition: srdf_model.h:103
tesseract_srdf::SRDFModel::clear
void clear()
Clear the model.
Definition: srdf_model.cpp:423
tesseract_srdf::SRDFModel::saveToFile
bool saveToFile(const std::string &file_path) const
Save the model to a file.
Definition: srdf_model.cpp:253
tesseract_srdf::SRDFModel::ConstPtr
std::shared_ptr< const SRDFModel > ConstPtr
Definition: srdf_model.h:62
tesseract_srdf::SRDFModel::collision_margin_data
std::shared_ptr< tesseract_common::CollisionMarginData > collision_margin_data
Collision margin data.
Definition: srdf_model.h:109
TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
tesseract_srdf::SRDFModel::kinematics_information
KinematicsInformation kinematics_information
Contact information related to kinematics.
Definition: srdf_model.h:100
tesseract_scene_graph::SceneGraph
tesseract_srdf::SRDFModel
Representation of semantic information about the robot.
Definition: srdf_model.h:54
tesseract_common::Serialization
tesseract_srdf::SRDFModel::SRDFModel
SRDFModel()=default
tesseract_srdf::SRDFModel::~SRDFModel
virtual ~SRDFModel()=default
tesseract_srdf::SRDFModel::initString
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:94
tesseract_srdf::SRDFModel::initFile
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:62
tesseract_srdf::SRDFModel::operator=
SRDFModel & operator=(const SRDFModel &)=default
tesseract_srdf::SRDFModel::version
std::array< int, 3 > version
The version number major.minor[.patch].
Definition: srdf_model.h:97
tesseract_common::CalibrationInfo
tesseract_common::ContactManagersPluginInfo
tesseract_common::ResourceLocator
tesseract_srdf::SRDFModel::acm
tesseract_common::AllowedCollisionMatrix acm
The allowed collision matrix.
Definition: srdf_model.h:106
tesseract_srdf::KinematicsInformation
This hold the kinematics information used to create the SRDF and is the data container for the manipu...
Definition: kinematics_information.h:66
boost::serialization
tesseract_srdf::SRDFModel::operator!=
bool operator!=(const SRDFModel &rhs) const
Definition: srdf_model.cpp:446
kinematics_information.h
This hold the kinematics information.
tesseract_srdf::SRDFModel::operator==
bool operator==(const SRDFModel &rhs) const
Definition: srdf_model.cpp:433
fwd.h
tesseract_srdf::SRDFModel::access
friend class boost::serialization::access
Definition: srdf_model.h:118
TESSERACT_COMMON_IGNORE_WARNINGS_POP
#define TESSERACT_COMMON_IGNORE_WARNINGS_POP
tesseract_common::AllowedCollisionMatrix
calibration_info.h
tesseract_srdf::SRDFModel::calibration_info
tesseract_common::CalibrationInfo calibration_info
The calibration information.
Definition: srdf_model.h:112
macros.h


tesseract_srdf
Author(s): Levi Armstrong
autogenerated on Sun May 18 2025 03:02:04