CARLA
 
载入中...
搜索中...
未找到
CarlaIMUPublisher.h
浏览该文件的文档.
1// Copyright (c) 2022 Computer Vision Center (CVC) at the Universitat Autonoma de Barcelona (UAB).
2// This work is licensed under the terms of the MIT license.
3// For a copy, see <https://opensource.org/licenses/MIT>.
4
5// ָʾͷļֻһ
6#pragma once
7// GLIBCXX ʹ C++11 ABI ĺ
8#define _GLIBCXX_USE_CXX11_ABI 0
9
10// ڴ
11#include <memory>
12
13// CarlaPublisher Ķ
14#include "CarlaPublisher.h"
15
16namespace carla {
17namespace ros2 {
18
19 // ǰṹ CarlaIMUPublisherImpl
20 struct CarlaIMUPublisherImpl;
21
22 // CarlaIMUPublisher ̳࣬ CarlaPublisher
24 public:
25 // 캯 ROS ƺ͸Ϊ
26 CarlaIMUPublisher(const char* ros_name = "", const char* parent = "");
27 //
29 // 캯
31 // ֵ
33 // ƶ캯
35 // ƶֵ
37
38 // ʼزֵָʾǷɹ
39 bool Init();
40 // ݵĺزֵָʾǷɹ
41 bool Publish();
42 // IMU ݵĺʱʹ
43 void SetData(int32_t seconds, uint32_t nanoseconds, float* accelerometer, float* gyroscope, float compass);
44 // ǻ type() ش
45 const char* type() const override { return "inertial measurement unit"; }
46
47 private:
48 // ʹָ CarlaIMUPublisherImpl ʵ
49 std::shared_ptr<CarlaIMUPublisherImpl> _impl;
50 };
51}// namespace ros2
52}// namespace carla
CarlaIMUPublisher(const char *ros_name="", const char *parent="")
std::shared_ptr< CarlaIMUPublisherImpl > _impl
void SetData(int32_t seconds, uint32_t nanoseconds, float *accelerometer, float *gyroscope, float compass)
CarlaIMUPublisher & operator=(const CarlaIMUPublisher &)
const char * type() const override
const std::string & parent() const
CARLA模拟器的主命名空间。
Definition Carla.cpp:139