37#ifndef TESSERACT_SCENE_GRAPH_LINK_H
38#define TESSERACT_SCENE_GRAPH_LINK_H
42#include <boost/serialization/access.hpp>
58 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
60 using Ptr = std::shared_ptr<Material>;
61 using ConstPtr = std::shared_ptr<const Material>;
73 color = Eigen::Vector4d(0.5, 0.5, 0.5, 1.0);
83 template <
class Archive>
84 void serialize(Archive& ar,
const unsigned int version);
94 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
96 using Ptr = std::shared_ptr<Inertial>;
97 using ConstPtr = std::shared_ptr<const Inertial>;
100 Eigen::Isometry3d
origin{ Eigen::Isometry3d::Identity() };
120 template <
class Archive>
121 void serialize(Archive& ar,
const unsigned int version);
127 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
129 using Ptr = std::shared_ptr<Visual>;
153 template <
class Archive>
154 void serialize(Archive& ar,
const unsigned int version);
160 EIGEN_MAKE_ALIGNED_OPERATOR_NEW
162 using Ptr = std::shared_ptr<Collision>;
183 template <
class Archive>
184 void serialize(Archive& ar,
const unsigned int version);
190 using Ptr = std::shared_ptr<Link>;
216 this->inertial.reset();
217 this->collision.clear();
218 this->visual.clear();
236 ret.
inertial = std::make_shared<Inertial>(*(this->inertial));
238 for (
const auto&
c : this->collision)
240 ret.
collision.push_back(std::make_shared<Collision>(*
c));
242 for (
const auto&
v : this->visual)
244 ret.
visual.push_back(std::make_shared<Visual>(*
v));
252 template <
class Archive>
253 void serialize(Archive& ar,
const unsigned int version);
258#include <boost/serialization/export.hpp>
259#include <boost/serialization/tracking.hpp>
std::shared_ptr< Geometry > Ptr
Definition: geometry.h:62
bool operator!=(const Collision &rhs) const
Definition: link.cpp:131
bool operator==(const Collision &rhs) const
Definition: link.cpp:122
std::shared_ptr< Collision > Ptr
Definition: link.h:162
Eigen::Isometry3d origin
Definition: link.h:166
tesseract_geometry::Geometry::Ptr geometry
Definition: link.h:167
void serialize(Archive &ar, const unsigned int version)
Definition: link.cpp:134
std::shared_ptr< const Collision > ConstPtr
Definition: link.h:163
Collision()
Definition: link.h:165
void clear()
Definition: link.h:169
friend class boost::serialization::access
Definition: link.h:182
std::string name
Definition: link.h:176
double iyz
Definition: link.h:106
double iyy
Definition: link.h:105
Eigen::Isometry3d origin
Definition: link.h:100
std::shared_ptr< const Inertial > ConstPtr
Definition: link.h:97
bool operator==(const Inertial &rhs) const
Definition: link.cpp:66
double ixy
Definition: link.h:103
double ixx
Definition: link.h:102
void serialize(Archive &ar, const unsigned int version)
Definition: link.cpp:83
void clear()
Definition: link.h:109
std::shared_ptr< Inertial > Ptr
Definition: link.h:96
friend class boost::serialization::access
Definition: link.h:119
double ixz
Definition: link.h:104
double mass
Definition: link.h:101
double izz
Definition: link.h:107
bool operator!=(const Inertial &rhs) const
Definition: link.cpp:80
Link(std::string name)
Definition: link.h:193
Link & operator=(Link &&other)=default
const std::string & getName() const
Definition: link.h:203
Link clone() const
Clone the link keeping the name.
Definition: link.h:228
std::shared_ptr< Link > Ptr
Definition: link.h:190
void clear()
Definition: link.h:214
Link(const Link &other)=delete
Link clone(const std::string &name) const
Definition: link.h:231
bool operator==(const Link &rhs) const
Definition: link.cpp:144
bool operator!=(const Link &rhs) const
Definition: link.cpp:163
std::string name_
Definition: link.h:250
std::vector< Visual::Ptr > visual
Visual Elements.
Definition: link.h:209
friend class boost::serialization::access
Definition: link.h:251
std::vector< Collision::Ptr > collision
Collision Elements.
Definition: link.h:212
Link(Link &&other)=default
void serialize(Archive &ar, const unsigned int version)
Definition: link.cpp:166
Link & operator=(const Link &other)=delete
std::shared_ptr< const Link > ConstPtr
Definition: link.h:191
Inertial::Ptr inertial
inertial element
Definition: link.h:206
bool operator!=(const Material &rhs) const
Definition: link.cpp:53
std::shared_ptr< const Material > ConstPtr
Definition: link.h:61
Eigen::Vector4d color
Definition: link.h:69
const std::string & getName() const
Definition: link.h:66
std::string texture_filename
Definition: link.h:68
bool operator==(const Material &rhs) const
Definition: link.cpp:44
std::shared_ptr< Material > Ptr
Definition: link.h:60
void clear()
Definition: link.h:71
friend class boost::serialization::access
Definition: link.h:82
std::string name_
Definition: link.h:80
void serialize(Archive &ar, const unsigned int version)
Definition: link.cpp:56
Material(std::string name)
Definition: link.h:64
std::string name
Definition: link.h:146
tesseract_geometry::Geometry::Ptr geometry
Definition: link.h:134
bool operator!=(const Visual &rhs) const
Definition: link.cpp:108
Material::Ptr material
Definition: link.h:136
Visual()
Definition: link.h:132
std::shared_ptr< const Visual > ConstPtr
Definition: link.h:130
void serialize(Archive &ar, const unsigned int version)
Definition: link.cpp:111
std::shared_ptr< Visual > Ptr
Definition: link.h:129
friend class boost::serialization::access
Definition: link.h:152
bool operator==(const Visual &rhs) const
Definition: link.cpp:98
void clear()
Definition: link.h:138
Eigen::Isometry3d origin
Definition: link.h:133
#define TESSERACT_COMMON_IGNORE_WARNINGS_PUSH
Definition: macros.h:71
Definition: create_convex_hull.cpp:36
static const auto DEFAULT_TESSERACT_MATERIAL
Definition: link.h:88
v
Definition: tesseract_common_unit.cpp:369
Collision::Ptr c
Definition: tesseract_scene_graph_link_unit.cpp:130
m name
Definition: tesseract_scene_graph_link_unit.cpp:77