0
$\begingroup$

steps to reproduce the problem

  1. In the first terminal type: sudo docker run -it --privileged -v /dev:/dev -v /home/mona:/workspace -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY --device /dev/bus/usb ros_noetic
  2. Now, type hostname -I to get the IP of master node. IP
  3. Now, in the same terminal start the master roslaunch realsense2_camera rs_camera.launch align_depth:=true
  4. In a new terminal type: sudo docker run -it --privileged -v /dev:/dev -v /home/mona:/workspace -v /tmp/.X11-unix:/tmp/.X11-unix -e DISPLAY=$DISPLAY --device /dev/bus/usb ros_noetic
  5. Also, in the newly opened terminal, now type: root@046bedc1feb3:/workspace# ROS_MASTER_URI=http://IP:11311
  6. In the newly opened terminal, you should be able to see list of topics via rostopic list
  7. Now, pick one of the topics and make sure it has content: root@046bedc1feb3:/workspace# rostopic echo /camera/aligned_depth_to_color/image_raw
  8. Run this command in the second terminal, and make sure it works. You should see some content posted.
    root@046bedc1feb3:/workspace# rosrun roscpp_tutorials babbler
    [ INFO] [1699477519.602225115]: hello world 0
    [ INFO] [1699477519.702355346]: hello world 1
    [ INFO] [1699477519.802340629]: hello world 2
    [ INFO] [1699477519.902507063]: hello world 3
    [ INFO] [1699477520.002284399]: hello world 4
    [ INFO] [1699477520.102295005]: hello world 5
    [ INFO] [1699477520.202313266]: hello world 6
    [ INFO] [1699477520.302315862]: hello world 7
    [ INFO] [1699477520.402323428]: hello world 8
    [ INFO] [1699477520.502385264]: hello world 9
    [ INFO] [1699477520.602336241]: hello world 10
    [ INFO] [1699477520.702384903]: hello world 11
    [ INFO] [1699477520.802342050]: hello world 12
    [ INFO] [1699477520.902314431]: hello world 13
    [ INFO] [1699477521.002317829]: hello world 14

also, I see this for the docker ps:

(base) mona@ada:~$ docker ps
CONTAINER ID   IMAGE        COMMAND                  CREATED          STATUS          PORTS     NAMES
046bedc1feb3   ros_noetic   "/ros_entrypoint.sh …"   11 minutes ago   Up 11 minutes             frosty_vaughan
93aebfa79986   ros_noetic   "/ros_entrypoint.sh …"   11 minutes ago   Up 11 minutes             amazing_chandrasekhar

Problems:

  1. No content seen after echo:

root@046bedc1feb3:/workspace# rostopic echo /camera/aligned_depth_to_color/image_raw

  1. No image shown in rviz: enter image description here enter image description here enter image description here

  2. no new messages in rostopic hz topic_name:

    root@046bedc1feb3:/workspace# rostopic hz  /camera/aligned_depth_to_color/image_raw
    subscribed to [/camera/aligned_depth_to_color/image_raw]
    no new messages
    no new messages
    no new messages
    no new messages
$\endgroup$

1 Answer 1

1
$\begingroup$

Your rs_camera.launch file is opening a hardware device, and the Intel-supplied code allows only one linux process at a time on the machine to open a particular camera device.

Running the Intel code inside a docker does not let you to escape this limitation.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.