sensor manager init on pegasus

I checked dwSensorManager_initializeFromRig is working on my PC.
but when i try to dwSensorManager_initializeFromRig on Pegasus, it makes error.

I made two rig files, first thing is camera.gmsl(real-time) and second thing is camera.virtual(recored data).
I checked camera.virtual is working on my PC. but on pegasus both are failed.

this problem occur when camera data is loaded. I checked offline data of radar/imu/gps(not online) are working.

the error message and rig file are below.

  1. when using camera.virtual rig file
    RIG INIT
    [28-07-2019 14:59:30] Loading rig file: ./onofframp/rig.json
    SENSOR MANAGER INIT
    [28-07-2019 14:59:30] SensorFactory::createSensor() → camera.virtual, video=./onofframp/video_B0_FC_60.h264,timestamp=./onofframp/video_B0_FC_60.txt
    NvMedia2DBlitEx: Failed to acquire tvmr mutex
    [28-07-2019 14:59:30] DecoderNvMedia: Error NvMedia2DBlit
    NvMedia2DBlitEx: Failed to acquire tvmr mutex
    [28-07-2019 14:59:30] DecoderNvMedia: Error NvMedia2DBlit
    [28-07-2019 14:59:30] CameraVirtualNvMedia: no seek table found at ./onofframp/video_B0_FC_60.h264.seek, seeking is not available.
    [28-07-2019 14:59:30] SensorManager: DW_NOT_AVAILABLE: ImageStreamerEGL: No EGL Display available.
    [28-07-2019 14:59:30] SensorManager: Failed to add sensor from rig: camera.virtual video=./onofframp/video_B0_FC_60.h264,timestamp=./onofframp/video_B0_FC_60.txt (Error: DW_NOT_AVAILABLE)
    [28-07-2019 14:59:30] Driveworks exception thrown: DW_NOT_AVAILABLE: SensorManager: Failed to add sensors from rig

terminate called after throwing an instance of ‘std::runtime_error’
what(): [2019-07-28 14:59:30] DW Error DW_NOT_AVAILABLE executing DW function:
dwSensorManager_initializeFromRig(&dw_sensor_mng, dw_rig_config, pool_size, dw_sal)

  1. when using camera.gmsl rig file
    SAL INIT
    rig-file: rig.json
    RIG INIT
    [28-07-2019 15:14:21] Loading rig file: rig.json
    SENSOR MANAGER INIT
    [28-07-2019 15:14:21] SensorFactory::createSensor() → camera.gmsl, camera-type=ar0231-rccb-bae-sf3324,camera-group=a,slave=0,format=h264,fifo-size=3,isp-mode=yuv420-uint8,bitrate=8000000,framerate=30
    [28-07-2019 15:14:21] CameraGMSL: Create NvMediaIPPManager
    [28-07-2019 15:14:21] CameraGMSL: required FPS = 30, resolution = 1920x1208
    nvmedia isc: IscPwrCtrlInit: 939: Camera power control library: NVCCP
    Max96712 Rev 2 detected!
    MAX96712: Enable periodic AEQ on Link 0
    MAX96705: Pre-emphasis set to 0xaa
    Sensor AR0231 RCCB Rev7 detected!
    (NvCapture) Error IoctlFailed: capture setup ioctl failed: 5 (in /dvs/git/dirty/git-master_linux/camera/capture/nvcapture/capture_hw_linux.c, function NvCaptureLinuxChannelOpen(), line 157)
    (NvCapture) Error IoctlFailed: (propagating from /dvs/git/dirty/git-master_linux/camera/capture/nvcapture/capture.c, function NvCaptureChannelHwBackendOpen(), line 1169)
    (NvCapture) Error IoctlFailed: (propagating from /dvs/git/dirty/git-master_linux/camera/capture/nvcapture/capture.c, function NvCaptureChannelSetAttribute(), line 1241)
    SetSourceSequence: failed to set channel source attribute
    ICPCreate: captureCreate failed
    CreateGroup: failed for create ICP instance 0
    [IppIcpExComponentCreateNew:634] Failed to create ICP
    [NvMediaIPPComponentCreateNew:806] Failed to create NVMEDIA_IPP_COMPONENT_ICP_EX component
    [28-07-2019 15:14:28] SensorManager: DW_NVMEDIA_ERROR: CameraGMSL: Cannot setup pipeline : 7
    [28-07-2019 15:14:28] SensorManager: Failed to add sensor from rig: camera.gmsl camera-type=ar0231-rccb-bae-sf3324,camera-group=a,slave=0,format=h264,fifo-size=3,isp-mode=yuv420-uint8,bitrate=8000000,framerate=30 (Error: DW_NVMEDIA_ERROR)
    [28-07-2019 15:14:28] Driveworks exception thrown: DW_NVMEDIA_ERROR: SensorManager: Failed to add sensors from rig

terminate called after throwing an instance of ‘std::runtime_error’
what(): [2019-07-28 15:14:28] DW Error DW_NVMEDIA_ERROR executing DW function:
dwSensorManager_initializeFromRig(&dw_sensor_mng, dw_rig_config, pool_size, dw_sal)

and here is rig file
{
“rig”: {
“properties”: {
“layout”: “Hyperion 7.0”
},
“sensors”: [
{
“correction_rig_T”: [
0.0,
0.0,
0.0
],
“correction_sensor_R_FLU”: {
“roll-pitch-yaw”: [
0.03438815474510193,
-3.7623074054718018,
0.16219370067119598
]
},
“name”: “camera:front:center:60fov”,
“nominalSensor2Rig_FLU”: {
“roll-pitch-yaw”: [
-5.798638449050486e-05,
1.1458930969238281,
-0.5729333758354187
],
“t”: [
1.7489999532699585,
-0.10000000149011612,
1.4700000286102295
]
},
“parameter”: “camera-type=ar0231-rccb-bae-sf3324,camera-group=a,slave=0,format=h264,fifo-size=3,isp-mode=yuv420-uint8,bitrate=8000000,framerate=30,type=disk”,
“properties”: {
“Model”: “ftheta”,
“bw-poly”: “0.0 0.000545421498827636 -1.6216719633103e-10 -4.64720492990289e-12 2.85224527762934e-16”,
“cx”: “960”,
“cy”: “604”,
“height”: “1208”,
“width”: “1920”
},
“protocol”: “camera.gmsl”
}
],
“vehicle”: {
“valid”: true,
“value”: {
“axlebaseFront”: 1.582419991493225,
“axlebaseRear”: 1.5748000144958496,
“bumperFront”: 0.9120000004768372,
“bumperRear”: 1.1090999841690063,
“centerOfMassToRearAxle”: 1.5644999742507935,
“driveByWireTimeConstant”: 0.25999999046325684,
“driveByWireTimeDelay”: 0.10999999940395355,
“frontCorneringStiffness”: 30654.0,
“height”: 1.4731999635696411,
“inertia”: 1780.800048828125,
“length”: 4.871719837188721,
“mass”: 1779.4000244140625,
“rearCorneringStiffness”: 36407.0,
“steeringCoefficient”: 14.800000190734863,
“wheelDiameter”: 0.672702968120575,
“wheelbase”: 2.8498799800872803,
“width”: 1.8516600131988525,
“widthWithMirrors”: 0.0,
“driveByWireTimeDelay”: 0.11,
“aerodynamicDragCoeff”: 0.7,
“frontalArea”: 1.0,
“centerOfMassHeight”: 1.5,
“aeroHeight”: 1.5,
“rollingResistanceCoeff”: 0.015,
“maxEnginePower”: 134e3,
“throttleActuatorTimeConstant”: 1.0,
“brakeActuatorTimeConstant”: 0.5,
“centerOfMassToFrontAxle”: 1.286,
“throttleStateInput”: [0, 0.07, 0.14, 0.21, 0.29, 0.36, 0.43, 0.50, 0.57, 0.64, 0.71, 0.79, 0.86, 0.93, 1.00],
“throttleForceOutput”: [0, 312, 623, 1086, 2646, 4272, 5370, 6052, 6363, 6556, 6730, 6905, 7092, 7283, 7473],
“brakeStateInput”: [0, 0.07, 0.14, 0.21, 0.29, 0.36, 0.43, 0.50, 0.57, 0.64, 0.71, 0.79, 0.86, 0.93, 1.00],
“brakeForceOutput”: [0, 714, 1423, 2143, 2857, 3571, 4286, 5000, 5714, 6429, 7143, 7857, 8571, 9286, 10000]
}
}
},
“version”: 2
}

my brief code is below


InitSDK();

InitSAL();

InitRigConfiguration();

InitSensorManager();

InitCanInterpreter();

void InitSDK()
{
// Initialize Driveworks Context, SAL
dwLogger_initialize(getConsoleLoggerCallback(true));
dwLogger_setLogLevel(DW_LOG_VERBOSE);

dw_context_params.dataPath = DataPath::get_cstr();
#ifdef VIBRANTE
dw_context_params.eglDisplay = getEGLDisplay();
#endif

CHECK_DW_ERROR(dwInitialize(&dw_context, DW_VERSION, &dw_context_params));

}

void InitSAL()
{
std::cout << “SAL INIT” << std::endl;
CHECK_DW_ERROR(dwSAL_initialize(&dw_sal, dw_context));
}

void InitRigConfiguration()
{
string ddd = getArgument(“rig”).c_str();
std::cout << "rig-file: " << ddd << std::endl;

// Initialize Rig Configuration, Sensor Manager and CAN Interpreter
std::cout << "RIG INIT" << std::endl;
CHECK_DW_ERROR(dwRig_initializeFromFile(&dw_rig_config, dw_context, getArgument("rig").c_str()));

}

void InitSensorManager()
{
size_t pool_size = 16;
std::cout << "SENSOR MANAGER INIT "<< std::endl;
CHECK_DW_ERROR(dwSensorManager_initializeFromRig(&dw_sensor_mng, dw_rig_config, pool_size, dw_sal));
}

void InitCanInterpreter()
{
dwCANInterpreterHandle_t dw_can_interpreter;
std::cout << “DBC INIT” << std::endl;
CHECK_DW_ERROR(dwCANInterpreter_buildFromDBC(&dw_can_interpreter, getArgument(“dbc”).c_str(), dw_context));
}

Dear JW31,

Could please you tell which sample code your generated code references?
Maybe I think according to your upload, it seems that there is a hardware resource problem.
Could you please reboot(cold reboot) the system and try it again? Thanks.

Dear SteveNV,

I did reboot the system and try again, but same problem occur.

and I checked that camera_gmsl sample is working on pegasus.

and my code is similar to egomotion sample.

  • dwSensorManager is initialized with Rig Configuration, and start to acquire sensor data.

solved it. I guess it was renderer problem.