Error in src/services/gyro/SensorsManager.cpp initSensors() when accessing camera on TX2

Hi,

I just received a TX2 and have been getting started with it by running some of the sample from JetPack 3. I have run into a problem when running examples that access the camera in that the camera application starts up shows the video stream momentarily and then shuts down with an error from:
src/services/gyro/SensorsManager.cpp, function initSensors(), line 278

For example if I run the tegra_multimedia_api/samples/09_camera_jpeg_capture sample I get the following output.

--------------------------- Start Ouput ---------------------
nvidia@tegra-ubuntu:~/tegra_multimedia_api/samples/09_camera_jpeg_capture$ ./camera_jpeg_capture
[INFO] (NvEglRenderer.cpp:109) Setting Screen width 640 height 480
PRODUCER: Creating output stream
PRODUCER: Launching consumer thread
CONSUMER: Waiting until producer is connected…
CONSUMER: Waiting until producer is connected…
PRODUCER: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
CONSUMER: Producer has connected; continuing.
SCF: Error BadValue: not available (in src/services/gyro/SensorsManager.cpp, function initSensors(), line 278)
SCF: Error BadValue: not available (in src/services/gyro/SensorsManager.cpp, function initSensors(), line 278)
SCF: Error BadValue: not available (in src/services/gyro/SensorsManager.cpp, function initSensors(), line 278)
SCF: Error BadValue: not available (in src/services/gyro/SensorsManager.cpp, function initSensors(), line 278)
SCF: Error BadValue: motionMonitorThread failure (in src/services/gyro/MotionMonitorService.cpp, function motionMonitorThread(), line 343)
CONSUMER: Done.
CONSUMER: Done.
PRODUCER: Done – exiting.
--------------------------- End Ouput ---------------------

Has anyone else experienced a similar issue? The same error occurs with other camera based samples. For example

--------------------------- Start Ouput ---------------------
nvidia@tegra-ubuntu:~/tegra_multimedia_api/samples/10_camera_recording$ ./camera_recording
Set governor to performance before enabling profiler
PRODUCER: Creating output stream
PRODUCER: Launching consumer thread
Failed to query video capabilities: Inappropriate ioctl for device
NvMMLiteOpen : Block : BlockType = 4
===== MSENC =====
NvMMLiteBlockCreate : Block : BlockType = 4
875967048
842091865
create vidoe encoder return true
CONSUMER: Waiting until producer is connected…
PRODUCER: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
SCF: Error BadValue: not available (in src/services/gyro/SensorsManager.cpp, function initSensors(), line 278)
SCF: Error BadValue: not available (in src/services/gyro/SensorsManager.cpp, function initSensors(), line 278)
===== MSENC blits (mode: 1) into tiled surfaces =====
SCF: Error BadValue: not available (in src/services/gyro/SensorsManager.cpp, function initSensors(), line 278)
SCF: Error BadValue: not available (in src/services/gyro/SensorsManager.cpp, function initSensors(), line 278)
SCF: Error BadValue: motionMonitorThread failure (in src/services/gyro/MotionMonitorService.cpp, function motionMonitorThread(), line 343)
CONSUMER: Got EOS, exiting…
CONSUMER: Done.
PRODUCER: Done – exiting.


Total Profiling Time = 0 sec


--------------------------- End Ouput ---------------------

If someone from NVIDIA is on this forum, can you please advise me on whether this suggests a h/w issue with the board.

Thanks.

Hi johnmcd,
Please try ‘gst-launch-1.0 nvcamerasrc ! nvoverlaysink’
Let’s make sure the onboard ov5693 is working fine.

Hi johnmcd,
The print does not affect the functionality. Do you check the hdmi out? There should be preview in hdmi out. The default capture time is 1 second:

CAPTURE_TIME  = 1; // In seconds.

Please change it and rebuild the samples to have longer execution time.

Hi DaneLL,

That worked. Thank you very much for you help … I should have read the code!!

With this said I am still curious to know what the message:
SCF: Error BadValue: not available (in src/services/gyro/SensorsManager.cpp, function initSensors(), line 278)
is referring to?

Thanks again,
John.

Hi johnmcd, the error indicates it fails to initialize gyro sensor. We will check and update.

I have the exact same issue, with running gstreamer by command line. once rebooted, my commands run just fine, then I kill the gst-launch process, and kill the nvdaemon process, and shut down then restart the nvdaemon process and I get the same issue. Only to reboot gets the camera going again.

My stream is working with the same error showing up. just annoying and a feel of a crash is imminent with that showing up… no way to clean it up without rebooting ?

It is confirmed an issue and will be fixed in next release

Hello DaneLLL,
I run ‘gst-launch-1.0 nvcamerasrc ! nvoverlaysink’ on jetson-tx2. Work well!But,when i run the code on terminal.

nvidia@tegra-ubuntu:~/tegra_multimedia_api/samples/10_camera_recording$ ./camera_recording 
Set governor to performance before enabling profiler
initializeDevNode: Failed to open dev node '/dev/camera/video1'; No such file or directory, trying alternate default location
(NvOdmDevice) Error BadParameter: Control 10094858 not found (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function findControlById(), line 1367)
(NvOdmDevice) Error BadParameter:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function getControlRange(), line 299)
initialize: focus query failed
(Argus) Error InvalidState: Scf SensorModeType 0 not found (in src/common/ScfTranslate.cpp, function fromNvMMSensorModeType(), line 322)
(Argus) Error InvalidState: Scf SensorModeType 0 not found (in src/common/ScfTranslate.cpp, function fromNvMMSensorModeType(), line 322)
(Argus) Error InvalidState: Scf SensorModeType 0 not found (in src/common/ScfTranslate.cpp, function fromNvMMSensorModeType(), line 322)
(Argus) Error InvalidState: Scf SensorModeType 0 not found (in src/common/ScfTranslate.cpp, function fromNvMMSensorModeType(), line 322)
PRODUCER: Creating output stream
PRODUCER: Launching consumer thread
Failed to query video capabilities: Inappropriate ioctl for device
NvMMLiteOpen : Block : BlockType = 4 
===== MSENC =====
NvMMLiteBlockCreate : Block : BlockType = 4 
875967048
842091865
create vidoe encoder return true
CONSUMER: Waiting until producer is connected...
PRODUCER: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.
(NvOdmDevice) Error IoctlFailed:  (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function allocateBuffers(), line 768)
(NvOdmDevice) Error IoctlFailed:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function enableStreamingConfiguration(), line 1730)
(NvOdmDevice) Error BadParameter: enableStreamingConfiguration FAILED (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorBase.cpp, function writeMode(), line 291)
(NvOdmDevice) Error BadParameter:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function apply(), line 154)
(NvOdmDevice) Error BadParameter: Sensor mode has not been configured! (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function apply(), line 184)
libv4l2: error turning on stream: Invalid argument
(NvOdmDevice) Error IoctlFailed:  (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function streamControl(), line 1163)
(NvOdmDevice) Error IoctlFailed:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function apply(), line 186)
libv4l2: error turning on stream: Invalid argument
(NvOdmDevice) Error IoctlFailed:  (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function streamControl(), line 1163)
(NvOdmDevice) Error IoctlFailed:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function apply(), line 186)
libv4l2: error turning on stream: Invalid argument
(NvOdmDevice) Error IoctlFailed:  (in dvs/git/dirty/git-master_linux/camera-partner/imager/src/V4L2Device.cpp, function streamControl(), line 1163)
(NvOdmDevice) Error IoctlFailed:  (propagating from dvs/git/dirty/git-master_linux/camera-partner/imager/src/devices/V4L2SensorViCsi.cpp, function apply(), line 186)
SCF: Error Timeout:  (propagating from src/services/autocontrol/NvCameraIspDriver.cpp, function programIsp(), line 1199)
SCF: Error Timeout:  (propagating from src/services/autocontrol/NvCameraIspDriver.cpp, function programIsp(), line 1241)
SCF: Error Timeout:  (propagating from src/services/capture/CaptureServiceCore.cpp, function programIsp(), line 321)
SCF: Error Timeout:  (propagating from src/services/capture/CaptureServiceCore.cpp, function doCSItoISPCapture(), line 446)
SCF: Error Timeout:  (propagating from src/services/capture/CaptureServiceCore.cpp, function issueCapture(), line 344)
SCF: Error Timeout:  (propagating from src/services/capture/CaptureServiceDevice.cpp, function issueCaptures(), line 1190)
SCF: Error Timeout:  (propagating from src/services/capture/CaptureServiceDevice.cpp, function issueCaptures(), line 1042)
SCF: Error Timeout:  (propagating from src/services/capture/CaptureServiceEvent.cpp, function wait(), line 59)
Error: Camera HwEvents wait, this may indicate a hardware timeout occured,abort current/incoming cc
launchCC abort cc 104
SCF: Error Timeout:  (propagating from src/api/Session.cpp, function capture(), line 750)
(Argus) Error Timeout: Failed to submit first capture request (propagating from src/api/CaptureSessionImpl.cpp, function submitCaptureRequests(), line 301)
(Argus) Error Timeout:  (propagating from src/api/CaptureSessionImpl.cpp, function threadFunction(), line 741)
SCF: Error Timeout: ISP Stats timed out! (in src/services/capture/CaptureServiceDeviceIsp.cpp, function waitIspStatsFinished(), line 746)
Error: waitCsiFrameStart timeout guid 0
VI Stream Id = 2 Virtual Channel = 0
************VI Debug Registers**********
VI_CSIMUX_STAT_FRAME_8	 = 0x00000000
VI_CSIMUX_FRAME_STATUS_0	 = 0x00000000
VI_CFG_INTERRUPT_STATUS_0	 = 0x3f000000
VI_ISPBUFA_ERROR_0	 = 0x00000000
VI_FMLITE_ERROR_0	 = 0x00000000
VI_NOTIFY_ERROR_0	 = 0x00000000
*****************************************
CSI Stream Id = 2 Brick Id = 1
************CSI Debug Registers**********
NVCSI_PHY_0_CILA_INTR_STATUS_CILA_0	 = 0x00000000
NVCSI_PHY_0_CILB_INTR_STATUS_CILB_0	 = 0x00000000
NVCSI_STREAM_0_INTR_STATUS_0	 = 0x00000000
NVCSI_STREAM_0_INTR_STATUS_0	 = 0x00000000
NVCSI_STREAM_0_ERR_INTR_STATUS_0	 = 0x00000000
NVCSI_STREAM_0_ERROR_STATUS2VI_VC0_0	 = 0x9f80bf00
NVCSI_STREAM_0_ERROR_STATUS2VI_VC1_0	 = 0x00000000
NVCSI_STREAM_0_ERROR_STATUS2VI_VC2_0	 = 0x00000000
NVCSI_STREAM_0_ERROR_STATUS2VI_VC3_0	 = 0x00000000
*****************************************
Error: waitCsiFrameStart Something went wrong with waiting on frame start
SCF: Error Timeout: ISP port 0 timed out! (in src/services/capture/CaptureServiceDeviceIsp.cpp, function waitIspFrameEnd(), line 663)
SCF: Error Timeout:  (propagating from src/services/capture/CaptureServiceDeviceIsp.cpp, function waitIspFrameEnd(), line 704)
SCF: Error Timeout:  (propagating from src/common/Utils.cpp, function workerThread(), line 113)
SCF: Error Timeout: Worker thread IspHw frameComplete failed (in src/common/Utils.cpp, function workerThread(), line 130)
SCF: Error Timeout: ISP Stats timed out! (in src/services/capture/CaptureServiceDeviceIsp.cpp, function waitIspStatsFinished(), line 746)

Could you give me some suggestions?Thank you in advance.

Hi, we don’t observe the issue. Does it happen every time? Do you run it with another camera, not onboard ov5693?