DriveWorks SDK Reference
3.5.78 Release
For Test and Development only

planning/safetyforcefield/docs/usecase2.md
Go to the documentation of this file.
1 # Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved.
2 
3 @page safetyforcefield_usecase2 Safety Force Field Actuation Workflow
4 @tableofcontents
5 
6 @note SW Release Applicability: This tutorial is applicable to modules in **NVIDIA DRIVE Software** releases.
7 
8 The Safety Force Field Actuation module takes the control constraints acquired from a Safety Force Field module.
9 It corrects a given unsafe control (front wheel steering angle and longitudinal acceleration) of the ego-vehicle to a safe one.
10 
11 @section safetyforcefield_actuation_initialization Initialization
12 
13 #### To initialize a Safety Force Field Actuation module
14 
15 ```{.cpp}
16 dwStatus dwSafetyForceFieldActuation_initialize(dwSafetyForceFieldActuationHandle_t* SafetyForceFieldActuation,
17  dwContextHandle_t context);
18 ```
19 
20 @section safetyforcefield_actuation_steering_weight Steering Weight
21 
22 A steering weight can be set after a Safety Force Field Actuation module is initialized. The steering weight is a nonnegative floating point number, where the default value is 0.0, indicating the actuation only has braking and no steering. The larger the weight, the more steering there is over braking. To see steering in the actuation, you can set the steering weight to be a positive value such as a value between 0.1 and 0.5. After that, if the steering actuation is still not apparent, you can keep raising the steering weight until the steering actuation is observed.
23 
24 #### To set a steering weight
25 
26 ```{.cpp}
27 dwStatus dwSafetyForceFieldActuation_setSteeringWeight(float32_t steeringWeight,
28  dwSafetyForceFieldActuationHandle_t SafetyForceFieldActuation);
29 ```
30 
31 @section safetyforcefield_actuation_control_constraints Control Constraints
32 
33 #### To update the actuation module's control constraints
34 
35 ```{.cpp}
36 dwStatus dwSafetyForceField_getControlConstraints(dwSafetyForceFieldControlConstraints* constraints,
37  dwSafetyForceFieldHandle_t handle);
38 
39 dwStatus dwSafetyForceFieldActuation_setControlConstraints(const dwSafetyForceFieldControlConstraints* constraints,
40  dwSafetyForceFieldActuationHandle_t SafetyForceFieldActuation);
41 ```
42 
43 @section safetyforcefield_actuation_process Process Function
44 
45 #### To run the actuation, or correct a proposed control to a safe one
46 
47 ```{.cpp}
48 dwStatus dwSafetyForceFieldActuation_process(bool* isProposedControlSafe,
49  dwSafetyForceFieldControl* newControl,
50  const dwSafetyForceFieldControl* proposedControl,
51  float32_t steeringLimit,
52  float32_t minAccel,
53  float32_t maxAccel,
54  dwSafetyForceFieldActuationHandle_t SafetyForceFieldActuation);
55 ```
56 
57 @section safetyforcefield_actuation_release Release
58 
59 #### To release a Safety Force Field Actuation module
60 
61 ```{.cpp}
62 dwStatus dwSafetyForceFieldActuation_release(dwSafetyForceFieldActuationHandle_t SafetyForceFieldActuation);
63 ```
64 
65 For a more detailed workflow, please refer to the @ref dwx_safetyforcefield_sample.