depth_image_raw impossibly slow across machines (wireless)
Hi,
I've spun up realsense2_camera. Depth messages are being produced on the robot's PC without issue. I'm looking to see that output on a remote machine (I've tried both VM and non VM) - for now in RVIZ (later used to drive rtabmap). All other, scan, map, sensor data is fine but depth_image_raw and any other image data is impossibly slow. For example:
rostopic hz /camera/depth/image_rect_raw
yields:
On robot:
average rate: 29.975
min: 0.023s max: 0.044s std dev: 0.00097s window: 19608
On Remote PC
average rate: 0.031
min: 22.248s max: 47.057s std dev: 7.42743s window: 20
Additional Details:
rostopic echo -n1 --noarr /camera/depth/image_rect_raw
header:
seq: 421
stamp:
secs: 1678046085
nsecs: 714776278
frame_id: "camera_depth_optical_frame"
height: 480
width: 848
encoding: "16UC1"
is_bigendian: 0
step: 1696
data: "<array type: uint8, length: 814080>"
---
rostopic type /camera/depth/image_rect_raw
sensor_msgs/Image
So far I've checked the router, WiFi, Network bandwidth and all are fine/well within parameters.
If anyone has any suggestions WRT what else I can check I'd most appreciate it.
Thanks
Mark
that's a good starting point, but without sharing what you found and what conclusions you've drawn based on that data, board members here are only going to be able to guess.
I would suggest to add at least the output of
rostopic type /camera/depth/image_rect_raw
androstopic echo -n1 --noarr /camera/depth/image_rect_raw
to your post.Any
image*raw
topic at any reasonable resolution will result in significant bandwidth usage, which is a common cause for slow message rates.Additionally, since you mention "WiFi": large messages over a regular TCPROS transport over a (very) lossy link may require retransmits of multiple packets (note: not messages). Over time those can add up to a significant delaying factor.
Thanks - I've updated the question with additional info. Checked other various WiFi stats - no dropped packets (noted: re: packets vs messages) . rostopic bw /camera/depth/image_rect_raw shows about 24.5MB/s
WiFi Link is capable (iwconfig) 72.2MB/s
Nothing else on the LAN (Dedicated WiFi router atm for the sake of trouble shooting). I would expect there to be a drop in performance across the network but this seems to just drop off a cliff.
please share the output of
iwconfig
verbatim. If you're looking at therate
field: that's instantaneous, max, theoretical bw configuration. Not actual transfer rate. Sustained, perfect (ie: zero lost pkts) transfer at the data rates you are using is not something I'm accustomed to over a wireless link.I would also check
Mb/s
vsMB/s
. There's a factor 8 difference there (with overhead: about 10x actually), and72 Mb/s
could make sense to me: it's one of the typical wireless datarates supported by cards.As a diagnostic step: if you can, try using a wired connection and see whether the same delays and bw issues appear.
Also: you could try using
(more)iperf
to benchmark actual available bw on your wireless link.Just run iperf in both directions from Robot to PC and back over 60 secs combined average about 34.3Mbits/sec.
iwconfig output:
I'll give hardwire a go in a day or 3