I have a general question regarding usb device performance inside of a docker container.
For context, I have setup a docker image (for deploying containers on an nvidia jetson agx xavier platform) to set up a camera publisher in ros to stream data from a realsense d435i camera plugged into the jetson via USB 3.2. I run this container with the “–privileged” option, as well as mounting the volume dev via “-v /dev:/dev” in the run command and I am able to bring up the node and run pretty reliably @15 fps at the camera’s lowest resolution. Additionally, I am able to view the host stream on a separate host machine and the output looks pretty good.
I am trying to identify potential reasons why I cannot increase the frame-rate or the resolution without causing my ros node to crash. One of the issues, potentially, is the read-rate of my usb device when being read from within a running container. I am new to docker, and I would appreciate any general info and/or links about how running a docker container on a host machine can impact usb performance. Any relevant info would be of great use to me. Thanks!
Hi Joe,
I believe I have a similar setup but I just can’t make the camera work when running the app on Docker. May you help me with this?
Thank in advance
I’m new to docker and would like to use librealsense in a docker container with the T265 camera.
I wrote a Dockerfile for building the library from ubuntu 16.04 :
RUN wget https://github.com/AprilRobotics/apriltag/archive/refs/tags/3.1.1.zip &&\
unzip 3.1.1.zip -d . &&\
mkdir apriltag-build &&\
cd apriltag-build &&\
cmake -DCMAKE_INSTALL_PREFIX=~/apriltag/ ../apriltag-3.1.1 &&\
make install
WORKDIR /librealsense
RUN apt-get install -y libopencv-dev libeigen3-dev libv4l-dev &&\
./scripts/setup_udev_rules.sh && mkdir build && cd /librealsense/build &&\
cmake ../ -DCMAKE_PREFIX_PATH=~/apriltag -DBUILD_EXAMPLES=true -DCMAKE_BUILD_TYPE=release -DFORCE_RSUSB_BACKEND=true \
&& make uninstall && make clean && make -j4 && make install \
&& apt-get update && apt-get upgrade -y
I will have to connect the USB but now there is another problem.
I try to use apriltag but when compiling my cpp file, it say :
root@546f61c80766:/librealsense/examples/pose-apriltag# ls
CMakeLists.txt rs-pose-apriltag.cpp
root@546f61c80766:/librealsense/examples/pose-apriltag# g++ -o rs-pose-apriltag rs-pose-apriltag.cpp
rs-pose-apriltag.cpp:12:22: fatal error: apriltag.h: No such file or directory
#include "apriltag.h"
^
compilation terminated.
And what is the problem with the USB drive? This topic is about “USB device read-rate degradation”. Do you have the same problem? If you have problem with USB and Docker but not the same as this topic is about, please, create a new topic for that and tell us more about the issue.
It looks like a C++ cpmpilation problem not related to Docker. If you disagree, please, create a new for this too.
No I don’t have a “problem” with USB, and you are probably right, it is not about “USB device read-rate degradation”.
And yes the C++ problem is not related to Docker.
I was just benefiting of this topic.