CARLA
载入中...
搜索中...
未找到
LibCarla
source
carla
ros2
publishers
CarlaLidarPublisher.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
#include <vector>
13
14
// CarlaPublisher Ķ
15
#include "
CarlaPublisher.h
"
16
17
namespace
carla
{
18
namespace
ros2
{
19
20
// ǰṹ CarlaLidarPublisherImpl
21
struct
CarlaLidarPublisherImpl;
22
23
// CarlaLidarPublisher ̳࣬ CarlaPublisher
24
class
CarlaLidarPublisher
:
public
CarlaPublisher
{
25
public
:
26
// 캯 ROS ƺΪĬΪַ
27
CarlaLidarPublisher
(
const
char
* ros_name =
""
,
const
char
*
parent
=
""
);
28
//
29
~CarlaLidarPublisher
();
30
// 캯
31
CarlaLidarPublisher
(
const
CarlaLidarPublisher
&);
32
// ֵ
33
CarlaLidarPublisher
&
operator=
(
const
CarlaLidarPublisher
&);
34
// ƶ캯
35
CarlaLidarPublisher
(
CarlaLidarPublisher
&&);
36
// ƶֵ
37
CarlaLidarPublisher
&
operator=
(
CarlaLidarPublisher
&&);
38
39
// ʼزֵָʾǷɹ
40
bool
Init
();
41
// ݵĺزֵָʾǷɹ
42
bool
Publish
();
43
// ü״ݵĺʱ߶ȡȺָ
44
void
SetData
(int32_t seconds, uint32_t nanoseconds,
size_t
height,
size_t
width,
float
* data);
45
// ǻ type() ش
46
const
char
*
type
()
const override
{
return
"lidar"
; }
47
48
private
:
49
// ˽ݵĺʱ߶ȡȺ rvalue ÷ʽݵ
50
void
SetData
(int32_t seconds, uint32_t nanoseconds,
size_t
height,
size_t
width, std::vector<uint8_t>&& data);
51
52
private
:
53
// ʹָ CarlaLidarPublisherImpl ʵ
54
std::shared_ptr<CarlaLidarPublisherImpl>
_impl
;
55
};
56
}
// namespace ros2
57
}
// namespace carla
CarlaPublisher.h
carla::ros2::CarlaLidarPublisher
Definition
CarlaLidarPublisher.h:24
carla::ros2::CarlaLidarPublisher::~CarlaLidarPublisher
~CarlaLidarPublisher()
CarlaLidarPublisher 类的析构函数
Definition
CarlaLidarPublisher.cpp:315
carla::ros2::CarlaLidarPublisher::type
const char * type() const override
Definition
CarlaLidarPublisher.h:46
carla::ros2::CarlaLidarPublisher::Publish
bool Publish()
发布激光雷达数据
Definition
CarlaLidarPublisher.cpp:137
carla::ros2::CarlaLidarPublisher::SetData
void SetData(int32_t seconds, uint32_t nanoseconds, size_t height, size_t width, float *data)
设置激光雷达数据,处理并转换数据类型
Definition
CarlaLidarPublisher.cpp:231
carla::ros2::CarlaLidarPublisher::Init
bool Init()
初始化CarlaLidarPublisher。
Definition
CarlaLidarPublisher.cpp:80
carla::ros2::CarlaLidarPublisher::operator=
CarlaLidarPublisher & operator=(const CarlaLidarPublisher &)
拷贝赋值运算符重载
Definition
CarlaLidarPublisher.cpp:352
carla::ros2::CarlaLidarPublisher::_impl
std::shared_ptr< CarlaLidarPublisherImpl > _impl
Definition
CarlaLidarPublisher.h:54
carla::ros2::CarlaLidarPublisher::CarlaLidarPublisher
CarlaLidarPublisher(const char *ros_name="", const char *parent="")
CarlaLidarPublisher 类的构造函数
Definition
CarlaLidarPublisher.cpp:305
carla::ros2::CarlaPublisher
Definition
CarlaPublisher.h:13
carla::ros2::CarlaPublisher::parent
const std::string & parent() const
Definition
CarlaPublisher.h:17
carla
CARLA模拟器的主命名空间。
Definition
Carla.cpp:139
ros2
制作者
1.10.0