SurfaceParams.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012 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 GAZEBO_PHYSICS_SURFACEPARAMS_HH_
18 #define GAZEBO_PHYSICS_SURFACEPARAMS_HH_
19 
20 #include <sdf/sdf.hh>
21 #include <ignition/math/Vector3.hh>
22 
23 #include "gazebo/msgs/msgs.hh"
25 #include "gazebo/util/system.hh"
26 
27 namespace gazebo
28 {
29  namespace physics
30  {
33 
36  class GZ_PHYSICS_VISIBLE FrictionPyramid
37  {
39  public: FrictionPyramid();
40 
42  public: virtual ~FrictionPyramid();
43 
46  public: double MuPrimary() const;
47 
50  public: double MuSecondary() const;
51 
54  public: double MuTorsion() const;
55 
58  public: double PatchRadius() const;
59 
62  public: double SurfaceRadius() const;
63 
66  public: bool UsePatchRadius() const;
67 
70  public: void SetMuPrimary(double _mu);
71 
74  public: void SetMuSecondary(double _mu);
75 
78  public: void SetMuTorsion(const double _mu);
79 
82  public: void SetPatchRadius(const double _radius);
83 
86  public: void SetSurfaceRadius(const double _radius);
87 
90  public: void SetUsePatchRadius(const bool _use);
91 
94  public: double PoissonsRatio() const;
95 
98  public: void SetPoissonsRatio(const double _ratio);
99 
102  public: double ElasticModulus() const;
103 
106  public: void SetElasticModulus(const double _modulus);
107 
115  public: ignition::math::Vector3d direction1;
116 
122  private: double Mu(const unsigned int _index) const;
123 
130  private: void SetMu(unsigned int _index, double _mu);
131 
136  private: double mu[3];
137 
143  private: double patchRadius;
144 
148  private: double surfaceRadius;
149 
154  private: bool usePatchRadius;
155 
157  private: double poissonsRatio;
158 
160  private: double elasticModulus;
161  };
162 
167  class GZ_PHYSICS_VISIBLE SurfaceParams
168  {
170  public: SurfaceParams();
171 
173  public: virtual ~SurfaceParams();
174 
177  public: virtual void Load(sdf::ElementPtr _sdf);
178 
181  public: virtual void FillMsg(msgs::Surface &_msg);
182 
185  public: virtual void ProcessMsg(const msgs::Surface &_msg);
186 
190  public: virtual FrictionPyramidPtr FrictionPyramid() const;
191 
193  public: bool collideWithoutContact;
194 
197  public: unsigned int collideWithoutContactBitmask;
198 
201  public: unsigned int collideBitmask;
202  };
204  }
205 }
206 #endif
boost::shared_ptr< FrictionPyramid > FrictionPyramidPtr
Definition: PhysicsTypes.hh:165
Parameters used for friction pyramid model.
Definition: SurfaceParams.hh:36
default namespace for gazebo
bool collideWithoutContact
Allow collision checking without generating a contact joint.
Definition: SurfaceParams.hh:193
unsigned int collideWithoutContactBitmask
Custom collision filtering used when collideWithoutContact is true.
Definition: SurfaceParams.hh:197
SurfaceParams defines various Surface contact parameters.
Definition: SurfaceParams.hh:167
ignition::math::Vector3d direction1
Vector for specifying the primary friction direction, relative to the parent collision frame...
Definition: SurfaceParams.hh:115
unsigned int collideBitmask
Custom collision filtering.
Definition: SurfaceParams.hh:201