I am making some changes in the code to improve readability and prepare for landing the "change files in runtime" PR. This PR does not change any functionality and is purely aimed at reducing code duplication, removing unwanted/unused code and formatting the code to make it easier to read.
The changes of this PR are -
Improved readability by removing unused variables, functions, parameters, changed types to fix warnings etc.
Factor out common code like setting position, rotation etc for road objects in a helper function to reduce code redundancy. This helps to focus on the logic of creating these road objects.
Factor out setting zero actions in a different functions.
Move computing the "other agents" from reset() to create() as we only need to fill this array once. We dont destroy entities during episodes so, there is no need to do this every reset.
Fixed headless to correctly read from the new "data/examples" folder.
Factored out the custom rules like isAgentStatic, shouldAgentBeControllable etc. into new functions. This makes it easier to find the custom rules we have made.
I am making some changes in the code to improve readability and prepare for landing the "change files in runtime" PR. This PR does not change any functionality and is purely aimed at reducing code duplication, removing unwanted/unused code and formatting the code to make it easier to read.
The changes of this PR are -
reset()
tocreate()
as we only need to fill this array once. We dont destroy entities during episodes so, there is no need to do this every reset.isAgentStatic
,shouldAgentBeControllable
etc. into new functions. This makes it easier to find the custom rules we have made.types.hpp