Gazebo Sim
API Reference
10.6.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
: std::optional<bool>
Kinematic
(
144
const
EntityComponentManager
&_ecm)
const
;
145
151
public
:
sim::Entity
CollisionByName
(
const
EntityComponentManager
&_ecm,
152
const
std::string
&_name)
const
;
153
159
public
:
sim::Entity
SensorByName
(
const
EntityComponentManager
&_ecm,
160
const
std::string
&_name)
const
;
161
167
public
:
sim::Entity
VisualByName
(
const
EntityComponentManager
&_ecm,
168
const
std::string
&_name)
const
;
169
173
public
:
std::vector<sim::Entity>
Collisions
(
174
const
EntityComponentManager
&_ecm)
const
;
175
179
public
:
std::vector<sim::Entity>
Sensors
(
180
const
EntityComponentManager
&_ecm)
const
;
181
185
public
:
std::vector<sim::Entity>
Visuals
(
186
const
EntityComponentManager
&_ecm)
const
;
187
192
public
: uint64_t
CollisionCount
(
const
EntityComponentManager
&_ecm)
const
;
193
198
public
: uint64_t
SensorCount
(
const
EntityComponentManager
&_ecm)
const
;
199
204
public
: uint64_t
VisualCount
(
const
EntityComponentManager
&_ecm)
const
;
205
210
public
: std::optional<math::Pose3d>
WorldPose
(
211
const
EntityComponentManager
&_ecm)
const
;
212
217
public
: std::optional<math::Inertiald>
WorldInertial
(
218
const
EntityComponentManager
&_ecm)
const
;
219
225
public
: std::optional<math::Pose3d>
WorldInertialPose
(
226
const
EntityComponentManager
&_ecm)
const
;
227
236
public
: std::optional<math::Vector3d>
WorldLinearVelocity
(
237
const
EntityComponentManager
&_ecm)
const
;
238
247
public
: std::optional<math::Vector3d>
WorldLinearVelocity
(
248
const
EntityComponentManager
&_ecm,
249
const
math::Vector3d
&_offset)
const
;
250
256
public
: std::optional<math::Vector3d>
WorldAngularVelocity
(
257
const
EntityComponentManager
&_ecm)
const
;
258
265
public
:
void
EnableVelocityChecks
(
EntityComponentManager
&_ecm,
266
bool
_enable =
true
)
const
;
267
272
public
:
void
SetLinearVelocity
(
EntityComponentManager
&_ecm,
273
const
math::Vector3d
&_vel)
const
;
274
275
280
public
:
void
SetAngularVelocity
(
EntityComponentManager
&_ecm,
281
const
math::Vector3d
&_vel)
const
;
282
286
public
:
void
SetGravityEnabled
(
EntityComponentManager
&_ecm,
287
bool
_enabled)
const
;
288
295
public
:
void
SetKinematic
(
EntityComponentManager
&_ecm,
296
bool
_kinematic)
const
;
297
303
public
: std::optional<math::Vector3d>
WorldAngularAcceleration
(
304
const
EntityComponentManager
&_ecm)
const
;
305
311
public
: std::optional<math::Vector3d>
WorldLinearAcceleration
(
312
const
EntityComponentManager
&_ecm)
const
;
313
320
public
:
void
EnableAccelerationChecks
(
EntityComponentManager
&_ecm,
321
bool
_enable =
true
)
const
;
322
328
public
: std::optional<math::Matrix3d>
WorldInertiaMatrix
(
329
const
EntityComponentManager
&_ecm)
const
;
330
336
public
: std::optional<math::Matrix6d>
WorldFluidAddedMassMatrix
(
337
const
EntityComponentManager
&_ecm)
const
;
338
346
public
: std::optional<double>
WorldKineticEnergy
(
347
const
EntityComponentManager
&_ecm)
const
;
348
353
public
:
void
AddWorldForce
(
EntityComponentManager
&_ecm,
354
const
math::Vector3d
&_force)
const
;
355
362
public
:
void
AddWorldForce
(
EntityComponentManager
&_ecm,
363
const
math::Vector3d
&_force,
364
const
math::Vector3d
&_position)
const
;
365
371
public
:
void
AddForceInInertialFrame
(
EntityComponentManager
&_ecm,
372
const
math::Vector3d
&_force)
const
;
373
382
public
:
void
AddForceInInertialFrame
(
EntityComponentManager
&_ecm,
383
const
math::Vector3d
&_force,
384
const
math::Vector3d
&_position)
const
;
385
392
public
:
void
AddWorldWrench
(
EntityComponentManager
&_ecm,
393
const
math::Vector3d
&_force,
394
const
math::Vector3d
&_torque)
const
;
395
404
public
:
void
AddWorldWrench
(
EntityComponentManager
&_ecm,
405
const
math::Vector3d
&_force,
406
const
math::Vector3d
&_torque,
407
const
math::Vector3d
&_offset)
const
;
408
417
public
:
void
EnableBoundingBoxChecks
(
418
EntityComponentManager
&_ecm,
419
bool
_enable =
true
)
const
;
420
426
public
: std::optional<math::AxisAlignedBox>
AxisAlignedBox
(
427
const
EntityComponentManager
&_ecm)
const
;
428
434
public
: std::optional<math::AxisAlignedBox>
WorldAxisAlignedBox
(
435
const
EntityComponentManager
&_ecm)
const
;
436
446
public
: std::optional<math::AxisAlignedBox>
ComputeAxisAlignedBox
(
447
const
EntityComponentManager
&_ecm)
const
;
448
450
private
:
std::unique_ptr<LinkPrivate>
dataPtr;
451
};
452
}
453
}
454
}
455
#endif