CARLA
 
载入中...
搜索中...
未找到
GnssSerializer.cpp
浏览该文件的文档.
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#include "carla/sensor/s11n/GnssSerializer.h" // 包含 GnssSerializer 的声明
8
9#include "carla/sensor/data/GnssMeasurement.h" // 包含 GnssMeasurement 类的定义
10
11namespace carla { // Carla 项目顶级命名空间
12namespace sensor { // 包含与传感器相关的所有功能
13namespace s11n { // 提供序列化和反序列化功能的命名空间
14
15 /// @brief 从原始 GNSS 数据反序列化为 GnssMeasurement 对象
16 /// @param data GNSS 原始数据,表示为 RawData 对象
17 /// @return 返回一个智能指针,指向反序列化后的 GnssMeasurement 对象
19 // 将传入的 RawData 数据封装为 GnssMeasurement 对象,并使用 SharedPtr 进行管理
20 return SharedPtr<SensorData>(new data::GnssMeasurement(std::move(data)));
21 }
22
23} // namespace s11n
24} // namespace sensor
25} // namespace carla
包装一个传感器生成的原始数据以及一些有用的元信息。
Definition RawData.h:20
A change of GNSS Measurement.
static SharedPtr< SensorData > Deserialize(RawData &&data)
从原始 GNSS 数据反序列化为 GnssMeasurement 对象
CARLA模拟器的主命名空间。
Definition Carla.cpp:139
boost::shared_ptr< T > SharedPtr
使用这个SharedPtr(boost::shared_ptr)以保持与boost::python的兼容性, 但未来如果可能的话,我们希望能为std::shared_ptr制作一个Python适配器。
Definition Memory.h:19