smurf
Visual.hpp
Go to the documentation of this file.
1 //
2 // Copyright (c) 2015, Deutsches Forschungszentrum für Künstliche Intelligenz GmbH.
3 // All rights reserved.
4 //
5 // Redistribution and use in source and binary forms, with or without
6 // modification, are permitted provided that the following conditions are met:
7 //
8 // * Redistributions of source code must retain the above copyright notice, this
9 // list of conditions and the following disclaimer.
10 //
11 // * Redistributions in binary form must reproduce the above copyright notice,
12 // this list of conditions and the following disclaimer in the documentation
13 // and/or other materials provided with the distribution.
14 //
15 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
16 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
17 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
18 // DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
19 // FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
20 // DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
21 // SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
22 // CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
23 // OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
24 // OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
25 //
26 
27 #ifndef VISUAL_H
28 #define VISUAL_H
29 #include <urdf_model/types.h>
30 #include <urdf_model/link.h>
31 #include <boost/serialization/access.hpp>
32 #include <boost/serialization/export.hpp>
33 namespace smurf
34 {
35 
39  struct Visual
40  {
41  Visual();
42  Visual(const urdf::Visual& urdfVisual);
43  urdf::GeometrySharedPtr geometry;
44  std::string material_name;
45  urdf::MaterialSharedPtr material;
46  std::string name;
47 
48  int groupId;
49 
50  urdf::Pose origin;
51 
52  bool operator==(const Visual& other) const;
53  bool operator!=(const Visual& other) const;
54 
55  std::string getName() const
56  {
57  return name;
58  }
59 
62 
64  template <typename Archive>
65  void serialize(Archive &ar, const unsigned int version)
66  {
67  throw std::runtime_error("Smurf::Visual::serialize not implemented");
68  }
69 
70  };
71 }
72 
73 #endif // VISUAL_H
Definition: Visual.hpp:39
Visual()
Definition: Visual.cpp:29
urdf::GeometrySharedPtr geometry
Definition: Visual.hpp:43
std::string material_name
Definition: Visual.hpp:44
int groupId
Definition: Visual.hpp:48
urdf::MaterialSharedPtr material
Definition: Visual.hpp:45
friend class boost::serialization::access
Definition: Visual.hpp:61
std::string name
Definition: Visual.hpp:46
bool operator!=(const Visual &other) const
Definition: Visual.cpp:52
bool operator==(const Visual &other) const
Definition: Visual.cpp:44
void serialize(Archive &ar, const unsigned int version)
Definition: Visual.hpp:65
std::string getName() const
Definition: Visual.hpp:55
Definition: Collidable.hpp:11
urdf::Pose origin
Definition: Visual.hpp:50