Skip to content
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

Installation HELP!! #12958

Closed
sai-srinivasan-v opened this issue May 24, 2024 · 68 comments
Closed

Installation HELP!! #12958

sai-srinivasan-v opened this issue May 24, 2024 · 68 comments

Comments

@sai-srinivasan-v
Copy link

  • Before opening a new issue, we wanted to provide you with some useful suggestions (Click "Preview" above for a better view):

  • All users are welcomed to report bugs, ask questions, suggest or request enhancements and generally feel free to open new issue, even if they haven't followed any of the suggestions above :)


Required Info
Camera Model { L515}
Firmware Version (-)
Operating System & Version {LINUX(ubuntu)
Kernel Version (Linux Only) (6.8.0-31-generic)
Platform PC
SDK Version { 2.0}
Language {python}
Segment {Robot/Smartphone/VR/AR/others }

Issue Description

Hello, Ive been trying to install and have the L515 camera up and running for the entire day. I have installed the source code from https://github.com/IntelRealSense/librealsense/releases/tag/v2.47.0 if there is someone that can help me install and have this camera running id be extremely grateful.

@MartyG-RealSense
Copy link
Collaborator

Hi @sai-srinivasan-v Could you first try unplugging the micro-sized end of the USB cable from the base of the L515 camera, reversing the connector's orientation and plugging it back into the camera, please (USB-C cables are two-way insertion at the micro-sized end). Does doing so make any difference?

@sai-srinivasan-v
Copy link
Author

Hi @MartyG-RealSense I have done that. The camera is now being read when i enter 'lsusb'. Whats next?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented May 24, 2024

Is the camera also able to be read if you use the command rs-enumerate-devices -s

If it is, can you then run the RealSense Viewer tool with the command realsense-viewer

@sai-srinivasan-v
Copy link
Author

'rs-enumerate-devices -s' returns No device detected. Is it plugged in?

@MartyG-RealSense
Copy link
Collaborator

Thank you. Which method did you use to build the 2.47.0 SDK from source code?

@sai-srinivasan-v
Copy link
Author

I cloned it from 'https://github.com/IntelRealSense/librealsense.git' and then
2. 'sudo ./scripts/setup_udev_rules.sh && sudo apt install -y cmake pkg-config libusb-1.0-0-dev libglfw3-dev'
3. mkdir build && cd build
4. cmake ..
5. sudo make install
6 . ./bin/rs-enumerate-devices
During 6 i keep getting an error that says build does not have /bin
I would be happy to follow a new set of instructions from scratch if you can guide me

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented May 24, 2024

If it was cloned from https://github.com/IntelRealSense/librealsense.git then it would be installing the current latest 2.55.1 version of the SDK and not 2.47.0. Support for the L515 was removed in 2.55.1 because it is a retired camera model.

You would instead need to obtain the source code for version 2.54.2 or older from the SDK releases archive page as a .zip file at the link below and then extract the zipped librealsense folder and follow the same CMake installation process above from step 2 onwards.

https://github.com/IntelRealSense/librealsense/releases

Example programs and tools would be located in the usr/local/bin folder of Linux once the SDK has successfully been built. But to install them, you need to include certain flags in the CMake build instruction. I recommend the one below.

cmake ../ -DFORCE_RSUSB_BACKEND=true -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=true

After that, use the sudo install command below:

sudo make uninstall && make clean && make && sudo make install

A guide can be found at #9931 (comment)

@sai-srinivasan-v
Copy link
Author

Hi @MartyG-RealSense I followed the guide and this is what i see.
Screenshot 2024-05-24 at 9 04 15 PM

@MartyG-RealSense
Copy link
Collaborator

The -j value in the 'make' command, such as make -j8, can cause a random crash when building on some computing devices. You can test whether the j-value is the cause by leaving it out and just using 'make', though the SDK will take longer to build.

sudo make uninstall && make clean && make && sudo make install

@sai-srinivasan-v
Copy link
Author

I tried. But i still see the errors or warnings scattered here and there is that ok? If so, what next?

@sai-srinivasan-v
Copy link
Author

Hi @MartyG-RealSense?

@MartyG-RealSense
Copy link
Collaborator

Thanks very much for your patience.

As you are using kernel 6.8, does that mean that you are using the new Ubuntu 24.04? If you are using 24.04 then the most recent Ubuntu and kernel versions currently supported by the RealSense SDK are Ubuntu 22.04 and kernel 6.5.

In theory, using the RSUSB = true installation method should mean that the SDK is not dependent on particular Linux versions or kernel versions. At the time of writing this though there have not yet been reports of other RealSense users using 24.04 and kernel 6.8, so it is not yet known if there is something in 24.04 that might cause problems with installation of the SDK.

@sai-srinivasan-v
Copy link
Author

I also have a M2 Mac. Could you help me with that instead? @MartyG-RealSense

@MartyG-RealSense
Copy link
Collaborator

Installation on an Apple Silicon Mac is currently more difficult than on Linux because RealSense cameras are having issues with recent MacOS versions such as Ventura and Sonoma (RealSense has not officially supported Mac since 2018). The last MacOS version that RealSense has been able to work with is Monterey - please see #10676 (comment)

A RealSense user did recently succeed in getting the camera working in Asahi Linux in a VM on an Apple Silicon Mac and shared an instruction guide.

https://github.com/HasanTheSyrian/librealsense-hasan/blob/master/doc/installation_asahi.md

@sai-srinivasan-v
Copy link
Author

So if i were to run it on ubuntu (which is comparatively easier) id have to downgrade my kernel?
If so what version should i downgrade it to?

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented May 25, 2024

6.5 is currently the newest supported kernel version in SDK 2.55.1. However, if you were aiming to build SDK version 2.47 then the most recently supported kernel would likely be the older 5.4 and the newest supported Ubuntu version 20.04.

If the SDK is built from source code with the -DFORCE_RSUSB_BACKEND=TRUE flag included in the CMake build instruction though then the Linux version or kernel version being should should not matter, as an RSUSB build of the SDK bypasses the kernel and is not dependent on a particular Linux version or kernel version.

@sai-srinivasan-v
Copy link
Author

sai-srinivasan-v commented May 25, 2024

I think i will install SDK 2.54.2 like you mentioned earlier. I have an Ubuntu 22.04.4 booted on UTM. Can i follow the instructions on https://github.com/HasanTheSyrian/librealsense-hasan/blob/master/doc/installation_asahi.md ? If its something different please let me know and assistance would be helpful.

@MartyG-RealSense
Copy link
Collaborator

SDK 2.54.2 is compatible with 22.04.

If you encounter a problem when using the guide then I would recommend posting a comment to HasanTheSyrian at #12503 as they created the guide.

@sai-srinivasan-v
Copy link
Author

I can also reach out to him through this thread right?

@MartyG-RealSense
Copy link
Collaborator

If you put @ in front of HasanTheSyrian then you would tag him into this discussion, yes.

@sai-srinivasan-v
Copy link
Author

after entering 'cmake ../ -DFORCE_RSUSB_BACKEND=true -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=true'

I get the error message:

-- The CXX compiler identification is unknown
-- The C compiler identification is GNU 11.4.0
CMake Error at CMakeLists.txt:3 (project):
No CMAKE_CXX_COMPILER could be found.

Tell CMake where to find the compiler by setting either the environment
variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
to the compiler, or to the compiler name if it is in the PATH.

-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring incomplete, errors occurred!

@MartyG-RealSense @HasanTheSyrian Please Help!

@MartyG-RealSense
Copy link
Collaborator

@HasanTheSyrian I would clarify that @sai-srinivasan-v is attempting to use your Asahi Linux installation guide on their M2 Mac.

@sai-srinivasan-v
Copy link
Author

NO @MartyG-RealSense I am using an ubuntu 22.04. I apologise for any confusion that i may have caused.

@sai-srinivasan-v
Copy link
Author

I would also like to let you know that i have fixed the error it threw 2 responses earlier.

@MartyG-RealSense
Copy link
Collaborator

Okay, no problem @sai-srinivasan-v - thanks very much for clarifying my clarification. :)

@sai-srinivasan-v
Copy link
Author

This is what i see after

cmake ../ -DFORCE_RSUSB_BACKEND=true -DCMAKE_BUILD_TYPE=release -DBUILD_EXAMPLES=true -DBUILD_GRAPHICAL_EXAMPLES=true
Screenshot 2024-05-25 at 4 34 11 PM

@MartyG-RealSense
Copy link
Collaborator

The config.h error has been reported in the past with librealsense builds. A RealSense user at #6436 (comment) posts the solution that worked for them, which involves using the command sudo apt-get install libusb-1.0-0-dev before building the SDK.

@HasanTheSyrian
Copy link
Contributor

I think i will install SDK 2.54.2 like you mentioned earlier. I have an Ubuntu 22.04.4 booted on UTM. Can i follow the instructions on https://github.com/HasanTheSyrian/librealsense-hasan/blob/master/doc/installation_asahi.md ? If its something different please let me know and assistance would be helpful.

Docs clearly advise not using VMs

@sai-srinivasan-v
Copy link
Author

Hey @HasanTheSyrian , I'm sorry to keep bothering you i believe these are the libraries?
Screenshot 2024-05-25 at 5 53 10 PM

@sai-srinivasan-v
Copy link
Author

sai-srinivasan-v commented May 25, 2024

make[2]: *** [examples/software-device/CMakeFiles/rs-software-device.dir/build.make:103: examples/software-device/rs-software-device] Error 1

should i be going into these directories? @HasanTheSyrian @MartyG-RealSense

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented May 25, 2024

I don't know. I assume that the error is occurring because of the -DBUILD_EXAMPLES=true flag which tells CMake to build the RealSense example programs, including the rs-software-device example.

@HasanTheSyrian
Copy link
Contributor

Hey @HasanTheSyrian , I'm sorry to keep bothering you i believe these are the libraries? Screenshot 2024-05-25 at 5 53 10 PM

Yes. Look inside example.hpp itself. Also, try ignoring these files if you're not going to use that specific example. I don't know how to make CMake do that.

@sai-srinivasan-v
Copy link
Author

this is the example.hpp file. what next? @HasanTheSyrian
Screenshot 2024-05-25 at 6 25 38 PM

@HasanTheSyrian
Copy link
Contributor

Also, try ignoring these files if you're not going to use that specific example. I don't know how to make CMake do that.

@sai-srinivasan-v
Copy link
Author

Okay i'll ignore it then. i also do not have the realsense viewer.

@sai-srinivasan-v
Copy link
Author

Hi @MartyG-RealSense i somehow brought it to this. but when i try launching realsense-viewer it returns 'command not found'
Screenshot 2024-05-25 at 9 35 59 PM

@sai-srinivasan-v
Copy link
Author

Hi @MartyG-RealSense i got into realsense-viewer but i still cannot connect my camera
Screenshot 2024-05-25 at 9 42 00 PM

@sai-srinivasan-v
Copy link
Author

hi @MartyG-RealSense and @HasanTheSyrian i got the camera to work. Thank you guys so much.

@sai-srinivasan-v
Copy link
Author

Feel free to close this thread

@MartyG-RealSense
Copy link
Collaborator

That's excellent news, @sai-srinivasan-v - thanks very much for the update!

@HasanTheSyrian - thanks so much again for your time and generosity in giving advice to @sai-srinivasan-v :)

@sai-srinivasan-v
Copy link
Author

Hey @MartyG-RealSense I had some of my friends try to install the Realsense Viewer and even i couldnt help them out. I would like to request you to make an updated step by step tutorial for anyone thats facing this difficulty. Please do the needful.

@MartyG-RealSense
Copy link
Collaborator

One of my Intel RealSense colleagues is looking at the problems of installation on Apple Silicon 'M' models of Mac to see whether an instruction guide is possible. There is not news to report about this effort at the time of writing this though.

@sai-srinivasan-v
Copy link
Author

Hey Marty! I hope you're doing good. I got the camera to work except now when i try to open the realsense viewer it threw a segmentation error. And also i have a python script that uses pyrealsense 2 though i can read the camera through the rs-enumerate-devices command the python script does not detect the device.

@MartyG-RealSense
Copy link
Collaborator

This segmentation error with realsense-viewer on MacOS is something that other RealSense users with Apple Silicon Macs have experienced. There is not currently a known solution for this.

At #9916 (comment) a user said "I can run the realsense-viewer from the terminal with sudo, once I add the app manually to the accessibility tab in system preferences/security".

A RealSense user created a pre-built version of the pyrealsense2 wrapper for Mac at #9687 though it has been reported to have problems with recent MacOS versions such as Ventura and Sonoma.

@sai-srinivasan-v
Copy link
Author

These are all issues that are from an Ubuntu Machine.

@MartyG-RealSense
Copy link
Collaborator

You have an M2 Mac but were attempting to use Ubuntu or Asahi Linux earlier in this discussion. Was it MacOS that you are having the realsense-viewer segmentation error and Python non-detection of the camera on, please?

@sai-srinivasan-v
Copy link
Author

sai-srinivasan-v commented Jun 21, 2024

True. But I got it to work on Ubuntu(UTM) and things were fine. And then Realsense threw a segmentation error. Everything i discussed here happened on an Ubuntu Machine running on UTM. I quit trying to install real sense on my Mac.

@MartyG-RealSense
Copy link
Collaborator

I researched the history of segmentation errors in realsense-viewer on Ubuntu. In almost all cases there was no solution, unfortunately. The one user who claimed that they found a solution said that they closed down the Ubuntu terminal (which can be done by selecting Exit) and then restarted the terminal (you can open a terminal with the Ctrl+Alt+T keyboard shortcut). Then they input the realsense-viewer command to launch it.

@sai-srinivasan-v
Copy link
Author

Yeah that simply launches realsense and it does not detect the camera. Also i tried running the python script as a root user and received pipeline = rs.pipeline()
AttributeError: module 'pyrealsense2' has no attribute 'pipeline'
Can you please help me fix this?

@sai-srinivasan-v
Copy link
Author

I moved it into the python directory inside wrappers and it works fine. Are there programs that are written by other users that i can use though? @MartyG-RealSense

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Jun 22, 2024

I'm pleased to hear that you achieved a solution!

The Python wrapper has a range of example programs at the link below.

https://github.com/IntelRealSense/librealsense/tree/master/wrappers/python/examples

There are many Python scripts created by RealSense users. The easiest way to find them is to perform a web search that starts with the term librealsense python and add the name of the feature that you want a script for on the end of the search. You will get the most relevant results if you place the subject word in quotation marks. For example, librealsense python "laser power"

@OxO-7
Copy link

OxO-7 commented Sep 2, 2024

One of my Intel RealSense colleagues is looking at the problems of installation on Apple Silicon 'M' models of Mac to see whether an instruction guide is possible. There is not news to report about this effort at the time of writing this though.

Is there any relevant progress recently? I use a MacBook with m2, but the last problem remains:failed to set power state.Thanks a lot!

@MartyG-RealSense
Copy link
Collaborator

Hi @OxO-7 My Intel RealSense developer colleague who has been looking at Mac support will update me once they find a solution for Apple Silicon support. There is not further news at present. I will ask them about it.

@OxO-7
Copy link

OxO-7 commented Sep 3, 2024

Hi@MartyG-RealSense. Is Asahi the only way right now? I am confused. #12972 M processor and macos-14 are mentioned here, compilation issues are resolved but can't use realsense on macos-14?

@MartyG-RealSense
Copy link
Collaborator

The 2.55.1 version of librealsense was released in April 2024, before the changes in #12972 were merged into the SDK on May 29 2024.

The MacOS 14 changes are in the current latest 2.56.1 librealsense version, as confirmed in 2.56.1's release notes.

image

2.56.1 is currently an 'interim beta' release which can only be installed by source code compilation. It sounds as though this will not be a problem for you though as you have already performed a compilation.

https://github.com/IntelRealSense/librealsense/releases/tag/v2.56.1

@OxO-7
Copy link

OxO-7 commented Sep 3, 2024

Thank you very much!

@MartyG-RealSense
Copy link
Collaborator

You are very welcome! Further information regarding the Mac support updates in 2.56.1 can be found at #9916 (comment)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants