carla/PythonAPI/docs/control.yml

450 lines
13 KiB
YAML

---
- module_name: carla
doc: >
# - CLASSES ------------------------------
classes:
- class_name: VehicleControl
# - DESCRIPTION ------------------------
doc: >
VehicleControl is used for controlling the basic movement of a vehicle.
# - PROPERTIES -------------------------
instance_variables:
- var_name: throttle
type: float
doc: >
A scalar value to control the vehicle throttle [0.0, 1.0].
# --------------------------------------
- var_name: steer
type: float
doc: >
A scalar value to control the vehicle steering [-1.0, 1.0].
# --------------------------------------
- var_name: brake
type: float
doc: >
A scalar value to control the vehicle brake [0.0, 1.0].
# --------------------------------------
- var_name: hand_brake
type: bool
doc: >
If true, hand brake will be used.
# --------------------------------------
- var_name: reverse
type: bool
doc: >
If true, the vehicle will move reverse.
# --------------------------------------
- var_name: manual_gear_shift
type: bool
doc: >
If true, the vehicle will be controlled by changing gears manually.
# --------------------------------------
- var_name: gear
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
type: carla.VehicleControl
- def_name: __ne__
params:
- param_name: other
type: carla.VehicleControl
doc: >
# --------------------------------------
- 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: >
Vector that controls the direction of the walker.
# --------------------------------------
- var_name: speed
type: float
doc: >
A 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]
type: carla.Vector3D
- param_name: speed
default: 0.0
type: float
- param_name: jump
default: False
type: bool
doc: >
WalkerControl constructor
# --------------------------------------
- def_name: __eq__
params:
- param_name: other
type: carla.WalkerControl
# --------------------------------------
- def_name: __ne__
params:
- param_name: other
type: carla.WalkerControl
# --------------------------------------
- def_name: __str__
doc: >
# --------------------------------------
- class_name: WalkerBoneControl
# - DESCRIPTION ------------------------
doc: >
Class used for controlling the skeleton of a walker.
See [walker bone control](walker_bone_control.md)
# - PROPERTIES -------------------------
instance_variables:
- var_name: bone_transforms
type: list([name,transform])
doc: >
List of pairs where the first value is the bone name
and the second value is the bone transform.
# - METHODS ----------------------------
methods:
- def_name: __init__
params:
- param_name: 'list(name,transform)'
type: tuple
doc: >
# --------------------------------------
- def_name: __str__
doc: >
# --------------------------------------
- class_name: GearPhysicsControl
# - DESCRIPTION ------------------------
doc: >
Class that provides access to vehicle transmission details.
# - PROPERTIES -------------------------
instance_variables:
- var_name: ratio
type: float
doc: >
The transmission ratio of the gear.
# --------------------------------------
- var_name: down_ratio
type: float
doc: >
The level of RPM (in relation to MaxRPM) where the gear autobox initiates shifting down.
# --------------------------------------
- var_name: up_ratio
type: float
doc: >
The level of RPM (in relation to MaxRPM) where the gear autobox initiates shifting up.
# - METHODS ----------------------------
methods:
- def_name: __init__
params:
- param_name: ratio
type: float
default: 1.0
- param_name: down_ratio
type: float
default: 0.5
- param_name: up_ratio
type: float
default: 0.65
doc: >
# --------------------------------------
- def_name: __eq__
params:
- param_name: other
type: carla.GearPhysicsControl
doc: >
# --------------------------------------
- def_name: __ne__
params:
- param_name: other
type: carla.GearPhysicsControl
doc: >
# --------------------------------------
- def_name: __str__
doc: >
# --------------------------------------
- class_name: VehiclePhysicsControl
doc: >
VehiclePhysicsControl is used for controlling the physics parameters of a vehicle.
# - PROPERTIES -------------------------
instance_variables:
- var_name: torque_curve
type: list(carla.Vector2D)
doc: >
Curve that indicates the torque measured in Nm for a specific RPM of the vehicle's engine.
# --------------------------------------
- var_name: max_rpm
type: float
doc: >
The maximum RPM of the vehicle's engine.
# --------------------------------------
- var_name: moi
type: float
doc: >
The moment of inertia of the vehicle's engine.
# --------------------------------------
- var_name: damping_rate_full_throttle
type: float
doc: >
Damping rate when the throttle is maximum.
# --------------------------------------
- var_name: damping_rate_zero_throttle_clutch_engaged
type: float
doc: >
Damping rate when the throttle is zero with clutch engaged.
# --------------------------------------
- var_name: damping_rate_zero_throttle_clutch_disengaged
type: float
doc: >
Damping rate when the throttle is zero with clutch disengaged.
# --------------------------------------
- var_name: use_gear_autobox
type: bool
doc: >
If true, the vehicle will have an automatic transmission.
# --------------------------------------
- var_name: gear_switch_time
type: float
doc: >
Switching time between gears.
# --------------------------------------
- var_name: clutch_strength
type: float
doc: >
The clutch strength of the vehicle. Measured in Kgm^2/s.
# --------------------------------------
- var_name: final_ratio
type: float
doc: >
The fixed ratio from transmission to wheels.
# --------------------------------------
- var_name: forward_gears
type: list(carla.GearPhysicsControl)
doc: >
List of GearPhysicsControl objects.
# --------------------------------------
- var_name: mass
type: float
doc: >
The mass of the vehicle measured in Kg.
# --------------------------------------
- var_name: drag_coefficient
type: float
doc: >
Drag coefficient of the vehicle's chassis.
# --------------------------------------
- var_name: center_of_mass
type: carla.Vector3D
doc: >
The center of mass of the vehicle.
# --------------------------------------
- var_name: steering_curve
type: list(carla.Vector2D)
doc: >
Curve that indicates the maximum steering for a specific forward speed.
# --------------------------------------
- var_name: wheels
type: list(carla.WheelPhysicsControl)
doc: >
List of carla.WheelPhysicsControl objects. This list should have 4 elements, where index 0 corresponds to the front left wheel, index 1 corresponds to the front right wheel, index 2 corresponds to the back left wheel and index 3 corresponds to the back right wheel. For 2 wheeled vehicles, set the same values for both front and back wheels.
# - METHODS ----------------------------
methods:
- def_name: __init__
params:
- param_name: torque_curve
default: [[0.0,500.0], [5000.0, 500.0]]
type: list(carla.Vector2D)
- param_name: max_rpm
default: 5000.0
type: float
- param_name: moi
default: 1.0
type: float
- param_name: damping_rate_full_throttle
default: 0.15
type: float
- param_name: damping_rate_zero_throttle_clutch_engaged
default: 2.0
type: float
- param_name: damping_rate_zero_throttle_clutch_disengaged
default: 0.35
type: float
- param_name: use_gear_autobox
default: True
type: bool
- param_name: gear_switch_time
default: 0.5
type: float
- param_name: clutch_strength
default: 10.0
type: float
- param_name: final_ratio
default: 4.0
type: float
- param_name: forward_gears
default: list()
type: list(carla.GearPhysicsControl)
- param_name: mass
default: 1000.0
- param_name: drag_coefficient
default: 0.3
type: float
- param_name: center_of_mass
default: [0.0, 0.0, 0.0]
type: carla.Vector3D
- param_name: steering_curve
default: [[0.0, 1.0],[10.0, 0.5]]
type: carla.Vector2D
- param_name: wheels
default: list()
type: list(carla.WheelPhysicsControl)
doc: >
VehiclePhysicsControl constructor
# --------------------------------------
- def_name: __eq__
params:
- param_name: other
type: carla.VehiclePhysicsControl
# --------------------------------------
- def_name: __ne__
params:
- param_name: other
type: carla.VehiclePhysicsControl
# --------------------------------------
- def_name: __str__
doc: >
# --------------------------------------
- class_name: WheelPhysicsControl
doc: >
WheelPhysicsControl is used for controlling the physics parameters of a vehicle's wheel.
# - PROPERTIES -------------------------
instance_variables:
- var_name: tire_friction
type: float
doc: >
A scalar value that indicates the friction of the wheel.
# --------------------------------------
- var_name: damping_rate
type: float
doc: >
The damping rate of the wheel.
# --------------------------------------
- var_name: max_steer_angle
type: float
doc: >
The maximum angle in degrees that the wheel can steer.
# --------------------------------------
- var_name: radius
type: float
doc: >
The radius of the wheel in centimeters.
# --------------------------------------
- var_name: max_brake_torque
type: float
doc: >
The maximum brake torque in Nm.
# --------------------------------------
- var_name: max_handbrake_torque
type: float
doc: >
The maximum handbrake torque in Nm.
# --------------------------------------
- var_name: position
type: carla.Vector3D
doc: >
World position of the wheel. Note that it is a read-only parameter.
# - METHODS ----------------------------
methods:
- def_name: __init__
params:
- param_name: tire_friction
default: 2.0
type: float
- param_name: damping_rate
default: 0.25
type: float
- param_name: max_steer_angle
default: 70.0
type: float
- param_name: radius
default: 30.0
type: float
- param_name: max_brake_torque
default: 1500.0
type: float
- param_name: max_handbrake_torque
default: 3000.0
type: float
- param_name: position
default: (0.0,0.0,0.0)
type: carla.Vector3D
doc: >
WheelPhysicsControl constructor
# --------------------------------------
- def_name: __eq__
params:
- param_name: other
type: carla.WheelPhysicsControl
# --------------------------------------
- def_name: __ne__
params:
- param_name: other
type: carla.WheelPhysicsControl
# --------------------------------------
- def_name: __str__
doc: >
# --------------------------------------
...