Gazebo Sim
API Reference
7.9.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
components
Environment.hh
Go to the documentation of this file.
1
/*
2
* Copyright (C) 2022 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 GZ_SIM_ENVIRONMENT_HH_
19
#define GZ_SIM_ENVIRONMENT_HH_
20
21
#include <memory>
22
#include <string>
23
24
#include <
gz/common/DataFrame.hh
>
25
#include <gz/math/SphericalCoordinates.hh>
26
#include <
gz/math/TimeVaryingVolumetricGrid.hh
>
27
28
#include <
gz/sim/components/Factory.hh
>
29
#include <
gz/sim/components/Component.hh
>
30
#include <gz/sim/Export.hh>
31
32
namespace
gz
33
{
34
namespace
sim
35
{
36
// Inline bracket to help doxygen filtering.
37
inline
namespace
GZ_SIM_VERSION_NAMESPACE {
38
namespace
components
39
{
43
struct
GZ_SIM_VISIBLE
EnvironmentalData
44
{
45
using
T
=
math::InMemoryTimeVaryingVolumetricGrid<double>
;
46
using
FrameT
=
common::DataFrame<std::string, T>
;
47
using
ReferenceT
=
math::SphericalCoordinates::CoordinateType
;
48
50
enum class
ReferenceUnits
{
51
RADIANS = 0,
52
DEGREES
53
};
54
61
static
std::shared_ptr<EnvironmentalData>
62
MakeShared(FrameT _frame, ReferenceT _reference,
63
ReferenceUnits _units = ReferenceUnits::RADIANS,
64
bool
_ignoreTimeStep =
false
);
65
67
FrameT
frame
;
68
70
ReferenceT
reference
;
71
73
ReferenceUnits
units
;
74
76
bool
staticTime
;
77
};
78
81
using
Environment
=
82
Component<std::shared_ptr<EnvironmentalData>
,
class
EnvironmentalDataTag>;
83
84
GZ_SIM_REGISTER_COMPONENT
(
85
"gz_sim_components.Environment"
,
Environment
)
86
}
87
}
88
}
89
}
90
91
#endif