Hello all, could someone help me? I have an issue, and searched a lots, but couldn’t find the solution. The issue: I try to run python code with hand_tracking_module on my NVIDIA Jetson Nano board with openCV and Mediapipe. When I run it via terminal or in VSCode work perfect, but when I run it vie myscript.script file in /etc/systemd/system/myservice.service it give errors(I put in commenters ,also the picture).It give same error, when I run vie ssh from my computer. I thing it is something with permission or access to GPU or something like this, but cant find where is or what I have to do. Thank you very much!
The ERROR:
[libprotobuf WARNING external/com_google_protobuf/src/google/protobuf/text_format.cc:324] Warning parsing text-format mediapipe.CalculatorGraphConfig: 125:5: text format contains deprecated field “use_gpu”
WARNING: Logging before InitGoogleLogging() is written to STDERR
I20220123 17:58:16.042357 19329 gl_context_egl.cc:163] Successfully initialized EGL. Major : 1 Minor: 5
W20220123 17:58:16.042462 19329 gl_context_egl.cc:168] Creating a context with OpenGL ES 3 failed: UNKNOWN: ; eglChooseConfig() returned no matching EGL configuration for RGBA8888 D16 ES3 request.
W20220123 17:58:16.042490 19329 gl_context_egl.cc:169] Fall back on OpenGL ES 2.
Traceback (most recent call last):
File “/home/nanorobo/Desktop/Python_projects/autostart.py”, line 240, in
hands = mpHands.Hands()
File “/usr/local/lib/python3.6/dist-packages/mediapipe/python/solutions/hands.py”, line 145, in init
outputs=[‘multi_hand_landmarks’, ‘multi_handedness’])
File “/usr/local/lib/python3.6/dist-packages/mediapipe/python/solution_base.py”, line 254, in init
self._graph.start_run(input_side_packets)
RuntimeError: ; eglChooseConfig() returned no matching EGL configuration for RGBA8888 D16 ES2 request.
SERVICE FILE:
[Unit]
Description=autoroboo: do my own thing
After=multi-user.target
After=graphical.target
Hello, DaneLLL and Thank you very much for the answer! I read the articles and tried in rc-local today by the article info and I think this is not what I looking for. I forgot to write yesterday. I dont want to see what happen in front of my camera, I want the robot to see for the libraries and their work. I dont know if its different.I also use USB web cam. I tried this in /etc/rc.local, but givs only errors:
Hi,
Please simplify autostart.py into a simple test sample and attach it. So that we can set up and run the script to reproduce the issue. Or please check if either sample in
/usr/src/nvidia/graphics_demos/
can be used to reproduce the issue.
We would need a way to reproduce it locally so that can check with our teams.
Hi,
It would need some time to set up and try. Woudl like to know:
Does it run with a USB camera? Seems like there is a camera source since you call cv2.VideoCapture(1).
So it fails in OpenCV code? From the description it seems to be an issue in OpenGL or EGL functions, such as eglChooseConfig(). But the sample is based on OpenCV.
Yes, it is with USB camera. The info about it is above in my commenters.
I am not sure, what exactly is. My knowledges are not so deep , I am reading in google, but until now cant find the solution and where is the problem. I suppose it is from mediapipe condition for working well. Or this converting RGB to BGR or something with graphical permission for service file or something else.
I run all, as I send as information here. Same files, same content.
If I run the python file from my terminal or from my VSCode application, everything works fine. The problem may by came from the autoroboo.service file.