Vehicle
Vehicle
pydantic-model
¤
Encodes the Vehicle's state at the last tick
control: VehicleControl
pydantic-field
required
¤
transform: Transform
pydantic-field
¤
velocity: Vector3D
pydantic-field
required
¤
wheel_base: float
pydantic-field
¤
Default to tesla model 3's wheel base
__config__
¤
__json_encoder__(obj)
special
staticmethod
¤
get_speed(vehicle)
staticmethod
¤
Compute speed of a vehicle in Km/h.
Parameters:
Name | Type | Description | Default |
---|---|---|---|
vehicle |
|
the vehicle for which speed is calculated |
required |
Returns:
Type | Description |
---|---|
float |
speed as a float in Km/h |
Source code in ROAR_simulation/roar_autonomous_system/utilities_module/vehicle_models.py
49 50 51 52 53 54 55 56 57 58 59 60 |
|
VehicleControl
pydantic-model
¤
steering: float
pydantic-field
¤
throttle: float
pydantic-field
¤
__config__
¤
__json_encoder__(obj)
special
staticmethod
¤
clamp(n, minn, maxn)
staticmethod
¤
Source code in ROAR_simulation/roar_autonomous_system/utilities_module/vehicle_models.py
14 15 16 |
|
get_steering(self)
¤
Steering between -1, 1
Returns:
Type | Description |
---|---|
float |
float between 01, 1 |
Source code in ROAR_simulation/roar_autonomous_system/utilities_module/vehicle_models.py
26 27 28 29 30 31 32 |
|
get_throttle(self)
¤
throttle it between -1 and 1
Returns:
Type | Description |
---|---|
float |
float between -1, 1 |
Source code in ROAR_simulation/roar_autonomous_system/utilities_module/vehicle_models.py
18 19 20 21 22 23 24 |
|