Gazebo Sensors
API Reference
9.0.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-sensors
include
gz
sensors
DopplerVelocityLog.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_SENSORS_DOPPLERVELOCITYLOG_HH_
19
#define GZ_SENSORS_DOPPLERVELOCITYLOG_HH_
20
21
#include <chrono>
22
#include <memory>
23
#include <unordered_map>
24
#include <vector>
25
26
#include <gz/math/Pose3.hh>
27
#include <gz/math/Vector3.hh>
28
#include <
gz/sensors/EnvironmentalData.hh
>
29
#include <
gz/sensors/RenderingSensor.hh
>
30
31
#include "gz/sensors/dvl/Export.hh"
32
33
namespace
gz
34
{
35
namespace
sensors
36
{
40
struct
EntityKinematicState
41
{
42
gz::math::Pose3d
pose
;
43
gz::math::Vector3d
linearVelocity
;
44
gz::math::Vector3d
angularVelocity
;
45
};
46
48
using
WorldKinematicState
=
std::unordered_map
<
49
uint64_t,
EntityKinematicState
>;
50
52
struct
WorldState
53
{
54
WorldKinematicState
kinematics
;
55
gz::math::SphericalCoordinates
origin
;
56
};
57
198
class
GZ_SENSORS_DVL_VISIBLE
DopplerVelocityLog
199
:
public
gz::sensors::RenderingSensor
200
{
201
public
:
DopplerVelocityLog
();
202
203
public
:
~DopplerVelocityLog
();
204
206
public
:
virtual
bool
Load
(
const
sdf::Sensor &_sdf)
override
;
207
209
public
:
virtual
bool
Load
(sdf::ElementPtr _sdf)
override
;
210
212
public
:
virtual
bool
Update
(
213
const
std::chrono::steady_clock::duration &_now)
override
;
214
216
public
:
virtual
void
PostUpdate
(
217
const
std::chrono::steady_clock::duration &_now);
218
220
public
:
void
SetScene
(gz::rendering::ScenePtr _scene)
override
;
221
223
public
:
void
SetEntity
(uint64_t entity);
224
226
public
:
void
SetWorldState
(
const
WorldState
&_state);
227
229
public
:
void
SetEnvironmentalData
(
const
EnvironmentalData
&_data);
230
232
public
:
virtual
bool
HasConnections
()
const override
;
233
237
public
:
std::vector<gz::rendering::SensorPtr>
RenderingSensors
()
const
;
238
239
private
:
class
Implementation;
240
241
private
:
std::unique_ptr<Implementation>
dataPtr;
242
};
243
244
}
// namespace sensors
245
}
// namespace gz
246
247
#endif
// GZ_SENSORS_DOPPLERVELOCITYLOG_HH_