CARLA
载入中...
搜索中...
未找到
LibCarla
source
carla
rpc
LibCarla/source/carla/rpc/WalkerControl.h
浏览该文件的文档.
1
// Copyright (c) 2017 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
9
#include "
carla/MsgPack.h
"
10
11
#ifdef LIBCARLA_INCLUDED_FROM_UE4
12
#include <
compiler/enable-ue4-macros.h
>
13
#include "
Carla/Walker/WalkerControl.h
"
14
#include <
compiler/disable-ue4-macros.h
>
15
#endif
// LIBCARLA_INCLUDED_FROM_UE4
16
17
namespace
carla
{
18
namespace
rpc {
19
20
class
WalkerControl
{
21
public
:
22
23
WalkerControl
() =
default
;
24
25
WalkerControl
(
26
geom::Vector3D
in_direction,
27
float
in_speed,
28
bool
in_jump)
29
:
direction
(in_direction),
30
speed
(in_speed),
31
jump
(in_jump) {}
32
33
geom::Vector3D
direction
= {1.0f, 0.0f, 0.0f};
34
35
float
speed
= 0.0f;
36
37
bool
jump
=
false
;
38
39
#ifdef LIBCARLA_INCLUDED_FROM_UE4
40
41
WalkerControl
(
const
FWalkerControl
&Control)
42
:
direction
(Control.Direction.X, Control.Direction.Y, Control.Direction.Z),
43
speed
(1e-2f * Control.Speed),
44
jump
(Control.Jump) {}
45
46
operator
FWalkerControl
()
const
{
47
FWalkerControl
Control;
48
Control.
Direction
= {
direction
.
x
,
direction
.
y
,
direction
.
z
};
49
Control.
Speed
= 1e2f *
speed
;
50
Control.
Jump
=
jump
;
51
return
Control;
52
}
53
54
#endif
// LIBCARLA_INCLUDED_FROM_UE4
55
56
bool
operator!=
(
const
WalkerControl
&rhs)
const
{
57
return
direction
!= rhs.
direction
||
speed
!= rhs.
speed
||
jump
!= rhs.
jump
;
58
}
59
60
bool
operator==
(
const
WalkerControl
&rhs)
const
{
61
return
!(*
this
!= rhs);
62
}
63
64
MSGPACK_DEFINE_ARRAY
(
direction
,
speed
,
jump
);
65
};
66
67
}
// namespace rpc
68
}
// namespace carla
MsgPack.h
WalkerControl.h
carla::geom::Vector3D
Definition
geom/Vector3D.h:17
carla::geom::Vector3D::y
float y
Definition
geom/Vector3D.h:26
carla::geom::Vector3D::x
float x
Definition
geom/Vector3D.h:24
carla::geom::Vector3D::z
float z
Definition
geom/Vector3D.h:28
carla::rpc::WalkerControl
Definition
LibCarla/source/carla/rpc/WalkerControl.h:20
carla::rpc::WalkerControl::operator!=
bool operator!=(const WalkerControl &rhs) const
Definition
LibCarla/source/carla/rpc/WalkerControl.h:56
carla::rpc::WalkerControl::WalkerControl
WalkerControl(geom::Vector3D in_direction, float in_speed, bool in_jump)
Definition
LibCarla/source/carla/rpc/WalkerControl.h:25
carla::rpc::WalkerControl::direction
geom::Vector3D direction
Definition
LibCarla/source/carla/rpc/WalkerControl.h:33
carla::rpc::WalkerControl::operator==
bool operator==(const WalkerControl &rhs) const
Definition
LibCarla/source/carla/rpc/WalkerControl.h:60
carla::rpc::WalkerControl::WalkerControl
WalkerControl(const FWalkerControl &Control)
Definition
LibCarla/source/carla/rpc/WalkerControl.h:41
carla::rpc::WalkerControl::WalkerControl
WalkerControl()=default
carla::rpc::WalkerControl::speed
float speed
Definition
LibCarla/source/carla/rpc/WalkerControl.h:35
carla::rpc::WalkerControl::MSGPACK_DEFINE_ARRAY
MSGPACK_DEFINE_ARRAY(direction, speed, jump)
carla::rpc::WalkerControl::jump
bool jump
Definition
LibCarla/source/carla/rpc/WalkerControl.h:37
disable-ue4-macros.h
enable-ue4-macros.h
carla
This file contains definitions of common data structures used in traffic manager.
Definition
Carla.cpp:133
FWalkerControl
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Walker/WalkerControl.h:13
FWalkerControl::Speed
float Speed
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Walker/WalkerControl.h:20
FWalkerControl::Direction
FVector Direction
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Walker/WalkerControl.h:17
FWalkerControl::Jump
bool Jump
Definition
Unreal/CarlaUE4/Plugins/Carla/Source/Carla/Walker/WalkerControl.h:23
制作者
1.10.0