SurfaceParams.hh
Go to the documentation of this file.
1 /*
2  * Copyright (C) 2012-2016 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 
18 #ifndef _GAZEBO_SURFACEPARAMS_HH_
19 #define _GAZEBO_SURFACEPARAMS_HH_
20 
21 #include <sdf/sdf.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 
47  public: double GetMuPrimary() GAZEBO_DEPRECATED(7.0);
48 
52  public: double GetMuSecondary() GAZEBO_DEPRECATED(7.0);
53 
56  public: double MuPrimary() const;
57 
60  public: double MuSecondary() const;
61 
64  public: double MuTorsion() const;
65 
68  public: double PatchRadius() const;
69 
72  public: double SurfaceRadius() const;
73 
76  public: bool UsePatchRadius() const;
77 
80  public: void SetMuPrimary(double _mu);
81 
84  public: void SetMuSecondary(double _mu);
85 
88  public: void SetMuTorsion(const double _mu);
89 
92  public: void SetPatchRadius(const double _radius);
93 
96  public: void SetSurfaceRadius(const double _radius);
97 
100  public: void SetUsePatchRadius(const bool _use);
101 
104  public: double PoissonsRatio() const;
105 
108  public: void SetPoissonsRatio(const double _ratio);
109 
112  public: double ElasticModulus() const;
113 
116  public: void SetElasticModulus(const double _modulus);
117 
123  private: double Mu(const unsigned int _index) const;
124 
131  private: void SetMu(unsigned int _index, double _mu);
132 
141 
146  private: double mu[3];
147 
153  private: double patchRadius;
154 
158  private: double surfaceRadius;
159 
164  private: bool usePatchRadius;
165 
167  private: double poissonsRatio;
168 
170  private: double elasticModulus;
171  };
172 
177  class GZ_PHYSICS_VISIBLE SurfaceParams
178  {
180  public: SurfaceParams();
181 
183  public: virtual ~SurfaceParams();
184 
187  public: virtual void Load(sdf::ElementPtr _sdf);
188 
191  public: virtual void FillMsg(msgs::Surface &_msg);
192 
195  public: virtual void ProcessMsg(const msgs::Surface &_msg);
196 
201  public: virtual FrictionPyramidPtr GetFrictionPyramid() const
202  GAZEBO_DEPRECATED(7.0);
203 
207  public: virtual FrictionPyramidPtr FrictionPyramid() const;
208 
210  public: bool collideWithoutContact;
211 
214  public: unsigned int collideWithoutContactBitmask;
215 
218  public: unsigned int collideBitmask;
219  };
221  }
222 }
223 #endif
boost::shared_ptr< FrictionPyramid > FrictionPyramidPtr
Definition: PhysicsTypes.hh:165
Parameters used for friction pyramid model.
Definition: SurfaceParams.hh:36
The Vector3 class represents the generic vector containing 3 elements.
Definition: Vector3.hh:39
#define GAZEBO_DEPRECATED(version)
Definition: CommonTypes.hh:48
default namespace for gazebo
math::Vector3 direction1
Vector for specifying the primary friction direction, relative to the parent collision frame...
Definition: SurfaceParams.hh:140
bool collideWithoutContact
Allow collision checking without generating a contact joint.
Definition: SurfaceParams.hh:210
unsigned int collideWithoutContactBitmask
Custom collision filtering used when collideWithoutContact is true.
Definition: SurfaceParams.hh:214
SurfaceParams defines various Surface contact parameters.
Definition: SurfaceParams.hh:177
unsigned int collideBitmask
Custom collision filtering.
Definition: SurfaceParams.hh:218