Class
List
Hierarchy
Modules
Common
Events
Math
Messages
Physics
Rendering
Sensors
Transport
Links
Gazebo Website
Wiki
Tutorials
Download
Report Documentation Issues
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
gazebo
physics
dart
DARTLink.hh
Go to the documentation of this file.
1
/*
2
* Copyright 2014 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_DARTLINK_HH_
19
#define _GAZEBO_DARTLINK_HH_
20
21
#include <vector>
22
23
#include "
gazebo/physics/Link.hh
"
24
25
#include "
gazebo/physics/dart/dart_inc.h
"
26
#include "
gazebo/physics/dart/DARTTypes.hh
"
27
28
namespace
gazebo
29
{
30
namespace
physics
31
{
36
38
class
DARTLink
:
public
Link
39
{
41
public
:
explicit
DARTLink
(
EntityPtr
_parent);
42
44
public
:
virtual
~DARTLink
();
45
46
// Documentation inherited
47
public
:
virtual
void
Load
(sdf::ElementPtr _ptr);
48
49
// Documentation inherited.
50
public
:
virtual
void
Init
();
51
52
// Documentation inherited.
53
public
:
virtual
void
Fini
();
54
55
// Documentation inherited
56
public
:
virtual
void
OnPoseChange
();
57
58
// Documentation inherited
59
public
:
virtual
void
SetEnabled
(
bool
_enable)
const
;
60
61
// Documentation inherited
62
public
:
virtual
bool
GetEnabled
()
const
;
63
64
// Documentation inherited
65
public
:
virtual
void
SetLinearVel
(
const
math::Vector3
&_vel);
66
67
// Documentation inherited
68
public
:
virtual
void
SetAngularVel
(
const
math::Vector3
&_vel);
69
70
// Documentation inherited
71
public
:
virtual
void
SetForce
(
const
math::Vector3
&_force);
72
73
// Documentation inherited
74
public
:
virtual
void
SetTorque
(
const
math::Vector3
&_torque);
75
76
// Documentation inherited
77
public
:
virtual
void
AddForce
(
const
math::Vector3
&_force);
78
79
// Documentation inherited
80
public
:
virtual
void
AddRelativeForce
(
const
math::Vector3
&_force);
81
82
// Documentation inherited
83
public
:
virtual
void
AddForceAtWorldPosition
(
const
math::Vector3
&_force,
84
const
math::Vector3
&_pos);
85
86
// Documentation inherited
87
public
:
virtual
void
AddForceAtRelativePosition
(
88
const
math::Vector3
&_force,
89
const
math::Vector3
&_relpos);
90
91
// Documentation inherited
92
public
:
virtual
void
AddTorque
(
const
math::Vector3
&_torque);
93
94
// Documentation inherited
95
public
:
virtual
void
AddRelativeTorque
(
const
math::Vector3
& _torque);
96
97
// Documentation inherited
98
public
:
virtual
math::Vector3
GetWorldLinearVel
(
99
const
math::Vector3
& _offset =
math::Vector3
(0, 0, 0))
const
;
100
101
// Documentation inherited
102
public
:
virtual
math::Vector3
GetWorldLinearVel
(
103
const
math::Vector3
&_offset,
104
const
math::Quaternion
&_q)
const
;
105
106
// Documentation inherited
107
public
:
virtual
math::Vector3
GetWorldCoGLinearVel
()
const
;
108
109
// Documentation inherited
110
public
:
virtual
math::Vector3
GetWorldAngularVel
()
const
;
111
112
// Documentation inherited
113
public
:
virtual
math::Vector3
GetWorldForce
()
const
;
114
115
// Documentation inherited
116
public
:
virtual
math::Vector3
GetWorldTorque
()
const
;
117
118
// Documentation inherited
119
public
:
virtual
void
SetGravityMode
(
bool
_mode);
120
121
// Documentation inherited
122
public
:
virtual
bool
GetGravityMode
()
const
;
123
124
// Documentation inherited
125
public
:
virtual
void
SetSelfCollide
(
bool
_collide);
126
127
// Documentation inherited
128
public
:
virtual
void
SetLinearDamping
(
double
_damping);
129
130
// Documentation inherited
131
public
:
virtual
void
SetAngularDamping
(
double
_damping);
132
133
// Documentation inherited
134
public
:
virtual
void
SetKinematic
(
const
bool
&_state);
135
136
// Documentation inherited
137
public
:
virtual
bool
GetKinematic
()
const
;
138
139
// Documentation inherited
140
public
:
virtual
void
SetAutoDisable
(
bool
_disable);
141
142
// Documentation inherited
143
public
:
virtual
void
SetLinkStatic
(
bool
_static);
144
148
public
:
void
updateDirtyPoseFromDARTTransformation
();
149
152
public
:
DARTPhysicsPtr
GetDARTPhysics
(
void
)
const
;
153
156
public
: dart::simulation::World *
GetDARTWorld
(
void
)
const
;
157
160
public
:
DARTModelPtr
GetDARTModel
()
const
;
161
164
public
: dart::dynamics::BodyNode *
GetDARTBodyNode
()
const
;
165
168
public
:
void
SetDARTParentJoint
(
DARTJointPtr
_dartParentJoint);
169
172
public
:
void
AddDARTChildJoint
(
DARTJointPtr
_dartChildJoint);
173
175
private
:
DARTPhysicsPtr
dartPhysics;
176
178
private
: dart::dynamics::BodyNode *dtBodyNode;
179
181
private
:
DARTJointPtr
dartParentJoint;
182
184
private
: std::vector<DARTJointPtr> dartChildJoints;
185
187
private
:
bool
staticLink;
188
};
190
}
191
}
192
#endif