GithubHelp home page GithubHelp logo

Comments (11)

RezaOptimotive avatar RezaOptimotive commented on August 27, 2024 1

the source docker file is still building, should be the end of it though.

I'll test this new one right after testing the source container.

from realsense-ros2-docker.

2b-t avatar 2b-t commented on August 27, 2024

Hi @RezaOptimotive
I sadly do not have a Jetson Nano so I can't try myself. Could you try to modify the Dockerfile and replace it with the following (basically removing everything that comes after the step that failed)?

FROM ros:humble-perception

ENV WS_DIR="/ros2_ws"
WORKDIR ${WS_DIR}

SHELL ["/bin/bash", "-c"]

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update -y \
 && apt-get install -y \
    build-essential \
    cmake \
    git-all \
    software-properties-common

# Install dependencies: See https://github.com/IntelRealSense/realsense-ros/tree/ros2-development
# Librealsense: See https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md#installing-the-packages
RUN apt-get update -y \
 && apt-key adv --keyserver keyserver.ubuntu.com --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE \
 && add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main" 
 
 ARG DEBIAN_FRONTEND=dialog

This minimal Docker should now compile as long as you have properly set-up the Nvidia Container Runtime. Then once inside the Docker execute
$ apt-get update
$ apt search librealsense2
and let me know what the output of it is.
In case it does not find any packages still it might as well be that Intel does not provide readily available Debian packages for Arm and Jammy (but it actually should as far as I know). In that case you could try the installation from source Dockerfile. Finally you could also try emulating amd64 as described here.

from realsense-ros2-docker.

RezaOptimotive avatar RezaOptimotive commented on August 27, 2024

This is the output I get:

nano@jetson:~$ docker exec -it docker_realsense_ros2_1 /bin/bash
root@jetson:/ros2_ws# apt update
Hit:1 http://packages.ros.org/ros2/ubuntu jammy InRelease
Hit:2 http://ports.ubuntu.com/ubuntu-ports jammy InRelease                
Hit:3 http://ports.ubuntu.com/ubuntu-ports jammy-updates InRelease        
Hit:4 https://librealsense.intel.com/Debian/apt-repo jammy InRelease
Hit:5 http://ports.ubuntu.com/ubuntu-ports jammy-backports InRelease
Hit:6 http://ports.ubuntu.com/ubuntu-ports jammy-security InRelease
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
4 packages can be upgraded. Run 'apt list --upgradable' to see them.
W: http://packages.ros.org/ros2/ubuntu/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
W: https://librealsense.intel.com/Debian/apt-repo/dists/jammy/InRelease: Key is stored in legacy trusted.gpg keyring (/etc/apt/trusted.gpg), see the DEPRECATION section in apt-key(8) for details.
N: Skipping acquire of configured file 'main/binary-arm64/Packages' as repository 'https://librealsense.intel.com/Debian/apt-repo jammy InRelease' doesn't support architecture 'arm64'
root@jetson:/ros2_ws# apt search librealsense2
Sorting... Done
Full Text Search... Done
ros-humble-librealsense2/jammy 2.51.1-2jammy.20221108.153031 arm64
  Library for controlling and capturing data from the Intel(R) RealSense(TM) D400 devices.

ros-humble-librealsense2-dbgsym/jammy 2.51.1-2jammy.20221108.153031 arm64
  debug symbols for ros-humble-librealsense2

root@jetson:/ros2_ws# 

Next I'll try building from source.

from realsense-ros2-docker.

2b-t avatar 2b-t commented on August 27, 2024

I see, could you try modifying your Dockerfile now as follows:

FROM ros:humble-perception

ENV WS_DIR="/ros2_ws"
WORKDIR ${WS_DIR}

SHELL ["/bin/bash", "-c"]

ARG DEBIAN_FRONTEND=noninteractive

RUN apt-get update -y \
 && apt-get install -y \
    build-essential \
    cmake \
    git-all \
    software-properties-common

# Install dependencies: See https://github.com/IntelRealSense/realsense-ros/tree/ros2-development
# Librealsense: See https://github.com/IntelRealSense/librealsense/blob/master/doc/distribution_linux.md#installing-the-packages
RUN apt-get update -y \
 && apt-key adv --keyserver keyserver.ubuntu.com --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE || apt-key adv --keyserver hkp://keyserver.ubuntu.com:80 --recv-key F6E65AC044F831AC80A06380C8B3A55A6F3EFCDE \
 && add-apt-repository "deb https://librealsense.intel.com/Debian/apt-repo $(lsb_release -cs) main" -u \
 && apt-get update -y \
 && apt-get install -y librealsense2

RUN apt-get update -y \
 && apt-get install -y \
    ros-${ROS_DISTRO}-rviz2 \
    ros-${ROS_DISTRO}-librealsense2 \
 && mkdir src \
 && cd src \
 && git clone https://github.com/IntelRealSense/realsense-ros.git -b ros2-development \
 && cd .. \
 && apt-get install -y python3-rosdep \
 && source /opt/ros/${ROS_DISTRO}/setup.bash \
 && rm /etc/ros/rosdep/sources.list.d/20-default.list \
 && rosdep init \
 && rosdep update \
 && rosdep install -i --from-path src --rosdistro ${ROS_DISTRO} --skip-keys=librealsense2 -y \
 && colcon build

ARG DEBIAN_FRONTEND=dialog

and see if that works?

from realsense-ros2-docker.

2b-t avatar 2b-t commented on August 27, 2024

@RezaOptimotive Excellent, keep me posted. Would be cool if we could make this work for arm64 as well. Was not aware that the packages for arm64 would be different.

from realsense-ros2-docker.

RezaOptimotive avatar RezaOptimotive commented on August 27, 2024

Building from source works great!

Moving on to the latest Dockerfile you sent!

from realsense-ros2-docker.

RezaOptimotive avatar RezaOptimotive commented on August 27, 2024

It gives unable to locate package librealsense2

from realsense-ros2-docker.

2b-t avatar 2b-t commented on August 27, 2024

@RezaOptimotive I see, just saw before that you had the output Skipping acquire of configured file 'main/binary-arm64/Packages' as repository 'https://librealsense.intel.com/Debian/apt-repo jammy InRelease' doesn't support architecture 'arm64'. So their repository in fact does not support arm64. Meaning building from source is your only option.

Have you already tested that it not only builds but you are also able to access the camera with e.g. $ rs-enumerate-devices --compact and visualize the camera stream?

from realsense-ros2-docker.

RezaOptimotive avatar RezaOptimotive commented on August 27, 2024

Yes! rs-enumerate-devices --compact runs successfully.

After that I tested rs-depth and that works as well.

Then I tested running ros2 launch realsense2_camera rs_launch.py pointcloud.enable:=true and the topics are available, however it does not allow me to open rviz2 so I looked up the error:

Unable to create the rendering window

So from this I added -NVIDIA_DRIVER_CAPABILITIES=all to the yaml file yet I still have no success getting the GUI to open.

It might be worth making a new issue for this however if you agree.

from realsense-ros2-docker.

2b-t avatar 2b-t commented on August 27, 2024

Excellent, let's open a separate issue for that (but it should be fairly easy to fix). Let me know in that issue what your set-up is like in more detail (operating system, is a screen attached to the Jetson or are you connecting over ssh?).

from realsense-ros2-docker.

2b-t avatar 2b-t commented on August 27, 2024

Should be resolved in #2 (comment).

from realsense-ros2-docker.

Related Issues (5)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.