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

problem about compiling librealsense #9838

Closed
flyover-26 opened this issue Oct 8, 2021 · 36 comments
Closed

problem about compiling librealsense #9838

flyover-26 opened this issue Oct 8, 2021 · 36 comments

Comments

@flyover-26
Copy link

hi! I use xavier agx with jetpack 4.2(L4T 32.1)

When I finish flashing agx with ./buildpatchedkernel,I start to run ./installlibrealsense.

An error occur like this.
IMG_20211008_195236

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Oct 8, 2021

Hi @flyover-26 In a previous occurrence of this error in #4614 a RealSense team member advised that it can occur if an internet connection is not detected. Can you confirm whether the computer that you are building on has an active internet connection, please?

An internet connection is listed as a prerequisite in Intel's official Jetson instructions for installing from source code with CMake.

https://dev.intelrealsense.com/docs/nvidia-jetson-tx2-installation#section-building-from-source-using-native-backend

It is also worth noting that Intel's installation instructions state that the oldest JetPack version that has been verified for use in installation on AGX is JetPack 4.2.3 [L4T 32.2.1,32.2.3], whilst you are using JetPack 4.2(L4T 32.1).

It looks though as if you are using the JetsonHacks installation method as you mention the script ./installlibrealsense. Is that correct?

https://github.com/jetsonhacks/installRealSenseSDK

@flyover-26
Copy link
Author

thank you!
yes !I use JetsonHacks installation method.I do not use SDK method since my version is to old.I use method below.
https://github.com/jetsonhacks/buildLibrealsense2Xavier

I notice that this is for librealsene v2.20.0

In buildpatchedkernal.sh I see LIBREALSENSE_VERSION=v2.20.0,but in installLibrealsense.sh it is LIBREALSENSE_VERSION=v2.17.0.

Could you tell me which version I got at last?

Actually I want to use v2.24.0,so I change LIBREALSENSE_VERSION=v2.17.0 in installLibrealsense.sh to LIBREALSENSE_VERSION=v2.24.0.And the error occur.

But when I change it to LIBREALSENSE_VERSION=v2.20.0,it can be complied succcessfully.But I do not whether the red line has any effect.
Uploading IMG_20211008_215642.jpg…

The point is that I want to use v2.24.0~

@flyover-26
Copy link
Author

Uploading IMG_20211008_215642.jpg…

1 similar comment
@flyover-26
Copy link
Author

Uploading IMG_20211008_215642.jpg…

@flyover-26
Copy link
Author

Uploading 1633701977665.jpg…

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Oct 8, 2021

The BuildLibrealsense2Xavier guide from JetsonHacks for SDK version 2.2.20 and L4T 32.1.0 (JetPack 4.2) is over three years old. In December 2019, the guide added a note saying that it recommended instead using the faster installation method in the link below, which was compatible with SDK 2.23.0 onwards.

https://github.com/jetsonhacks/installRealSenseSDK

The most recent update to that guide at the time of writing this states that using this alternative method will install librealsense version 2.49.0. It says that this update was tested with L4T 32.6.1, JetPack 4.6.

https://github.com/jetsonhacks/installRealSenseSDK#september-2021


If you need to use SDK 2.24.0 specifically with your Jetson and cannot use a more modern SDK version, one solution - though more complex than the JetsonHacks method - may be to download the source code for 2.24.0 and then build it using CMake.

Librealsense 2.24.0 source code

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

image

I note though that the JetsonHacks guide suggests that it can install a specific version of librealsense from source code if yu specify the version number that you want to install, so it may be worth trying that approach first.

https://github.com/jetsonhacks/installRealSenseSDK#buildlibrealsensesh

@flyover-26
Copy link
Author

Thank you so much for your help!

Once I also want to use SDK method,but it notes that it only supprot specific version.
(November, 2019

Initial release
Release vL4T32.2.1
Jetson Nano, Jetson TX1, Jetson TX2, Jetson AGX Xavier
L4T 32.2.1, JetPack 4.2.2, Kernel 4.9
librealsense version v2.30.0)

My version is AGX Xavier with jetpack4.2 and L4T32.1.0 while it only support jetpack 4.2.2 and L4T32.2.1 onwards.
Unfortunately,I can not change AGX's version for some reasons~~

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Oct 9, 2021

Nvidia has an SDK Manager tool that supports JetPack installation on AGX. The tool does though require a host computer running Ubuntu. Are you able to try updating JetPack on your AGX with this tool please?

https://developer.nvidia.com/nvidia-sdk-manager

image

@flyover-26
Copy link
Author

yes!But I do not plan to update,because I need this version~
that is also why I want to solve problem under jetpack4.2~

@MartyG-RealSense
Copy link
Collaborator

Whilst the earliest JetPack version that Intel tested successfully with in their Jetson instructions was 4.2.2, it does not state either that 4.2 can not work.

Let's look again at the suggested reason in #9838 (comment) for the error that you experienced, which was an internet connection not being detected. Can you confirm whether you had an active, working internet connection at the time that you attempted installation please?

@MartyG-RealSense
Copy link
Collaborator

Hi @flyover-26 Do you require further assistance with this case, please? Thanks!

@flyover-26
Copy link
Author

Thank you!
I notice that the log said some problems about internet connection.
it's like this.
IMG_20211016_192754
but I recompile for sever times.I still get the same error.
thank your for your reply!

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Oct 16, 2021

A couple of RealSense team members provide advice about the No internet connection, disabling IMPORT_DEPTH_CAM_FW error at #6346 (comment)

They advise trying the following actions:

  1. Alter the CMake build terms if building librealsense from source code.
  2. Check network proxy settings.

In the case linked to above, adding the -DBUILD_WITH_TM2=false flag worked for the RealSense user in that case.

If you are still using the JetsonHacks guide as your installation method then I would recommend checking the network proxy settings first.

A Jetson Nano user also had the same problem in #5114 (comment) and reported that it worked once they used a robust VPN.

@flyover-26
Copy link
Author

thanks.
I recompile for several times.
sometimes I got an error like this.it seems no internet connection error appears.
Uploading IMG_20211017_112737.jpg…

@flyover-26
Copy link
Author

IMG_20211017_112737

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Oct 17, 2021

A RealSense team member advises in #5469 (comment) that the DOWNLOAD HASH mismatch error can mean that a file was inaccessible, perhaps because of internet proxies, a firewall or lack of an internet connection.

As the log states Internet connection identified, this suggests that the internet connection is not absent and it is instead perhaps an issue related to the connection that is preventing download, such as the aforementioned proxies or a firewall.

Though bearing in mind that you want to use the old 2.24.0 librealsense version, I wonder whether the CMakeLists.txt file in SDK 2.24.0 is trying to use http web links during building to download files, like the one that #5469 (comment) mentions. In March 2021 though, Intel switched to secure https links, and the old http links became broken. This resulted in problems for installation methods that were based on the old install procedure.

@flyover-26
Copy link
Author

Thank you so much for your helping.
This is the CMakeLists.txt file.

cmake_minimum_required(VERSION 3.1.3)

project(uvc_fw)

file(READ "firmware-version.h" ver)

message(STATUS "Fetching recommended firmwares:")

string(REGEX MATCH "D4XX_RECOMMENDED_FIRMWARE_VERSION "([0-9]+.[0-9]+.[0-9]+.[0-9]+)"" _ ${ver})
set(D4XX_FW_VERSION ${CMAKE_MATCH_1})
message(STATUS "D4XX_FW_VERSION: ${D4XX_FW_VERSION}")
set(D4XX_FW_SHA1 0f91ab8cce99e845c1dc9c270bbbefb12a6b1521)
set(D4XX_FW_URL "http://realsense-hw-public.s3-eu-west-1.amazonaws.com/Releases/RS4xx/FW")

string(REGEX MATCH "SR3XX_RECOMMENDED_FIRMWARE_VERSION "([0-9]+.[0-9]+.[0-9]+.[0-9]+)"" _ ${ver})
set(SR3XX_FW_VERSION ${CMAKE_MATCH_1})
message(STATUS "SR3XX_FW_VERSION: ${SR3XX_FW_VERSION}")
set(SR3XX_FW_SHA1 ddc6d015ee3ec46f5e5587cc5ca17d343654ce85)
set(SR3XX_FW_URL "http://realsense-hw-public.s3-eu-west-1.amazonaws.com/Releases/SR300/FW")

add_library(${PROJECT_NAME} STATIC empty.c)

It seems you are right!However how can I fix this problem?
thank you a lot!

Actually,I download a docker images which have been made in 2019 and this image needs camera to run .
But when I connect camera on agx,docker said it can not find divices(the version of librealsense is v2.24.0,realsense ros is V 2.2.7.I find realsense ros v2.2.7 only support for ubuntu16.04,but in this docker images,it is 18.04 and the author tested it succssefully).I do not know why,so I plan to download the same version librealsense on agx itself to trouble shoot a problem.And I got an error below.
librealsense

@MartyG-RealSense
Copy link
Collaborator

It looks as though the modern version of this CMakeLists.txt file at common/fw/CMakeLists.txt specifies the URL as a variable called REALSENSE_FIRMWARE_URL instead of providing the full URL path to the firmware.

https://github.com/IntelRealSense/librealsense/blob/master/common/fw/CMakeLists.txt#L18

Rather than editing this CMake file in 2.24.0's source code folder and then building librealsense with this adjusted file, a RealSense user in #5114 (comment) suggests that the firmware check can instead be bypassed by using the CMake build instruction -DINTERNET_CONNECTION=0

Another RealSense user sets -DINTERNET_CONNECTION to Off instead of 0 in https://issues.guix.gnu.org/49970

image

In regard to the DS5 group_devices is empty error message, a RealSense user using (at the time) old SDK and ROS wrapper versions found that updating their camera firmware resolved the issue. The recommended firmware driver for SDK 2.24.0 is 5.11.6.250. It may be preferable though to use 5.12.7.100 as that is the final firmware version before using newer firmwares required a minimum SDK version of 2.39.0.

@flyover-26
Copy link
Author

THANK YOU !
However,I still get the same error.
Do you have other method?

Unfortunately,my xavier agx can not detect camera still.
Actually,the author suggest I flash the tx2 with https://github.com/bramtoula/buildLibrealsense2AndBatmanTX2.git.(this project is runned on TX2).
But I use xavier agx,so I do not use his buildpatchedkernel.sh. in /buildLibrealsense2AndBatmanTX2.git
Instead,I use .sh in https://github.com/jetsonhacks/buildLibrealsense2Xavier to flash my agx's kernel.
Do you think this will be the reason for not detecting the camera.
thank you for your reply!

@MartyG-RealSense
Copy link
Collaborator

I cannot see a mention in this case of which RealSense camera model you are using.

If you have a D455 and are using SDK 2.24.0, support for the D455 (a later camera model than D415 and D435 / D435i) was not added until SDK 2.38.1 and so the D455 would not be usable with 2.24.0.

@MartyG-RealSense
Copy link
Collaborator

Hi @flyover-26 Do you require further assistance with this case, please? Thanks!

@flyover-26
Copy link
Author

Hi!
Thank you for your helping.
I use d435i.

You told me firmware check can instead by using the CMake build instruction -DINTERNET_CONNECTION=0.
So I add this like below.(ps:it is the last build instruction)
cmake ../ -DBUILD_EXAMPLES=true -DBUILD_WITH_CUDA=false -DUSE_CUDA=false -DINTERNET_CONNECTION
If what I did is true,I still get the same error.And I have no idea how to solve it.Could you provide me with other methods?thank you so much.

I compile this on xavier agx and use "./InstallLibrealsense" to do this.
(https://github.com/bramtoula/buildLibrealsense2AndBatmanTX2/blob/master/installLibrealsense.sh)
I do not kown whether other steps will effect this error.

@MartyG-RealSense
Copy link
Collaborator

You said that you were able to set LIBREALSENSE_VERSION to v2.20.0 successfully but not v2.24.0. Are you able to build if you try version numbers either side of 2.24.0 (v2.23.0 or v2.26.0)

@flyover-26
Copy link
Author

HI!
librealsense v2.23.0 can be compiled successfully,but it can not detect my camera.
I am not sure whether this is the same problem as V2.24.0.

In this website,I found V2.24.0 do not support d435i but d435.
https://dev.intelrealsense.com/docs/firmware-releases
realsense

At the same time,I change several versions of fireware .V2.23.0 can not detecte my d435i either.

1.V2.23.0 can be successfully.Is this related to V2.24.0?
2.v2.23.0 can not detect my camera.Is this related to the version of camera(d435 or d435i)?

Thank you for your reply!

1 similar comment
@flyover-26
Copy link
Author

HI!
librealsense v2.23.0 can be compiled successfully,but it can not detect my camera.
I am not sure whether this is the same problem as V2.24.0.

In this website,I found V2.24.0 do not support d435i but d435.
https://dev.intelrealsense.com/docs/firmware-releases
realsense

At the same time,I change several versions of fireware .V2.23.0 can not detecte my d435i either.

1.V2.23.0 can be successfully.Is this related to V2.24.0?
2.v2.23.0 can not detect my camera.Is this related to the version of camera(d435 or d435i)?

Thank you for your reply!

@MartyG-RealSense
Copy link
Collaborator

2.23.0 does support D435i. The recommended firmware for 2.23.0 is 5.11.6.250

@flyover-26
Copy link
Author

hi!
V2.26.0 even V2.25.0 can be compiled successfully.
I found in /common/fw/CMakelists.txt,the only diffenrence between V2.24.0 and V2.25.0 is a parameter called SR3XX_FW_SHA1.
But I do not think this will lead to the errorrI got before,which told me #include /common/fw/D4XX_FW_Image.h:no such a file.

What confuses me is that when V2.25.0 is compiled successfully ,I can not find D4XX_FW_Image.h in /common/fw under V2.25.0 either.(Because i think if V2.25.0 can be compiled ,then I can find this file which V2.24.0 can not find)

thanks for help!

@MartyG-RealSense
Copy link
Collaborator

SR3XX would not be relevant to your situation because it refers to firmware for the old RealSense SR300 camera model, not the more recent 400 Series models.

You mentioned that 2.25.0 compiled successfully despite the error. Are you able to use the SDK and run programs such as the RealSense Viewer? If so then the D4XX_FW_Image.h error during compilation could likely be ignored if it does not result in a termination of the build process.

@flyover-26
Copy link
Author

sorry,my bad.
2.25.0 can be compile successfully with no error .And it does not result in a termination of the build process although it does not have D4XX_FW_Image.h.
However, for v2.24.0,the build process would be interrupted due to the lack of D4XX_FW_Image.h.

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Oct 31, 2021

If 2.25.0 builds successfully with no errors, can it be used with the JetPack 4.2(L4T 32.1) that you have to use? If 2.25.0 works fine with your JetPack version, is it therefore possible for you to just ignore the build warning about D4XX_FW_Image.h and use the RealSense SDK as normal?

@flyover-26
Copy link
Author

But I want to use V2.24.0 in stead of 2.25.0 which can not be compiled successfully due to D4XX_FW_Image.h~
The reason why I have to use v2.24.0 is I want to know whether this version can detect d435i ~

@MartyG-RealSense
Copy link
Collaborator

I researched your question from the point of view of the version release notes to see if there was an addition to 2.25.0 that could account for the D435i being detected in it but not in 2.24.0. There was a reported problem with D435i camera detection in 2.24.0 that Intel fixed in 2.25.0, as described in #4350 and #4360

@MartyG-RealSense
Copy link
Collaborator

Hi @flyover-26 Do you have an update about this case that you can provide, please? Thanks!

@MartyG-RealSense
Copy link
Collaborator

Hi @flyover-26 Do you require further assistance with this case, please? Thanks!

@MartyG-RealSense
Copy link
Collaborator

MartyG-RealSense commented Nov 11, 2021

Bearing in mind that you mentioned earlier in this case that you use Docker, the new 2.50.0 version of librealsense released today includes a Docker tutorial with details of how to build a Docker file locally.

https://github.com/IntelRealSense/librealsense/tree/master/scripts/Docker

2.50.0 is available from here:

https://github.com/IntelRealSense/librealsense/wiki/Release-Notes#release-2500

@MartyG-RealSense
Copy link
Collaborator

Case closed due to no further comments received.

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

2 participants