-
Notifications
You must be signed in to change notification settings - Fork 4.8k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
GL-ERROR with VNC Viewer #9755
Comments
Hi @didi1150 This distortion effect in the RealSense Viewer is very rare but has been reported to have occurred on Raspberry Pi 3 in the past in #7533 It is thought to be related to a lack of memory in the texture atlas. The above link provides a couple of suggestions for correcting the problem. The RealSense user in that particular case chose to resolve the problem by upgrading to a Pi 4B instead. First though, you could check whether the issue on your particular Pi is being caused by the Font Samples setting of the Viewer being set to its maximum value of '8' instead of its default value of '2', as described in #7479 (comment) |
I tried setting it to 2, but it still is blurred the same way |
Does the same effect occur if launching the Viewer directly on the Pi instead of through a VNC Viewer connection? |
hmm lemme check |
yes it is still bugged |
Ive edited the model-views.cpp file, but I dont know how to rebuild |
A RealSense user in #7450 (comment) who had this distortion problem on Pi indicates that you can use the make instruction to rebuild. |
So I have to do make -j1 and sudo make install? |
You just do the 'make' instruction in the build folder. |
I still dont understand. What do you mean by make instruction? |
make is a CMake build instruction. Are you familiar with how CMake works, please? |
cmake .. -DBUILD_EXAMPLES=true -DCMAKE_BUILD_TYPE=Release -DFORCE_LIBUVC=true |
Please input the word make into the Ubuntu terminal when you are in the build folder. |
im on raspbian |
I tried it with make and it still didnt work |
Im now trying with cmake before that |
Does my micro SD card have anything to do with my problem? |
Once a Raspberry Pi runs out of memory space then it can use a swapfile to use space on the storage as slower 'virtual memory'. Sometimes, increasing the size of the swapfile may therefore improve performance of an application. https://www.bitpi.co/2015/02/11/how-to-change-raspberry-pis-swapfile-size-on-rasbian/ |
I increased the sawpfile alreeady |
To recap, the known solutions for this problem with distortion of the Viewer's graphics are one of the actions below:
You have tried changing the Font Samples and editing model-views.cpp. Have you tried editing the configuration file located at ~/.realsense-config.json as described in #4558 (comment) |
yes I have tried that too |
The four methods listed above are the only solutions known so far for this Viewer graphics corruption problem. The only remaining untried option on the list is to upgrade to the Pi 4. You could also try switching to the Viewer's fullscreen mode and back again to see whether it clears the problem. You can do this by pressing the F8 keyboard key whilst the Viewer is open to go to fullscreen mode, and press F8 again to go back to normal sized view. |
No it is still bugged |
'Edit the configuration file located at ~/.realsense-config.json' |
Okay ive tried that again, it still doesnt work |
GL CALLBACK: ** GL ERROR ** type = 0x824c, severity = 0x9146, message = GL_INVALID_VALUE in glTexImage2D(invalid width=4096 or height=512 or depth=1) |
I only know of one previous occurrence of that GL error in the RealSense Viewer in #8705 and it did not suggest a solution. I conducted extensive research about this Viewer distortion but could not find any options other than the four listed above, of which changing to a Pi 4 is the only one that has not been attempted. Let's instead look at the possibility that there is a problem in the librealsense SDK installation on your Pi. Which method did you use to install the SDK on Raspbian OS on your Pi 3B+, please? |
I followed the tutorial by acrobotic: https://www.youtube.com/watch?v=LBIBUntnxp8&t=166s |
why are there black areas/mist all over the place? And the cam is also veryyyy slow. I was expecting maybe 30 fps but it is 1 fps |
Would it be possible to provide an image of the black areas and mist that you are seeing, please? |
first one is 3d, second one is 2d |
25/09 12:21:13,554 WARNING [2866795584] (messenger-libusb.cpp:42) control_transfer returned error, index: 768, error: No data available, number: 61 And also these errors |
Is the camera looking at objects that are dark grey or black? If so, a general physics principle for depth cameras (not just RealSense) is that dark grey and black colors absorb light. This makes it hard for the camera to read depth detail from such surfaces unless they have a strong light-source on them. Black surfaces may therefore appear to be rendered on the image but are actually plain black empty areas with no depth detail. The darker the shade, the harder it is for light to be reflected. An example is depth-sensing a black cable. It may appear on the image to be rendered as a black cable but is actually a cable-shaped empty area (an effect very similar to your second depth image above). |
ok.... |
how do I add scripts or code to the camera? any good beginner tutorials you would recommend? Because I can only find intermediate tutorials |
If you are going to be programming in C++ but are not using Visual Studio then the Getting Started guide at the link below may be helpful. https://github.com/zivsha/librealsense/tree/getting_started_example/examples/getting-started If you are using Python then there is the SDK's Tutorial 1 example Python program. |
Hi @didi1150 Do you require further assistance with this case, please? Thanks! |
My cam is still showing black mist, even if I have have a light shining onto an object, it is still being displayed as black mist if it is not white @MartyG-RealSense |
For example if im holding my hand towards the cam, everything around it is turned black |
And all these tutorials dont explaine one thing: How do I setup the coding environment? And do I need to code on my computer or the raspberry pi? And if I'm writing everything on my pc, how do I export the code to the raspberry? Also none of these tutorials seem to be made for visual studio
This doesn't explain how to write code yourself. |
Can you confirm which programming language you are using so that I can find compatible guides for you, please. Thanks! |
C# |
There is a limited amount of references for C# at the introductory level, unfortunately. For installing the C# wrapper on Windows and setting up a first application in Visual Studio, a RealSense user shared a very good guide that they created at #5022 I am not aware of any beginner-level references for doing so on Raspberry Pi. Intel provide a starter script called Hello World. https://dev.intelrealsense.com/docs/csharp-wrapper#section-hello-world Further examples of pieces of C# code can be found in Intel's C# Cookbook page. https://github.com/IntelRealSense/librealsense/blob/master/wrappers/csharp/Documentation/cookbook.md |
ok... maybe a guide for C++ with the whole setup thing, because I dont want to use an aspect that only has limited tutorials |
I mean C/C++ guide for setting up the environment and creating projects @MartyG-RealSense |
Ok I have followed this tutorial https://github.com/IntelRealSense/librealsense/tree/master/wrappers/csharp to setup my workspace, but how do I create a project? Do I modify the realsense2.sln file or do I need to create a new project? |
The C# wrapper documentation says that once the realsense2.sln file has been built in the build folder then you can open the file with Visual Studio, and C# examples and library will be available in the solution under Wrappers/csharp. The link below suggests a Step 2 to perform after the sln file has been opened in Visual Studio. https://stackoverflow.com/questions/51248121/vs2017-linking-realsense-camera/51963781#51963781 |
I have a question, once I have written a file, how do I transfer it to the raspberry pi? Just copy paste? |
It does not look as though it is as straightforward as copy and paste, though the link below has a good guide for a method of transferring a C# Visual Studio project from a PC to Raspberry Pi. https://tutorials-raspberrypi.com/write-raspberry-pi-gui-apps-c-sharp-dot-net/ Another guide suggests using the main computer such as a PC to host the code and connecting remotely via Visual Studio Code to the Pi to run the code as though it is on the Pi. https://www.raspberrypi.org/blog/coding-on-raspberry-pi-remotely-with-visual-studio-code/ |
ok how much easier would it be to do everything with python and pycharm? |
You could certainly develop a RealSense application with PyCharm, and pyrealsense2 is a bit more straightforward to program than C#. The Python wrapper also does not have many beginner level references though. C++ is the most well-supported for availability of such guides. |
ye, but python is more supported on the raspberrypi than C I think |
At its most basic level, creating a runnable Python script is very simple because you can write the script in a simple text editor program (creating your own script or pasting an existing one into the text editor) and then save it as a .txt file with a name that has the extension .py on the end, such as 'test.py'. The saved text file should then be recognized as a Python script file. That script can then be launched with a text command in the Python interface with |
Hi @didi1150 Do you require further assistance with this case, please? Thanks! |
Case closed due to no further comments received. |
| Camera Model | { D400 } |
| Operating System & Version | Raspbian OS |
| Platform | Raspberry Pi 3b+ |
Issue Description
I am using VNC Viewer to open the realsense app, according to this tutorial
https://www.youtube.com/watch?v=LBIBUntnxp8&t=166s
But when I run the command realsense-viewer, it opens, and every text in the programm is blurred and pixelated. Why is it this way? I have done everything exactly as in the tutorial.
And I also get the error:
GL CALLBACK: ** GL ERROR ** type = 0x824c, severity = 0x9146, message = GL_INVALID_VALUE in glTexImage2D(invalid width=4096 or height=512 or depth=1)
The text was updated successfully, but these errors were encountered: