How do I apply TCP_NODELAY to RosJava connections?

asked 2018-12-13 15:01:34 -0500

Boards gravatar image

I'm using rosjava(0.3.5) on an android system, that is essentially bridging ROS communication to another device. Messages are coming in and going out at 50Hz. The communication from the device to my android system has acceptable latency and jitter, but messages from the ROS master are coming in with a lot more jitter.

My current theory is that Nagle's algorithm is causing the delays, and I want to disable it on the publisher/subscriber node connections created on my android system. Unfortunately I can't work out how to do that with RosJava. There is a ConnectionHeader class that has a TCP_NODELAY option defined, but I don't know how to provide that option to a node. Looking at the code, it don't even find where it's used.

Can anyone offer advice on how to set TCP_NODELAY on the RosJava connections?

edit retag flag offensive close merge delete

Comments

as you wrote: it may be that this is simply not possible (right now) with rosjava. I cannot find any reference to it in this search.

But I'm not sure, so hopefully another board member will prove me/us wrong.

gvdhoorn gravatar image gvdhoorn  ( 2018-12-14 09:06:08 -0500 )edit