Issues with Xavier NX and Raspberry Pi Camera v2 integration

Hi,

I recently setup a new Xavier NX, following the directions in the getting started guide. I’ve also attached a Raspberry Pi Camera V2, as outlined in several tutorials and Paul McWhorter’s YouTube series on the Xavier NX. However, no amount of research and troubleshooting has allowed me to get the camera functioning.

If I try to test the camera using gst-launch-1.0 nvarguscamerasrc ! nvoverlaysink, I get the following output in the terminal, but nothing else -

Setting pipeline to PAUSED ...
Pipeline is live and does not need PREROLL ...
Setting pipeline to PLAYING ...
New clock: GstSystemClock
GST_ARGUS: Creating output stream
CONSUMER: Waiting until producer is connected...
GST_ARGUS: Available Sensor modes :
GST_ARGUS: 3264 x 2464 FR = 21.000000 fps Duration = 47619048 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 3264 x 1848 FR = 28.000001 fps Duration = 35714284 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1920 x 1080 FR = 29.999999 fps Duration = 33333334 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 59.999999 fps Duration = 16666667 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: 1280 x 720 FR = 120.000005 fps Duration = 8333333 ; Analog Gain range min 1.000000, max 10.625000; Exposure Range min 13000, max 683709000;

GST_ARGUS: Running with following settings:
   Camera index = 0 
   Camera mode  = 2 
   Output Stream W = 1920 H = 1080 
   seconds to Run    = 0 
   Frame Rate = 29.999999 
GST_ARGUS: Setup Complete, Starting captures for 0 seconds
GST_ARGUS: Starting repeat capture requests.
CONSUMER: Producer has connected; continuing.

The YouTube series offers this code example:

import cv2

print(f'The cv2 library version is {cv2.__version__}')

stream = cv2.VideoCapture('/dev/video0')
while True:
    _, frame = stream.read()
    cv2.imshow('Xavier NX Camera', frame)
    if cv2.waitKey(1) == ord('q'):
        break

stream.release()
cv2.destroyAllWindows()

However, when I run it from the terminal, the result is rather frustrating -

$ python3 open_cv_1.py 
The cv2 library version is 4.1.1

I’ve flashed the SD card for my unit twice now - attempting once with the latest JetPack v4.5 and now on the previous release version v4.4.1. I’m not able to get any of the examples to work. There seems to be very few resources available to help troubleshoot scenarios such as mine. I’d like to think I’m a fairly moderately developer, but this experience on the Xavier NX has been absolutely maddening.

On another note, I don’t know if it’s evidence of a faulty unit or setup, but I’m also experiencing a massive amount of keyboard lag on the device (I’m using a Das Keyboard that hasn’t presented any issues in either MacOs or Windows).

I’d really appreciate any help.

There is no update from you for a period, assuming this is not an issue any more.
Hence we are closing this topic. If need further support, please open a new one.
Thanks

Did you connect HDMI display?
The gst-launch command looks like running without any error.