CARLA
 
载入中...
搜索中...
未找到
LibCarla/source/carla/rpc/VehicleAckermannControl.h
浏览该文件的文档.
1// Copyright (c) 2021 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
13#endif // LIBCARLA_INCLUDED_FROM_UE4
14
15namespace carla {
16namespace rpc {
17
19 public:
20
22
24 float in_steer,
25 float in_steer_speed,
26 float in_speed,
27 float in_acceleration,
28 float in_jerk)
29 : steer(in_steer),
30 steer_speed(in_steer_speed),
31 speed(in_speed),
32 acceleration(in_acceleration),
33 jerk(in_jerk) {}
34
35 float steer = 0.0f;
36 float steer_speed = 0.0f;
37 float speed = 0.0f;
38 float acceleration = 0.0f;
39 float jerk = 0.0f;
40
41#ifdef LIBCARLA_INCLUDED_FROM_UE4
42
44 : steer(Control.Steer),
45 steer_speed(Control.SteerSpeed),
46 speed(Control.Speed),
47 acceleration(Control.Acceleration),
48 jerk(Control.Jerk) {}
49
50 operator FVehicleAckermannControl() const {
52 Control.Steer = steer;
53 Control.SteerSpeed = steer_speed;
54 Control.Speed = speed;
55 Control.Acceleration = acceleration;
56 Control.Jerk = jerk;
57 return Control;
58 }
59
60#endif // LIBCARLA_INCLUDED_FROM_UE4
61
62 bool operator!=(const VehicleAckermannControl &rhs) const {
63 return
64 steer != rhs.steer ||
65 steer_speed != rhs.steer_speed ||
66 speed != rhs.speed ||
68 jerk != rhs.jerk;
69 }
70
71 bool operator==(const VehicleAckermannControl &rhs) const {
72 return !(*this != rhs);
73 }
74
76 steer,
78 speed,
80 jerk);
81 };
82
83} // namespace rpc
84} // namespace carla
bool operator==(const VehicleAckermannControl &rhs) const
VehicleAckermannControl(float in_steer, float in_steer_speed, float in_speed, float in_acceleration, float in_jerk)
bool operator!=(const VehicleAckermannControl &rhs) const
MSGPACK_DEFINE_ARRAY(steer, steer_speed, speed, acceleration, jerk)
This file contains definitions of common data structures used in traffic manager.
Definition Carla.cpp:133