diff --git a/Docs/img/tuto_suspension_blueprints.jpg b/Docs/img/tuto_suspension_blueprints.jpg new file mode 100644 index 000000000..259769e89 Binary files /dev/null and b/Docs/img/tuto_suspension_blueprints.jpg differ diff --git a/Docs/img/tuto_suspension_parameterization.jpg b/Docs/img/tuto_suspension_parameterization.jpg new file mode 100644 index 000000000..a3da00d3c Binary files /dev/null and b/Docs/img/tuto_suspension_parameterization.jpg differ diff --git a/Docs/index.md b/Docs/index.md index 7cb5ee601..5afd923f0 100644 --- a/Docs/index.md +++ b/Docs/index.md @@ -143,10 +143,12 @@ CARLA forum — Add new content to CARLA. [__Create a sensor__](tuto_D_create_sensor.md) — Develop a new sensor to be used in CARLA. + [__Customize vehicle suspension__](tuto_D_customize_vehicle_suspension.md) + — Modify the suspension system of a vehicle. [__Make a release__](tuto_D_make_release.md) — For developers who want to publish a release. [__Generate detailed colliders__](tuto_D_generate_colliders.md) - — Created detailed colliders for vehicles. + — Create detailed colliders for vehicles. [__Generate pedestrian navigation__](tuto_D_generate_pedestrian_navigation.md) — Obtain the information needed for walkers to move around.

diff --git a/Docs/tuto_D_customize_vehicle_suspension.md b/Docs/tuto_D_customize_vehicle_suspension.md new file mode 100644 index 000000000..c755ac76b --- /dev/null +++ b/Docs/tuto_D_customize_vehicle_suspension.md @@ -0,0 +1,224 @@ +# Customize vehicle suspension + +This tutorial covers the basics of the suspension system for CARLA vehicles, and how are these implemented for the different vehicles available. Use this information to access the suspension parameterization of a vehicle in Unreal Engine, and customize it at will. + +* [__Basics of the suspension system__](#basics-of-the-suspension-system) +* [__Suspension groups__](#suspension-groups) + + +--- +## Basics of the suspension system + +The suspension system of a vehicle is defined by the wheels of said vehicle. Each wheel has an independent blueprint with some parameterization, which includes the suspension system. + +These blueprints can be found in `Content/Carla/Blueprints/Vehicles/`. They are named such as: `BP__W`. + +* `F` or `B` is used for front or back wheels correspondingly. +* `R` or `L` is used for right or left wheels correspondingly. + +![tuto_suspension_blueprints](img/tuto_suspension_blueprints.jpg) +
In this example, the blueprint of the front left wheel of the Audi A2 is named as BP_AudiA2_FLW.
+ +`shape_radius` for the wheel to rest over the road, neither hovering nor inside of it. + +Inside the blueprint, there is a section with some parameterization regarding the suspension of the wheel. Here are their definitions as described in Unreal Engine. + +* `Suspension Force Offset` — Vertical offset from where suspension forces are applied (along Z axis). +* `Suspension Max Raise` — How far the wheel can go above the resting position. +* `Suspension Max Drop` — How far the wheel can drop below the resting position. +* `Suspension Natural Frequency` — Oscillation frequency of the suspension. Standard cars have values between 5 and 10. +* `Suspension Damping Ratio` — The rate at which energy is dissipated from the spring. Standard cars have values between 0.8 and 1.2. Values < 1 are more sluggish, values > 1 are more twitchy. +* `Sweep Type` — Wether wheel suspension considers simple, complex or both. + +![tuto_suspension_parameterization](img/tuto_suspension_parameterization.jpg) +
The Suspension panel inside a wheel blueprint.
+ +!!! Note + By default, all the wheels of a vehicle have the same parameterization in CARLA. The following explanations will be covered per vehicle, instead of per wheel. + +--- +## Suspension groups + +According to their system suspension, vehicles in CARLA can be classified in five groups. All the vehicles in a group have the same parameterization, as they are expected to have a similar behaviour on the road. The suspension of a vehicle can be modified at will, and is no subject to these five groups. However understanding these, and observing their behaviour in the simulation can be of great use to define a custom suspension. + +The five groups are: *Coupé*, *Off-road*, *Truck*, *Urban*, and *Van*. In closer observation, the parameterization of these groups follows a specific pattern. + + + + + + + + + + + +
Stiff suspensionCoupéUrbanVanOff-roadTruckSoft suspension
+
+ +The closer a vehicle is to a stiff suspension, its parameterization changes. + +* __Decrease__ of `Suspension Max Raise` and `Suspension Max Drop` — Stiff vehicles are meant to drive over plane roads with no bumps. For the sake of aerodynamics, the chassis is not supposed to move greatly, but remain constantly close to the ground. +* __Decrease__ of `Suspension Natural Frequency` — Stiff vehicles tend to be lighter, so the amount of bounces for the same joggle is expected to be lower. +* __Increase__ of `Suspension Damping Ratio` — The absortion of the bouncing by the dampers is greater for stiff vehicles. + +> TO BE DISCUSSED: Suspension natural frequency increases for stiff vehicles instead?? !! + +!!! Note + `Suspension Force Offset` and `Sweep Type` remain constant for every group. No offset is intended to be applied on forces, and the sweep tests for detecting collisions should be the same for all vehicles. + + +* __Coupé__ — Vehicles with the stiffest suspension. + + + + + + + + + +
ParameterizationVehicles
+Suspension Force Offset0.0
+Suspension Max Raise7.5
+Suspension Max Drop7.5
+Suspension Natural Frequency10.0
+Suspension Damping Ratio1.0
+Sweep TypeSimpleAndComplex
+
+vehicle.seat.leon
+vehicle.audi.a2
+vehicle.audi.tt
+vehicle.tesla.model3
+vehicle.lincoln.mkz2017
+vehicle.mercedes-benz.coupe
+
+
+ + +* __Off-road__ — Vehicles with a soft suspension. + + + + + + + + + +
ParameterizationVehicles
+Suspension Force Offset0.0
+Suspension Max Raise15.0
+Suspension Max Drop15.0
+Suspension Natural Frequency7.0
+Suspension Damping Ratio0.5
+Sweep TypeSimpleAndComplex
+
+vehicle.audi.etron
+vehicle.nissan.patrol
+vehicle.tesla.cybertruck
+vehicle.jeep.wrangler_rubicon
+
+
+ +* __Truck__ — Vehicles with the softest suspension. + + + + + + + + + +
ParameterizationVehicles
+Suspension Force Offset0.0
+Suspension Max Raise17.0
+Suspension Max Drop17.0
+Suspension Natural Frequency6.0
+Suspension Damping Ratio0.4
+Sweep TypeSimpleAndComplex
+
+vehicle.carlamotors.carlacola
+
+
+ +* __Urban__ — Vehicles with a soft suspension. + + + + + + + + + +
ParameterizationVehicles
+Suspension Force Offset0.0
+Suspension Max Raise8.0
+Suspension Max Drop8.0
+Suspension Natural Frequency9.0
+Suspension Damping Ratio0.8
+Sweep TypeSimpleAndComplex
+
+vehicle.nissan.micra
+vehicle.mustang.mustang
+vehicle.mini.cooperst
+vehicle.citroen.c3
+vehicle.chevrolet.impala
+vehicle.toyota.prius
+vehicle.dodge_charger.police
+vehicle.bmw.grandtourer
+
+
+ +* __Van__ — Vehicles with a middle-ground suspension. + + + + + + + + + +
ParameterizationVehicles
+Suspension Force Offset0.0
+Suspension Max Raise9.0
+Suspension Max Drop9.0
+Suspension Natural Frequency9.0
+Suspension Damping Ratio0.9
+Sweep TypeSimpleAndComplex
+
+vehicle.volkswagen.t2
+
+
+ + +--- + +Use the forum to post any doubts, issues or suggestions regarding this topic. + + + +Here are some advised readings after this one. + + diff --git a/mkdocs.yml b/mkdocs.yml index a86c2c397..ea5f1ca68 100644 --- a/mkdocs.yml +++ b/mkdocs.yml @@ -62,6 +62,7 @@ nav: - Tutorials (developers): - 'Contribute with assets': 'tuto_D_contribute_assets.md' - 'Create a sensor': 'tuto_D_create_sensor.md' + - 'Customize vehicle suspension': 'tuto_D_customize_vehicle_suspension.md' - 'Generate detailed colliders': 'tuto_D_generate_colliders.md' - 'Make a release': 'tuto_D_make_release.md' - 'Generate pedestrian navigation': 'tuto_D_generate_pedestrian_navigation.md'