Render engine not being initialized

Please provide the following info (check/uncheck the boxes after creating this topic):
Software Version
DRIVE OS Linux 5.2.6
DRIVE OS Linux 5.2.6 and DriveWorks 4.0
DRIVE OS Linux 5.2.0
DRIVE OS Linux 5.2.0 and DriveWorks 3.5
NVIDIA DRIVE™ Software 10.0 (Linux)
NVIDIA DRIVE™ Software 9.0 (Linux)
other DRIVE OS version

Target Operating System

Hardware Platform
NVIDIA DRIVE™ AGX Xavier DevKit (E3550)
NVIDIA DRIVE™ AGX Pegasus DevKit (E3550)

SDK Manager Version

Host Machine Version
native Ubuntu 18.04

While running a custom object detection program similar to the given sample object detection program, we are running into a run time problem where the render engine is not getting initialized. Our program uses ROS integration with the driveworks API. The executable is getting built in the host system but throws this error on the target system.
main.cpp (3.3 KB)

terminate called after throwing an instance of 'std::runtime_error'

  what():  [2022-02-07 17:51:22] DW Error DW_NOT_INITIALIZED executing DW function:

 dwRenderEngine_initialize(&m_renderEngine, &dwrenderparams, m_viz)

I have uploaded the initial lines of the main.cpp file. The initialization throws an error even though the SDK, SAL have been initialized. Any help would be good.

Dear @user130505,
Could you please confirm if DW samples using dwRenderEngine are running on target?

Yes, the samples are running on the target. We are trying to run a custom object detection similar to the one given in samples. We are doing the initialization the same as the sample but still, the RenderEngine is not getting initialized and throws an error. SDK and SAL initialization is successful though.