CARLA
 
载入中...
搜索中...
未找到
IMUMeasurement.h
浏览该文件的文档.
1// Copyright (c) 2019 Computer Vision Center (CVC) at the Universitat Autonoma
2// de Barcelona (UAB).
3//
4// This work is licensed under the terms of the MIT license.
5// For a copy, see <https://opensource.org/licenses/MIT>.
6
7#pragma once
8
12
13namespace carla {
14namespace sensor {
15namespace data {
16
17 class IMUMeasurement : public SensorData {
18 protected:
19
21
23
24 friend Serializer;
25
26 explicit IMUMeasurement(const RawData &data)
27 : Super(data),
28 _accelerometer(Serializer::DeserializeRawData(data).accelerometer),
29 _gyroscope(Serializer::DeserializeRawData(data).gyroscope),
30 _compass(Serializer::DeserializeRawData(data).compass) {}
31
32 public:
33
37
39 return _gyroscope;
40 }
41
42 float GetCompass() const {
43 return _compass;
44 }
45
46 private:
47
50 float _compass;
51
52 };
53
54} // namespace data
55} // namespace sensor
56} // namespace carla
Wrapper around the raw data generated by a sensor plus some useful meta-information.
Definition RawData.h:21
Base class for all the objects containing data generated by a sensor.
Definition SensorData.h:22
SensorData(size_t frame, double timestamp, const rpc::Transform &sensor_transform)
Definition SensorData.h:25
geom::Vector3D GetGyroscope() const
geom::Vector3D GetAccelerometer() const
This file contains definitions of common data structures used in traffic manager.
Definition Carla.cpp:133