-
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
Getting "terminate called after throwing an instance of 'rs2::backend_error'" error #6940
Comments
The first action I would recommend trying is changing your kernel from 5.4 Generic to 5.4 LTS if possible. The screen rotation question was replied to here: |
Thanks @MartyG-RealSense for the quick reply. |
The main reason for the confusion is that #4818 seems like mainly for Linux (Raspbian Buster) on Raspberry Pi4 while I'm using Ubuntu 18.04 LTS on a laptop (Dell XPS15 with i9 64-bit processor). |
Changing the kernel from 5.4 Generic to 5.4 LTS seems little bit difficult thing so I ran the script mentioned in #4818 (comment), but now, I'm getting the following error: terminate called after throwing an instance of 'rs2::error'
what(): No device connected
Aborted (core dumped) |
Apologies for any confusion. The link was just to illustrate the point that it is preferable to use LTS kernels with librealsense. A non LTS kernel may also work fine and some people may never experience a problem with it but there is a greater element of unpredictability. Also, kernel 5.4 is not yet officially validated for use with librealsense (official support currently goes up to 5.3), adding a further element of unpredictability. |
I had also never heard of the term "i86" before, but research found that it is just a collective term for x86 and x64 processors. |
Thanks for the suggestions. I reinstalled the entire Ubuntu 18.04 LTS and in the beginning, the kernel was 4.15.0-112-generic. Then after reboot somehow it got changed to 5.4.0-42-generic (maybe through previous grub recovery!). I tried removing that 5.4 one but couldn't. However, somehow I found a way to boot my Ubuntu from 5.3.0-28-generic kernel. So, my current session of Ubuntu is running on 5.3. Last time, I had faced multiple problems while installing the SDK using pre-building packages, so, this time, I directly tried backend method i.e. installation.md. But, now, for Reading package lists... Done
Building dependency tree
Reading state information... Done
git is already the newest version (1:2.17.1-1ubuntu0.7).
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
libgtk-3-dev : Depends: libgtk-3-0 (= 3.22.30-1ubuntu1) but 3.22.30-1ubuntu4 is to be installed
Depends: gir1.2-gtk-3.0 (= 3.22.30-1ubuntu1) but 3.22.30-1ubuntu4 is to be installed
Depends: libgdk-pixbuf2.0-dev (>= 2.30.0) but it is not going to be installed
Depends: libpango1.0-dev (>= 1.40.5) but it is not going to be installed
Depends: libatk-bridge2.0-dev but it is not going to be installed
Depends: libcairo2-dev (>= 1.14.0) but it is not going to be installed
Depends: libx11-dev but it is not going to be installed
Depends: libxext-dev but it is not going to be installed
Depends: libxinerama-dev but it is not going to be installed
Depends: libxi-dev but it is not going to be installed
Depends: libxrandr-dev but it is not going to be installed
Depends: libxcursor-dev but it is not going to be installed
Depends: libxfixes-dev but it is not going to be installed
Depends: libxcomposite-dev but it is not going to be installed
Depends: libxdamage-dev but it is not going to be installed
Depends: libegl1-mesa-dev but it is not going to be installed
Depends: libxkbcommon-dev but it is not going to be installed
pkg-config : Depends: dpkg-dev but it is not going to be installed
E: Unable to correct problems, you have held broken packages. What can/should I do now to install the SDK? |
Sincere apologies for the delay in responding further. I have reviewed your case again from the beginning. I note that your installation of librealsense by the "backend" method, whose instructions you provided a link to, is more commonly known as building from source. Whilst doing so by this method has a number of advantages, it also has the disadvantage that you can end up with error messages if the kernel patching process does not go well. There is another installation method that I refer to as backend, and it is performed over an internet connection. Because of the way that it installs dependencies, it is not dependent on Linux versions or kernel versions and does not require patching. The first step in this process is to download the source code of librealsense from the Releases page as a zip file. The source code zip file can always be found in the "Assets" list at the bottom of the information listing for each SDK version on the Releases page. https://github.com/IntelRealSense/librealsense/releases/ After downloading the zip file, its contents should be extracted so that you have a librealsense folder.At this point you can use the RSUSB installation method to install librealsense without dependence on Linux versions or kernel versions and without the need for patching. This makes this installation method particularly suited to Arm devices such as Jetson. The backend installation method requires an internet connection. The steps are:
mkdir build && cd build
cmake ../ -DFORCE_RSUSB_BACKEND=true -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=true If you need to install the PCL bindings at the same time as building librealsense, add this condition to the build statement above: - DBUILD_PCL_EXAMPLES=true |
Hi @milan-r-shah Do you require further support on this case please, or can it be closed? Thanks! |
Hi @MartyG-RealSense , Sincere apology for the late reply. But, I have one more confusion: Apart from this, everything else seems to work fine. But, if I use backend method now, would I able to resolve this problem of manually choosing the kernel? Or there are chances that it would mess my current installation? (Because, last time, first I had tried installing the SDK using pre-built packages and it didn't work. So, then, I had tried installing it from the source. But, later one, every time, while opening |
If you use kernel 5.4 then you will not necessarily encounter problems. It just increases the risk a little that a problem might occur, since it is not officially validated for use with librealsense yet. The RSUSB backend method does build from a source-code folder but it installs dependencies over an internet connection, avoiding the need for patching the source-code build. This can be very useful in situations such as installing librealsense on hardware that is experiencing conflicts with the Linux kernel. There was an earlier installation method called libuvc backend that also uses an internet connection but has a different installation method, so some confusion is understandable. It still works and is still useful in some circumstances. https://github.com/IntelRealSense/librealsense/blob/master/doc/libuvc_installation.md For PC though, I would recommend using the RSUSB backend method described earlier in this discussion. The link below discusses the advantages and disadvantages of using the backend method compared to kernel patching. Scroll down the comment to the section of it headed What are the advantages and disadvantages of using libuvc vs patched kernel modules? RSUSB should be fine for use with a single camera and if your project is not a commercial one. As explained in the advantages / disadvantages information, for a project that will become a commercial product that requires high stability and updatability though or one in which multiple cameras will be used, kernel patching is recommended. There is also a higher risk of time-out errors when using RSUSB. |
Hi @milan-r-shah Do you still require assistance with this case, please? Thanks! |
Hi @MartyG-RealSense , sorry for the late reply. You mentioned that
But, in my case, I have already installed the SDK using building from source method. Last time, I was having certain problems due to 5.4 kernel. So, this time, I have to manually select kernel 5.3. Therefore, now, if I try reinstalling the SDK using RSUSB backend method then would it work? or first I have to uninstall the existing one? However, on the other hand, the project I'm working on is a commercial one so as you explained RSUSB method is not recommended, right? So, basically, right now, building from source is the only option for me, isn't it? |
The instructions for building librealsense in Linux recommend the DKMS distribution packages, with building from source available if there are certain circumstances in the project that require using that installation method instead. https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md |
Hi @milan-r-shah Do you require further assistance with this case, please? Thanks! |
Hi @MartyG-RealSense , After giving you confirmation on this final query, please close this issue. Again, thank you so much @MartyG-RealSense for your time and for addressing all of my queries :) |
You are very welcome @milan-r-shah :) If it is a commercial project that requires stability and reliability then yes, using the kernel patching method would be the recommended action for the reasons described in the advantages / disadvantages section linked to earlier. As you suggested, I will close this case now. As always, feel free to create new issues when you have new questions. Good luck! |
Minimum FW Version --> 05.12.05.00
Issue Description
I have been trying to execute pcl-color example by running the following command:
But, every time, it give this error:
The text was updated successfully, but these errors were encountered: