Class
List
Hierarchy
Modules
Common
Events
Math
Messages
Physics
Rendering
Sensors
Transport
Links
Gazebo Website
Wiki
Tutorials
Download
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
gazebo
physics
Contact.hh
Go to the documentation of this file.
1
/*
2
* Copyright 2012 Nate Koenig
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
/* Desc: Specification of a contact
18
* Author: Nate Koenig
19
* Date: 10 Nov 2009
20
*/
21
22
#ifndef _CONTACT_HH_
23
#define _CONTACT_HH_
24
25
#include <vector>
26
27
#include "
gazebo/common/Time.hh
"
28
#include "
gazebo/math/Vector3.hh
"
29
#include "
gazebo/physics/JointFeedback.hh
"
30
31
// For the sake of efficiency, use fixed size arrays for collision
32
// MAX_COLLIDE_RETURNS limits contact detection, needs to be large
33
// for proper contact dynamics.
34
// MAX_CONTACT_JOINTS truncates <max_contacts> specified in SDF
35
#define MAX_COLLIDE_RETURNS 250
36
#define MAX_CONTACT_JOINTS 32
37
38
namespace
gazebo
39
{
40
namespace
physics
41
{
42
class
Collision;
45
49
class
Contact
50
{
52
public
:
Contact
();
53
56
public
:
Contact
(
const
Contact
&_contact);
57
59
public
:
virtual
~Contact
();
60
62
public
:
Contact
Clone
()
const
GAZEBO_DEPRECATED
;
63
67
public
:
Contact
&
operator =
(
const
Contact
&_contact);
68
70
public
:
void
Reset
();
71
73
public
:
Collision
*
collision1
;
74
76
public
:
Collision
*
collision2
;
77
79
public
:
JointFeedback
forces
[
MAX_CONTACT_JOINTS
];
80
82
public
:
math::Vector3
positions
[
MAX_CONTACT_JOINTS
];
83
85
public
:
math::Vector3
normals
[
MAX_CONTACT_JOINTS
];
86
88
public
:
double
depths
[
MAX_CONTACT_JOINTS
];
89
91
public
:
int
count
;
92
94
public
:
common::Time
time
;
95
};
97
}
98
}
99
#endif