ROS with Raspberry Pi: Improving Image Streaming Performance

Step 1: Camera Connection

Oct 12 18:21:00 ubuntu ROS[3633]: [ INFO] [1634062852.905999083]: Device with port number 2-1 was found.
Oct 12 18:21:00 ubuntu ROS[3633]: [ INFO] [1634062852.906064100]: Device USB type: 2.0
Oct 12 18:21:00 ubuntu ROS[3633]: [ INFO] [1634062852.906121599]: Warning, expect lower performance
[  382.569703] usb 1-1.1: new high-speed USB device number 3 using xhci_hcd
[ 382.671057] usb 1-1.1: New USB device found, idVendor=8086, idProduct=0b07, bcdDevice=50.ce
[ 382.671077] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[ 382.671096] usb 1-1.1: Product: Intel(R) RealSense(TM) Depth Camera 435
[ 382.671112] usb 1-1.1: Manufacturer: Intel(R) RealSense(TM) Depth Camera 435
[ 382.742153] uvcvideo: Unknown video format 00000050-0000-0010-8000-00aa00389b71
[ 382.742349] uvcvideo: Found UVC 1.50 device Intel(R) RealSense(TM) Depth Camera 435 (8086:0b07)
[ 382.744851] input: Intel(R) RealSense(TM) Depth Ca as /devices/platform/scb/fd500000.pcie/pci0000:00/0000:00:00.0/0000:01:00.0/usb1/1-1/1-1.1/1-1.1:1.0/input/input0
[ 382.745253] uvcvideo: Found UVC 1.50 device Intel(R) RealSense(TM) Depth Camera 435 (8086:0b07)
[ 382.747894] usbcore: registered new interface driver uvcvideo
[ 382.747901] USB Video Class driver (1.1.1)
Bus 002 Device 001: ID 1d6b:0003 Linux Foundation 3.0 root hub
Bus 001 Device 003: ID 8086:0b07 Intel Corp.
Bus 001 Device 002: ID 2109:3431 VIA Labs, Inc. Hub
Bus 001 Device 001: ID 1d6b:0002 Linux Foundation 2.0 root hub
Oct 12 18:21:00 ubuntu ROS[3633]: [ INFO] [1634062852.325630073]: Initializing nodelet with 4 worker threads.
Oct 12 18:21:00 ubuntu ROS[3633]: [ INFO] [1634062852.644655742]: RealSense ROS v2.2.21
...
Oct 12 18:21:00 ubuntu ROS[3633]: [ INFO] [1634062852.904735999]: Device with physical ID 2-1-4 was found.
Oct 12 18:21:00 ubuntu ROS[3633]: [ INFO] [1634062852.904770313]: Device with name Intel RealSense D435 was found.
Oct 12 18:21:00 ubuntu ROS[3633]: [ INFO] [1634062852.905999083]: Device with port number 2-1 was found.
Oct 12 18:21:00 ubuntu ROS[3633]: [ INFO] [1634062852.906064100]: Device USB type: 3.2

Step 2: Node Parametrization

# Hardware Setup
Sender: Raspberry Pi 4
Receiver: Linux Workstation
# Software & Frameworks
OS: Ubuntu Server/Focal 20.04
Ros Noetic 1.5.0-1focal.20210922.213755
Realsense SDK v2.41
Realsense Ros 2.2.21

Step 3: Traffic Shaping with Topic Tools

  • Nodes publish topics width the full specified frequency and as much bandwidth as possible even if no subscriber exists
  • Each node has a maximum bandwidth available, and if too many topics are published, the bandwidth drops similarly

Relay Nodes

rosrun topic_tools relay /camera/depth/color/points /camera/depth/color/points_rey

Throttle Nodes

rosrun topic_tools throttle messsages $TOPIC 3.0
rosrun topic_tools throttle bytes $TOPIC 2048

Step 4: Use Compressed Data

Conclusion

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sebastian

Sebastian

IT Project Manager & Developer