Collision.hh
Go to the documentation of this file.
1 /*
2  * Copyright 2018 Open Source Robotics Foundation
3  *
4  * Licensed under the Apache License, Version 2.0 (the "License");
5  * you may not use this file except in compliance with the License.
6  * You may obtain a copy of the License at
7  *
8  * http://www.apache.org/licenses/LICENSE-2.0
9  *
10  * Unless required by applicable law or agreed to in writing, software
11  * distributed under the License is distributed on an "AS IS" BASIS,
12  * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13  * See the License for the specific language governing permissions and
14  * limitations under the License.
15  *
16  */
17 #ifndef SDF_COLLISION_HH_
18 #define SDF_COLLISION_HH_
19 
20 #include <string>
21 #include <ignition/math/Pose3.hh>
22 #include "sdf/Element.hh"
23 #include "sdf/Types.hh"
24 #include "sdf/sdf_config.h"
25 #include "sdf/system_util.hh"
26 
27 namespace sdf
28 {
29  // Inline bracke to help doxygen filtering.
30  inline namespace SDF_VERSION_NAMESPACE {
31  //
32  // Forward declaration.
33  class CollisionPrivate;
34  class Geometry;
35 
41  {
43  public: Collision();
44 
47  public: Collision(const Collision &_collision);
48 
51  public: Collision(Collision &&_collision) noexcept;
52 
56  public: Collision &operator=(Collision &&_collision);
57 
61  public: Collision &operator=(const Collision &_collision);
62 
64  public: ~Collision();
65 
72  public: Errors Load(ElementPtr _sdf);
73 
77  public: std::string Name() const;
78 
82  public: void SetName(const std::string &_name) const;
83 
86  public: const Geometry *Geom() const;
87 
90  public: void SetGeom(const Geometry &_geom);
91 
96  public: const ignition::math::Pose3d &Pose() const;
97 
101  public: void SetPose(const ignition::math::Pose3d &_pose);
102 
107  public: const std::string &PoseFrame() const;
108 
113  public: void SetPoseFrame(const std::string &_frame);
114 
119  public: sdf::ElementPtr Element() const;
120 
122  private: CollisionPrivate *dataPtr = nullptr;
123  };
124  }
125 }
126 #endif
Geometry provides access to a shape, such as a Box.
Definition: Geometry.hh:65
class SDFORMAT_VISIBLE Element
Definition: Element.hh:47
A collision element descibes the collison properties associated with a link.
Definition: Collision.hh:40
std::shared_ptr< Element > ElementPtr
Definition: Element.hh:51
std::vector< Error > Errors
A vector of Error.
Definition: Types.hh:74
#define SDFORMAT_VISIBLE
Use to represent "symbol visible" if supported.
Definition: system_util.hh:48
namespace for Simulation Description Format parser
Definition: AirPressure.hh:25