CARLA
 
载入中...
搜索中...
未找到
LibCarla/source/carla/rpc/WheelPhysicsControl.h
浏览该文件的文档.
1// Copyright (c) 2019 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
10#include "carla/MsgPack.h"
11
12namespace carla {
13namespace rpc {
14
16 public:
17
19
21 float in_tire_friction,
22 float in_damping_rate,
23 float in_max_steer_angle,
24 float in_radius,
25 float in_max_brake_torque,
26 float in_max_handbrake_torque,
27 float in_lat_stiff_max_load,
28 float in_lat_stiff_value,
29 float in_long_stiff_value,
30 geom::Vector3D in_position)
31 : tire_friction(in_tire_friction),
32 damping_rate(in_damping_rate),
33 max_steer_angle(in_max_steer_angle),
34 radius(in_radius),
35 max_brake_torque(in_max_brake_torque),
36 max_handbrake_torque(in_max_handbrake_torque),
37 lat_stiff_max_load(in_lat_stiff_max_load),
38 lat_stiff_value(in_lat_stiff_value),
39 long_stiff_value(in_long_stiff_value),
40 position(in_position) {}
41
42 float tire_friction = 2.0f;
43 float damping_rate = 0.25f;
44 float max_steer_angle = 70.0f;
45 float radius = 30.0f;
46 float max_brake_torque = 1500.0f;
47 float max_handbrake_torque = 3000.0f;
48 float lat_stiff_max_load = 2.0f;
49 float lat_stiff_value = 17.0f;
50 float long_stiff_value = 1000.0f;
51 geom::Vector3D position = {0.0f, 0.0f, 0.0f};
52
66
67 bool operator==(const WheelPhysicsControl &rhs) const {
68 return !(*this != rhs);
69 }
70#ifdef LIBCARLA_INCLUDED_FROM_UE4
71
73 : tire_friction(Wheel.TireFriction),
74 damping_rate(Wheel.DampingRate),
75 max_steer_angle(Wheel.MaxSteerAngle),
76 radius(Wheel.Radius),
77 max_brake_torque(Wheel.MaxBrakeTorque),
78 max_handbrake_torque(Wheel.MaxHandBrakeTorque),
79 lat_stiff_max_load(Wheel.LatStiffMaxLoad),
80 lat_stiff_value(Wheel.LatStiffValue),
81 long_stiff_value(Wheel.LongStiffValue),
82 position(Wheel.Position.X, Wheel.Position.Y, Wheel.Position.Z) {}
83
98#endif
99
100 MSGPACK_DEFINE_ARRAY(tire_friction,
103 radius,
109 position)
110 };
111
112}
113}
bool operator!=(const WheelPhysicsControl &rhs) const
bool operator==(const WheelPhysicsControl &rhs) const
WheelPhysicsControl(float in_tire_friction, float in_damping_rate, float in_max_steer_angle, float in_radius, float in_max_brake_torque, float in_max_handbrake_torque, float in_lat_stiff_max_load, float in_lat_stiff_value, float in_long_stiff_value, geom::Vector3D in_position)
This file contains definitions of common data structures used in traffic manager.
Definition Carla.cpp:133