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
15 // 为车轮对象定义特定物理参数的类
17 public:
18
20
22 float in_tire_friction, // 表示车轮摩擦力的标量值
23 float in_damping_rate, // 车轮的阻尼率
24 float in_max_steer_angle, // 车轮可以转向的最大角度
25 float in_radius, // 轮子的半径(单位:厘米)
26 float in_max_brake_torque, // 最大制动扭矩
27 float in_max_handbrake_torque, // 最大手刹扭矩
28 float in_lat_stiff_max_load, // 最大标准化轮胎负载,在该负载下,无论向轮胎施加多少额外负载,轮胎都不再提供侧向刚度。每辆车都有一个自定义值。
29 float in_lat_stiff_value, // 每单位横向滑移的最大刚度。每辆车都有一个自定义值。
30 float in_long_stiff_value, // 每单位重力加速度的轮胎纵向刚度。每辆车都有一个自定义值。
31 geom::Vector3D in_position)
32 : tire_friction(in_tire_friction),
33 damping_rate(in_damping_rate),
34 max_steer_angle(in_max_steer_angle),
35 radius(in_radius),
36 max_brake_torque(in_max_brake_torque),
37 max_handbrake_torque(in_max_handbrake_torque),
38 lat_stiff_max_load(in_lat_stiff_max_load),
39 lat_stiff_value(in_lat_stiff_value),
40 long_stiff_value(in_long_stiff_value),
41 position(in_position) {}
42
43 float tire_friction = 2.0f;
44 float damping_rate = 0.25f;
45 float max_steer_angle = 70.0f;
46 float radius = 30.0f;
47 float max_brake_torque = 1500.0f;
48 float max_handbrake_torque = 3000.0f;
49 float lat_stiff_max_load = 2.0f;
50 float lat_stiff_value = 17.0f;
51 float long_stiff_value = 1000.0f;
52 geom::Vector3D position = {0.0f, 0.0f, 0.0f};
53
67
68 bool operator==(const WheelPhysicsControl &rhs) const {
69 return !(*this != rhs);
70 }
71#ifdef LIBCARLA_INCLUDED_FROM_UE4
72
74 : tire_friction(Wheel.TireFriction),
75 damping_rate(Wheel.DampingRate),
76 max_steer_angle(Wheel.MaxSteerAngle),
77 radius(Wheel.Radius),
78 max_brake_torque(Wheel.MaxBrakeTorque),
79 max_handbrake_torque(Wheel.MaxHandBrakeTorque),
80 lat_stiff_max_load(Wheel.LatStiffMaxLoad),
81 lat_stiff_value(Wheel.LatStiffValue),
82 long_stiff_value(Wheel.LongStiffValue),
83 position(Wheel.Position.X, Wheel.Position.Y, Wheel.Position.Z) {}
84
99#endif
100
101 MSGPACK_DEFINE_ARRAY(tire_friction,
104 radius,
110 position)
111 };
112
113}
114}
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)
CARLA模拟器的主命名空间。
Definition Carla.cpp:139