CARLA
载入中...
搜索中...
未找到
LibCarla
source
carla
ros2
subscribers
CarlaEgoVehicleControlSubscriber.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
#pragma once
6
#define _GLIBCXX_USE_CXX11_ABI 0
7
8
#include <memory>
9
#include <vector>
10
11
#include "
CarlaSubscriber.h
"
12
#include "
carla/ros2/ROS2CallbackData.h
"
13
14
namespace
carla
{
15
namespace
ros2 {
16
17
struct
CarlaEgoVehicleControlSubscriberImpl;
18
19
class
CarlaEgoVehicleControlSubscriber
:
public
CarlaSubscriber
{
20
public
:
21
CarlaEgoVehicleControlSubscriber
(
void
* vehicle,
const
char
* ros_name =
""
,
const
char
*
parent
=
""
);
22
~CarlaEgoVehicleControlSubscriber
();
23
CarlaEgoVehicleControlSubscriber
(
const
CarlaEgoVehicleControlSubscriber
&);
24
CarlaEgoVehicleControlSubscriber
&
operator=
(
const
CarlaEgoVehicleControlSubscriber
&);
25
CarlaEgoVehicleControlSubscriber
(
CarlaEgoVehicleControlSubscriber
&&);
26
CarlaEgoVehicleControlSubscriber
&
operator=
(
CarlaEgoVehicleControlSubscriber
&&);
27
28
bool
HasNewMessage
();
29
bool
IsAlive
();
30
VehicleControl
GetMessage
();
31
void
*
GetVehicle
();
32
33
bool
Init
();
34
bool
Read
();
35
const
char
*
type
()
const override
{
return
"Ego vehicle control"
; }
36
37
//Do not call, for internal use only
38
void
ForwardMessage
(
VehicleControl
control);
39
void
DestroySubscriber
();
40
private
:
41
void
SetData
(int32_t seconds, uint32_t nanoseconds, uint32_t actor_id, std::vector<float>&& data);
42
43
private
:
44
std::shared_ptr<CarlaEgoVehicleControlSubscriberImpl>
_impl
;
45
};
46
}
47
}
CarlaSubscriber.h
ROS2CallbackData.h
carla::ros2::CarlaEgoVehicleControlSubscriber
Definition
CarlaEgoVehicleControlSubscriber.h:19
carla::ros2::CarlaEgoVehicleControlSubscriber::SetData
void SetData(int32_t seconds, uint32_t nanoseconds, uint32_t actor_id, std::vector< float > &&data)
carla::ros2::CarlaEgoVehicleControlSubscriber::type
const char * type() const override
Definition
CarlaEgoVehicleControlSubscriber.h:35
carla::ros2::CarlaEgoVehicleControlSubscriber::GetVehicle
void * GetVehicle()
Definition
CarlaEgoVehicleControlSubscriber.cpp:178
carla::ros2::CarlaEgoVehicleControlSubscriber::IsAlive
bool IsAlive()
Definition
CarlaEgoVehicleControlSubscriber.cpp:170
carla::ros2::CarlaEgoVehicleControlSubscriber::operator=
CarlaEgoVehicleControlSubscriber & operator=(const CarlaEgoVehicleControlSubscriber &)
Definition
CarlaEgoVehicleControlSubscriber.cpp:215
carla::ros2::CarlaEgoVehicleControlSubscriber::Read
bool Read()
Definition
CarlaEgoVehicleControlSubscriber.cpp:94
carla::ros2::CarlaEgoVehicleControlSubscriber::GetMessage
VehicleControl GetMessage()
Definition
CarlaEgoVehicleControlSubscriber.cpp:165
carla::ros2::CarlaEgoVehicleControlSubscriber::CarlaEgoVehicleControlSubscriber
CarlaEgoVehicleControlSubscriber(void *vehicle, const char *ros_name="", const char *parent="")
Definition
CarlaEgoVehicleControlSubscriber.cpp:182
carla::ros2::CarlaEgoVehicleControlSubscriber::~CarlaEgoVehicleControlSubscriber
~CarlaEgoVehicleControlSubscriber()
Definition
CarlaEgoVehicleControlSubscriber.cpp:190
carla::ros2::CarlaEgoVehicleControlSubscriber::_impl
std::shared_ptr< CarlaEgoVehicleControlSubscriberImpl > _impl
Definition
CarlaEgoVehicleControlSubscriber.h:44
carla::ros2::CarlaEgoVehicleControlSubscriber::Init
bool Init()
Definition
CarlaEgoVehicleControlSubscriber.cpp:47
carla::ros2::CarlaEgoVehicleControlSubscriber::HasNewMessage
bool HasNewMessage()
Definition
CarlaEgoVehicleControlSubscriber.cpp:174
carla::ros2::CarlaEgoVehicleControlSubscriber::ForwardMessage
void ForwardMessage(VehicleControl control)
Definition
CarlaEgoVehicleControlSubscriber.cpp:156
carla::ros2::CarlaEgoVehicleControlSubscriber::DestroySubscriber
void DestroySubscriber()
Definition
CarlaEgoVehicleControlSubscriber.cpp:161
carla::ros2::CarlaSubscriber
Definition
CarlaSubscriber.h:13
carla::ros2::CarlaSubscriber::parent
const std::string & parent() const
Definition
CarlaSubscriber.h:17
carla
This file contains definitions of common data structures used in traffic manager.
Definition
Carla.cpp:133
carla::ros2::VehicleControl
Definition
ROS2CallbackData.h:23
制作者
1.10.0