Class
List
Hierarchy
Links
SDF Website
Report Documentation Issues
src
sdformat
include
sdf
Link.hh
Go to the documentation of this file.
1
/*
2
* Copyright 2018 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 SDF_LINK_HH_
18
#define SDF_LINK_HH_
19
20
#include <memory>
21
#include <string>
22
#include <ignition/math/Pose3.hh>
23
#include <ignition/utils/ImplPtr.hh>
24
#include "
sdf/Element.hh
"
25
#include "
sdf/SemanticPose.hh
"
26
#include "
sdf/Types.hh
"
27
#include "sdf/sdf_config.h"
28
#include "
sdf/system_util.hh
"
29
30
namespace
sdf
31
{
32
// Inline bracket to help doxygen filtering.
33
inline
namespace
SDF_VERSION_NAMESPACE {
34
//
35
36
// Forward declarations.
37
class
Collision;
38
class
Light;
39
class
ParticleEmitter;
40
class
Sensor;
41
class
Visual;
42
struct
PoseRelativeToGraph;
43
template
<
typename
T>
class
ScopedGraph;
44
45
class
SDFORMAT_VISIBLE
Link
46
{
48
public
:
Link
();
49
56
public
:
Errors
Load(
ElementPtr
_sdf);
57
61
public
: std::string Name()
const
;
62
66
public
:
void
SetName(
const
std::string &_name);
67
70
public
: uint64_t VisualCount()
const
;
71
77
public
:
const
Visual
*VisualByIndex(
const
uint64_t _index)
const
;
78
82
public
:
bool
VisualNameExists(
const
std::string &_name)
const
;
83
87
public
:
const
Visual
*VisualByName(
const
std::string &_name)
const
;
88
91
public
: uint64_t CollisionCount()
const
;
92
98
public
:
const
Collision
*CollisionByIndex(
const
uint64_t _index)
const
;
99
103
public
:
bool
CollisionNameExists(
const
std::string &_name)
const
;
104
108
public
:
const
Collision
*CollisionByName(
const
std::string &_name)
const
;
109
112
public
: uint64_t LightCount()
const
;
113
119
public
:
const
Light
*LightByIndex(
const
uint64_t _index)
const
;
120
124
public
:
bool
LightNameExists(
const
std::string &_name)
const
;
125
129
public
:
const
Light
*LightByName(
const
std::string &_name)
const
;
130
133
public
: uint64_t SensorCount()
const
;
134
140
public
:
const
Sensor
*SensorByIndex(
const
uint64_t _index)
const
;
141
145
public
:
bool
SensorNameExists(
const
std::string &_name)
const
;
146
152
public
:
const
Sensor
*SensorByName(
const
std::string &_name)
const
;
153
156
public
: uint64_t ParticleEmitterCount()
const
;
157
164
public
:
const
ParticleEmitter
*ParticleEmitterByIndex(
165
const
uint64_t _index)
const
;
166
170
public
:
bool
ParticleEmitterNameExists(
const
std::string &_name)
const
;
171
177
public
:
const
ParticleEmitter
*ParticleEmitterByName(
178
const
std::string &_name)
const
;
179
193
public
:
const
ignition::math::Inertiald &Inertial()
const
;
194
199
public
:
bool
SetInertial(
const
ignition::math::Inertiald &_inertial);
200
204
public
:
const
ignition::math::Pose3d &RawPose()
const
;
205
209
public
:
void
SetRawPose(
const
ignition::math::Pose3d &_pose);
210
215
public
:
const
std::string &PoseRelativeTo()
const
;
216
221
public
:
void
SetPoseRelativeTo(
const
std::string &_frame);
222
227
public
:
sdf::ElementPtr
Element
()
const
;
228
232
public
:
sdf::SemanticPose
SemanticPose
()
const
;
233
237
private
:
void
SetPoseRelativeToGraph(
238
sdf::ScopedGraph<PoseRelativeToGraph>
_graph);
239
241
friend
class
Model
;
242
247
public
:
bool
EnableWind()
const
;
248
253
public
:
void
SetEnableWind(
bool
_enableWind);
254
259
public
:
bool
AddCollision(
const
Collision
&_collision);
260
265
public
:
bool
AddVisual(
const
Visual
&_visual);
266
271
public
:
bool
AddLight(
const
Light
&_light);
272
277
public
:
bool
AddSensor(
const
Sensor
&_sensor);
278
280
public
:
void
ClearCollisions();
281
283
public
:
void
ClearVisuals();
284
286
public
:
void
ClearLights();
287
289
public
:
void
ClearSensors();
290
292
IGN_UTILS_IMPL_PTR(dataPtr)
293
};
294
}
295
}
296
#endif
sdf::v12::Visual
Definition:
Visual.hh:46
sdf::v12::ScopedGraph
Definition:
Collision.hh:39
sdf
namespace for Simulation Description Format parser
Definition:
Actor.hh:33
sdf::v12::Light
Provides a description of a light source.
Definition:
Light.hh:63
sdf::v12::Model
Definition:
Model.hh:48
sdf::v12::Errors
std::vector< Error > Errors
A vector of Error.
Definition:
Types.hh:106
sdf::v12::Collision
A collision element descibes the collision properties associated with a link.
Definition:
Collision.hh:45
Types.hh
SemanticPose.hh
SDFORMAT_VISIBLE
#define SDFORMAT_VISIBLE
Definition:
system_util.hh:41
sdf::v12::ParticleEmitter
A description of a particle emitter, which can be attached to a link.
Definition:
ParticleEmitter.hh:60
sdf::v12::SemanticPose
SemanticPose is a data structure that can be used by different DOM objects to resolve poses on a Pose...
Definition:
SemanticPose.hh:54
sdf::v12::Element
SDF Element class.
Definition:
Element.hh:73
system_util.hh
sdf::v12::ElementPtr
std::shared_ptr< Element > ElementPtr
Definition:
Element.hh:54
sdf::v12::Sensor
Information about an SDF sensor.
Definition:
Sensor.hh:135
sdf::v12::Link
Definition:
Link.hh:45
Element.hh