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
running with docker #1104
Comments
adding the version: "3"
services:
ros-master:
image: ros:kinetic-ros-core
command: stdbuf -o L roscore
networks:
- ros
restart: always
realsense:
privileged: true
build:
context: ./docker
dockerfile: ros-realsense.dockerfile
environment:
- "ROS_MASTER_URI=http://ros-master:11311"
- "ROS_HOSTNAME=realsense"
devices:
- "/dev:/dev"
networks:
- ros
restart: always
command: roslaunch realsense2_camera rs_camera.launch
networks:
ros:
driver: bridge |
I concur the finding in #1104 (comment). At my work we've been using Realsense driver (both librealsense and realsense2_camera) running within Docker container for more than a year with that. |
Also related (and more active) discussion IntelRealSense/librealsense#3849 |
Hi, Will you be needing further help with this? Was @130s suggestion helpful? If we don’t hear from you in 7 days, this issue will be closed. Thanks |
So just an FYI for future travelers: The following solution also works, although I have to use some bash magic, so I run my docker image using a TL;DR#!/bin/bash
BUS=$(lsusb | grep 8086 | cut -d " " -f 2)
PORT=$(lsusb | grep 8086 | cut -d " " -f 4 | cut -d ":" -f 1)
if [ ! -z "$PORT" ];
docker run \
--volume /dev/bus/usb/$BUS/$PORT:/dev/bus/usb/$BUS/$PORT \
--device-cgroup-rule "c 189:* rmw" \
<a bunch more flags> \
<img_name> ExplanationInstead of mounting the entire Bus 004 Device 002: ID 8086:0b3a Intel Corp. Intel(R) RealSense(TM) Depth Camera 435i You'll find the realsense at To gain read/write access, instead of using the |
I knew nothing about this magic number 189, so for other future travelers like me:
and there is the
Googling "file character special" tells me (emphasis mine) that
That was all I could find out about 189, and I'm kind of satisfied :) If someone has links to more complete information, please feel free to enlighten me (or us). |
I've submitted a pull request to the upsteam librealsense that should allow your original docker-compose to work as-is, without requiring the |
I'm trying to run ros within docker containers, but I'm having issue passing through the realsense hardware paths because they contain colons. Can you reconfigure the device names to not contain colons?
The text was updated successfully, but these errors were encountered: