How to control the car using heuristic option in ML-Agents

Hello Folks,
I hope everyone is doing fine. I am new to unity and new to C-sharp coding. I am trying to move the car which is available in the standard asset through the CarAgent Script. The goal is to do reinforcement learning and the car can accelerate, brake or do nothing (3 actions) in order to maintain a distance from the target object let’s say another car (which is moving with certain speed with respect to time). For reference I am attaching my C-sharp scripts.
One thing I would like to mention is I can control the car if I attach carusercontrol script. Instead of using CarAgent Script (Heuristic option)… I don’t know what i am missing here…

I would highly appreciate if someone can help me in this regard.

6603886–751231–CarAgent.cs (4 KB)
6603886–751234–CarController.cs (13.6 KB)
2271884–153185–CarUserControl.cs (905 Bytes)

solution is here:
How to control the car using heuristic option in ML-Agents - Unity Forum