carla/PythonAPI/docs/control.yml

344 lines
10 KiB
YAML
Raw Normal View History

2019-05-03 18:18:02 +08:00
---
- module_name: carla
2019-05-03 18:18:02 +08:00
doc: >
# - CLASSES ------------------------------
classes:
- class_name: VehicleControl
2019-06-06 19:13:47 +08:00
# - DESCRIPTION ------------------------
doc: >
VehicleControl is used for controlling the basic movement of a vehicle.
# - PROPERTIES -------------------------
instance_variables:
- var_name: throttle
2019-07-01 23:46:27 +08:00
type: float
doc: >
Scalar value to control the vehicle throttle.
# --------------------------------------
- var_name: steer
2019-07-01 23:46:27 +08:00
type: float
doc: >
Scalar value to control the vehicle steering.
# --------------------------------------
- var_name: brake
2019-07-01 23:46:27 +08:00
type: float
doc: >
Scalar value to control the vehicle brake.
# --------------------------------------
- var_name: hand_brake
2019-07-01 23:46:27 +08:00
type: bool
doc: >
If true, hand brake will be used.
# --------------------------------------
- var_name: reverse
2019-07-01 23:46:27 +08:00
type: bool
doc: >
If true, vehicle will move reverse.
# --------------------------------------
- var_name: manual_gear_shift
2019-07-01 23:46:27 +08:00
type: bool
doc: >
If true, the vehicle will be controlled by changing gears manually.
# --------------------------------------
- var_name: gear
2019-07-01 23:46:27 +08:00
type: int
doc: >
Controls the gear value of the vehicle.
# - METHODS ----------------------------
methods:
- def_name: __init__
params:
- param_name: throttle
type: float
default: 0.0
- param_name: steer
type: float
default: 0.0
- param_name: brake
type: float
default: 0.0
- param_name: hand_brake
type: bool
default: True
- param_name: reverse
type: bool
default: True
- param_name: manual_gear_shift
type: bool
default: True
- param_name: gear
type: int
default: 0
doc: >
VehicleControl constructor
# --------------------------------------
- def_name: __eq__
params:
- param_name: other
2019-07-01 23:46:27 +08:00
type: carla.VehicleControl
- def_name: __ne__
params:
- param_name: other
2019-07-01 23:46:27 +08:00
type: carla.VehicleControl
doc: >
2019-06-07 20:53:16 +08:00
# --------------------------------------
- def_name: __str__
doc: >
# --------------------------------------
- class_name: WalkerControl
doc: >
WalkerControl is used for controlling the basic movement of a walker.
# - PROPERTIES -------------------------
instance_variables:
- var_name: direction
type: carla.Vector3D
doc: >
2019-06-06 19:13:47 +08:00
Vector that control the direction of the walker.
# --------------------------------------
- var_name: speed
type: float
doc: >
Scalar value to control the walker speed.
# --------------------------------------
- var_name: jump
type: bool
doc: >
If true, the walker will perform a jump.
# - METHODS ----------------------------
methods:
- def_name: __init__
params:
- param_name: direction
default: [1.0, 0.0, 0.0]
- param_name: speed
default: 0.0
- param_name: jump
default: False
doc: >
VehicleControl constructor
# --------------------------------------
- def_name: __eq__
params:
- param_name: other
2019-07-01 23:46:27 +08:00
type: carla.WalkerControl
# --------------------------------------
- def_name: __ne__
params:
- param_name: other
2019-07-01 23:46:27 +08:00
type: carla.WalkerControl
# --------------------------------------
- def_name: __str__
doc: >
2019-07-01 23:46:27 +08:00
# --------------------------------------
- class_name: WalkerBoneControl
# - DESCRIPTION ------------------------
doc: >
Class used for controlling the skeleton of a walker.
See [walker bone control](walker_bone_control.md)
2019-07-01 23:46:27 +08:00
# - PROPERTIES -------------------------
instance_variables:
- var_name: bone_transforms
type: list([name,transform])
doc: >
# - METHODS ----------------------------
methods:
- def_name: __init__
params:
- param_name: 'list(name,transform)'
2019-07-01 23:46:27 +08:00
type: tuple
doc: >
# --------------------------------------
- def_name: __str__
doc: >
2019-06-07 20:53:16 +08:00
# --------------------------------------
2019-04-24 22:13:46 +08:00
- class_name: VehiclePhysicsControl
2019-05-03 18:18:02 +08:00
doc: >
2019-04-24 22:13:46 +08:00
VehiclePhysicsControl is used for controlling the physics parameters of a vehicle.
2019-05-03 18:18:02 +08:00
# - PROPERTIES -------------------------
instance_variables:
2019-04-24 22:13:46 +08:00
- var_name: torque_curve
2019-06-07 20:53:16 +08:00
type: list(carla.Vector2D)
2019-05-03 18:18:02 +08:00
doc: >
2019-04-24 22:13:46 +08:00
Curve that indicates the torque measured in Nm for a specific RPM of the vehicle's engine.
# --------------------------------------
- var_name: max_rpm
2019-06-07 20:53:16 +08:00
type: float
2019-05-03 18:18:02 +08:00
doc: >
2019-04-24 22:13:46 +08:00
The maximum RPM of the vehicle's engine.
2019-05-03 18:18:02 +08:00
# --------------------------------------
2019-04-24 22:13:46 +08:00
- var_name: moi
2019-06-07 20:53:16 +08:00
type: float
2019-05-03 18:18:02 +08:00
doc: >
2019-04-24 22:13:46 +08:00
The moment of inertia of the vehicle's engine.
2019-05-03 18:18:02 +08:00
# --------------------------------------
2019-04-24 22:13:46 +08:00
- var_name: damping_rate_full_throttle
2019-06-07 20:53:16 +08:00
type: float
2019-05-03 18:18:02 +08:00
doc: >
2019-04-24 22:13:46 +08:00
Damping rate when the throttle is maximum.
2019-05-03 18:18:02 +08:00
# --------------------------------------
2019-04-24 22:13:46 +08:00
- var_name: damping_rate_zero_throttle_clutch_engaged
2019-06-07 20:53:16 +08:00
type: float
2019-05-03 18:18:02 +08:00
doc: >
2019-04-24 22:13:46 +08:00
Damping rate when the thottle is zero with clutch engaged.
# --------------------------------------
- var_name: damping_rate_zero_throttle_clutch_disengaged
2019-06-07 20:53:16 +08:00
type: float
2019-05-03 18:18:02 +08:00
doc: >
2019-04-24 22:13:46 +08:00
Damping rate when the throttle is zero with clutch disengaged.
# --------------------------------------
- var_name: use_gear_autobox
2019-06-07 20:53:16 +08:00
type: bool
2019-05-03 18:18:02 +08:00
doc: >
2019-04-24 22:13:46 +08:00
If true, the vehicle will have automatic transmission.
# --------------------------------------
- var_name: gear_switch_time
2019-06-07 20:53:16 +08:00
type: float
2019-05-03 18:18:02 +08:00
doc: >
2019-04-24 22:13:46 +08:00
Switching time between gears.
2019-05-03 18:18:02 +08:00
# --------------------------------------
2019-04-24 22:13:46 +08:00
- var_name: clutch_strength
2019-06-07 20:53:16 +08:00
type: float
2019-05-03 18:18:02 +08:00
doc: >
2019-04-24 22:13:46 +08:00
The clutch strength of the vehicle. Measured in Kgm^2/s.
2019-05-03 18:18:02 +08:00
# --------------------------------------
2019-04-24 22:13:46 +08:00
- var_name: mass
2019-06-07 20:53:16 +08:00
type: float
2019-05-03 18:18:02 +08:00
doc: >
2019-04-24 22:13:46 +08:00
The mass of the vehicle measured in Kg.
2019-05-03 18:18:02 +08:00
# --------------------------------------
2019-04-24 22:13:46 +08:00
- var_name: drag_coefficient
2019-06-07 20:53:16 +08:00
type: float
2019-05-03 18:18:02 +08:00
doc: >
2019-04-24 22:13:46 +08:00
Drag coefficient of the vehicle's chassis.
# --------------------------------------
- var_name: center_of_mass
2019-06-07 20:53:16 +08:00
type: carla.Vector3D
2019-05-03 18:18:02 +08:00
doc: >
2019-04-24 22:13:46 +08:00
The center of mass of the vehicle.
# --------------------------------------
- var_name: steering_curve
2019-06-07 20:53:16 +08:00
type: list(carla.Vector2D)
2019-05-03 18:18:02 +08:00
doc: >
2019-04-24 22:13:46 +08:00
Curve that indicates the maximum steering for a specific forward speed.
# --------------------------------------
- var_name: wheels
2019-06-07 20:53:16 +08:00
type: list(carla.WheelPhysicsControl)
2019-05-03 18:18:02 +08:00
doc: >
List of carla.WheelPhysicsControl objects. This list should have 4 elements, where index 0 corresponds to front left wheel, index 1 corresponds to front right wheel, index 2 corresponds to back left wheel and index 3 corresponds to back right wheel. For 2 wheeled vehicles, set same values for both front and back wheels.
2019-04-24 22:13:46 +08:00
2019-05-03 18:18:02 +08:00
# - METHODS ----------------------------
methods:
- def_name: __init__
params:
2019-04-24 22:13:46 +08:00
- param_name: torque_curve
default: [[0.0,500.0], [5000.0, 500.0]]
- param_name: max_rpm
default: 5000.0
- param_name: moi
default: 1.0
- param_name: damping_rate_full_throttle
default: 0.15
- param_name: damping_rate_zero_throttle_clutch_engaged
default: 2.0
- param_name: damping_rate_zero_throttle_clutch_disengaged
default: 0.35
- param_name: use_gear_autobox
default: True
- param_name: gear_switch_time
default: 0.5
- param_name: clutch_strength
default: 10.0
- param_name: mass
default: 1000.0
- param_name: drag_coefficient
default: 0.3
- param_name: center_of_mass
default: [0.0, 0.0, 0.0]
- param_name: steering_curve
default: [0.0, 0.0, 0.0]
- param_name: wheels
2019-06-07 20:53:16 +08:00
default: list()
2019-04-24 22:13:46 +08:00
doc: >
VehiclePhysicsControl constructor
2019-05-03 18:18:02 +08:00
# --------------------------------------
- def_name: __eq__
params:
2019-04-24 22:13:46 +08:00
- param_name: other
2019-07-01 23:46:27 +08:00
type: carla.VehiclePhysicsControl
2019-06-07 20:53:16 +08:00
# --------------------------------------
2019-05-03 18:18:02 +08:00
- def_name: __ne__
params:
2019-04-24 22:13:46 +08:00
- param_name: other
2019-07-01 23:46:27 +08:00
type: carla.VehiclePhysicsControl
# --------------------------------------
- def_name: __str__
doc: >
2019-06-07 20:53:16 +08:00
# --------------------------------------
2019-05-03 18:18:02 +08:00
2019-04-24 22:13:46 +08:00
- class_name: WheelPhysicsControl
2019-05-03 18:18:02 +08:00
doc: >
2019-04-24 22:13:46 +08:00
WheelPhysicsControl is used for controlling the physics parameters of a vehicle's wheel.
2019-05-03 18:18:02 +08:00
# - PROPERTIES -------------------------
instance_variables:
2019-04-24 22:13:46 +08:00
- var_name: tire_friction
type: float
2019-05-03 18:18:02 +08:00
doc: >
2019-04-24 22:13:46 +08:00
Scalar value that indicates the friction of the wheel.
# --------------------------------------
- var_name: damping_rate
type: float
2019-05-03 18:18:02 +08:00
doc: >
2019-04-24 22:13:46 +08:00
The damping rate of the wheel.
# --------------------------------------
- var_name: max_steer_angle
type: float
2019-05-03 18:18:02 +08:00
doc: >
2019-04-24 22:13:46 +08:00
The maximum angle in degrees that the wheel can steer.
# --------------------------------------
2019-06-06 19:13:47 +08:00
- var_name: radius
type: float
2019-06-06 19:13:47 +08:00
doc: >
The radius of the wheel in centimeters.
# --------------------------------------
- var_name: position
2019-07-01 23:46:27 +08:00
type: carla.Vector3D
2019-05-03 18:18:02 +08:00
doc: >
2019-06-06 19:13:47 +08:00
World position of the wheel. Note that it is a read-only parameter.
2019-05-03 18:18:02 +08:00
# - METHODS ----------------------------
methods:
- def_name: __init__
params:
2019-04-24 22:13:46 +08:00
- param_name: tire_friction
default: 2.0
- param_name: damping_rate
default: 0.25
- param_name: max_steer_angle
default: 70.0
2019-06-06 19:13:47 +08:00
- param_name: radius
default: 30.0
2019-07-01 23:46:27 +08:00
- param_name: position
default: (0.0,0.0,0.0)
2019-04-24 22:13:46 +08:00
doc: >
WheelPhysicsControl constructor
2019-05-03 18:18:02 +08:00
# --------------------------------------
- def_name: __eq__
params:
2019-04-24 22:13:46 +08:00
- param_name: other
2019-07-01 23:46:27 +08:00
type: carla.WheelPhysicsControl
2019-06-06 19:13:47 +08:00
# --------------------------------------
2019-05-03 18:18:02 +08:00
- def_name: __ne__
params:
2019-04-24 22:13:46 +08:00
- param_name: other
2019-07-01 23:46:27 +08:00
type: carla.WheelPhysicsControl
# --------------------------------------
- def_name: __str__
doc: >
2019-06-07 20:53:16 +08:00
# --------------------------------------
2019-05-03 18:18:02 +08:00
...