Gazebo Sim
API Reference
10.4.0
insert_drive_file
Tutorials
library_books
Classes
toc
Namespaces
insert_drive_file
Files
launch
Gazebo Website
Index
List
Hierarchy
Members: All
Members: Functions
Members: Variables
Members: Typedefs
Members: Enumerations
Members: Enumerator
List
Members
Functions
Typedefs
Variables
Enumerations
Enumerator
src
gz-sim
include
gz
sim
Link.hh
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2019 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 GZ_SIM_LINK_HH_
18
#define GZ_SIM_LINK_HH_
19
20
#include <memory>
21
#include <optional>
22
#include <string>
23
#include <vector>
24
25
#include <
gz/math/Inertial.hh
>
26
#include <
gz/math/Matrix3.hh
>
27
#include <
gz/math/Matrix6.hh
>
28
#include <
gz/math/Pose3.hh
>
29
#include <
gz/math/Quaternion.hh
>
30
#include <
gz/math/Vector3.hh
>
31
#include <
gz/math/AxisAlignedBox.hh
>
32
33
#include <gz/sim/config.hh>
34
#include <
gz/sim/EntityComponentManager.hh
>
35
#include <gz/sim/Export.hh>
36
#include <
gz/sim/Model.hh
>
37
#include <
gz/sim/Types.hh
>
38
39
namespace
gz
40
{
41
namespace
sim
42
{
43
// Inline bracket to help doxygen filtering.
44
inline
namespace
GZ_SIM_VERSION_NAMESPACE {
45
// Forward declarations.
46
class
GZ_SIM_HIDDEN
LinkPrivate
;
47
//
67
class
GZ_SIM_VISIBLE
Link
68
{
71
public
:
explicit
Link
(
sim::Entity
_entity = kNullEntity);
72
75
public
:
Link
(
const
Link
&_link);
76
79
public
:
Link
(
Link
&&_link)
noexcept
;
80
84
public
:
Link
&
operator=
(
Link
&&_link)
noexcept
;
85
89
public
:
Link
&
operator=
(
const
Link
&_link);
90
92
public
:
~Link
();
93
96
public
:
sim::Entity
Entity
()
const
;
97
100
public
:
void
ResetEntity
(
sim::Entity
_newEntity);
101
106
public
:
bool
Valid
(
const
EntityComponentManager
&_ecm)
const
;
107
112
public
: std::optional<std::string>
Name
(
113
const
EntityComponentManager
&_ecm)
const
;
114
119
public
: std::optional<Model>
ParentModel
(
120
const
EntityComponentManager
&_ecm)
const
;
121
125
public
:
bool
IsCanonical
(
const
EntityComponentManager
&_ecm)
const
;
126
130
public
:
bool
WindMode
(
const
EntityComponentManager
&_ecm)
const
;
131
135
public
: std::optional<bool>
GravityEnabled
(
136
const
EntityComponentManager
&_ecm)
const
;
137
143
public
:
sim::Entity
CollisionByName
(
const
EntityComponentManager
&_ecm,
144
const
std::string
&_name)
const
;
145
151
public
:
sim::Entity
SensorByName
(
const
EntityComponentManager
&_ecm,
152
const
std::string
&_name)
const
;
153
159
public
:
sim::Entity
VisualByName
(
const
EntityComponentManager
&_ecm,
160
const
std::string
&_name)
const
;
161
165
public
:
std::vector<sim::Entity>
Collisions
(
166
const
EntityComponentManager
&_ecm)
const
;
167
171
public
:
std::vector<sim::Entity>
Sensors
(
172
const
EntityComponentManager
&_ecm)
const
;
173
177
public
:
std::vector<sim::Entity>
Visuals
(
178
const
EntityComponentManager
&_ecm)
const
;
179
184
public
: uint64_t
CollisionCount
(
const
EntityComponentManager
&_ecm)
const
;
185
190
public
: uint64_t
SensorCount
(
const
EntityComponentManager
&_ecm)
const
;
191
196
public
: uint64_t
VisualCount
(
const
EntityComponentManager
&_ecm)
const
;
197
202
public
: std::optional<math::Pose3d>
WorldPose
(
203
const
EntityComponentManager
&_ecm)
const
;
204
209
public
: std::optional<math::Inertiald>
WorldInertial
(
210
const
EntityComponentManager
&_ecm)
const
;
211
217
public
: std::optional<math::Pose3d>
WorldInertialPose
(
218
const
EntityComponentManager
&_ecm)
const
;
219
228
public
: std::optional<math::Vector3d>
WorldLinearVelocity
(
229
const
EntityComponentManager
&_ecm)
const
;
230
239
public
: std::optional<math::Vector3d>
WorldLinearVelocity
(
240
const
EntityComponentManager
&_ecm,
241
const
math::Vector3d
&_offset)
const
;
242
248
public
: std::optional<math::Vector3d>
WorldAngularVelocity
(
249
const
EntityComponentManager
&_ecm)
const
;
250
257
public
:
void
EnableVelocityChecks
(
EntityComponentManager
&_ecm,
258
bool
_enable =
true
)
const
;
259
264
public
:
void
SetLinearVelocity
(
EntityComponentManager
&_ecm,
265
const
math::Vector3d
&_vel)
const
;
266
267
272
public
:
void
SetAngularVelocity
(
EntityComponentManager
&_ecm,
273
const
math::Vector3d
&_vel)
const
;
274
278
public
:
void
SetGravityEnabled
(
EntityComponentManager
&_ecm,
279
bool
_enabled)
const
;
280
286
public
: std::optional<math::Vector3d>
WorldAngularAcceleration
(
287
const
EntityComponentManager
&_ecm)
const
;
288
294
public
: std::optional<math::Vector3d>
WorldLinearAcceleration
(
295
const
EntityComponentManager
&_ecm)
const
;
296
303
public
:
void
EnableAccelerationChecks
(
EntityComponentManager
&_ecm,
304
bool
_enable =
true
)
const
;
305
311
public
: std::optional<math::Matrix3d>
WorldInertiaMatrix
(
312
const
EntityComponentManager
&_ecm)
const
;
313
319
public
: std::optional<math::Matrix6d>
WorldFluidAddedMassMatrix
(
320
const
EntityComponentManager
&_ecm)
const
;
321
329
public
: std::optional<double>
WorldKineticEnergy
(
330
const
EntityComponentManager
&_ecm)
const
;
331
336
public
:
void
AddWorldForce
(
EntityComponentManager
&_ecm,
337
const
math::Vector3d
&_force)
const
;
338
345
public
:
void
AddWorldForce
(
EntityComponentManager
&_ecm,
346
const
math::Vector3d
&_force,
347
const
math::Vector3d
&_position)
const
;
348
354
public
:
void
AddForceInInertialFrame
(
EntityComponentManager
&_ecm,
355
const
math::Vector3d
&_force)
const
;
356
365
public
:
void
AddForceInInertialFrame
(
EntityComponentManager
&_ecm,
366
const
math::Vector3d
&_force,
367
const
math::Vector3d
&_position)
const
;
368
375
public
:
void
AddWorldWrench
(
EntityComponentManager
&_ecm,
376
const
math::Vector3d
&_force,
377
const
math::Vector3d
&_torque)
const
;
378
387
public
:
void
AddWorldWrench
(
EntityComponentManager
&_ecm,
388
const
math::Vector3d
&_force,
389
const
math::Vector3d
&_torque,
390
const
math::Vector3d
&_offset)
const
;
391
400
public
:
void
EnableBoundingBoxChecks
(
401
EntityComponentManager
&_ecm,
402
bool
_enable =
true
)
const
;
403
409
public
: std::optional<math::AxisAlignedBox>
AxisAlignedBox
(
410
const
EntityComponentManager
&_ecm)
const
;
411
417
public
: std::optional<math::AxisAlignedBox>
WorldAxisAlignedBox
(
418
const
EntityComponentManager
&_ecm)
const
;
419
429
public
: std::optional<math::AxisAlignedBox>
ComputeAxisAlignedBox
(
430
const
EntityComponentManager
&_ecm)
const
;
431
433
private
:
std::unique_ptr<LinkPrivate>
dataPtr;
434
};
435
}
436
}
437
}
438
#endif