RobotWebTools / rosbridge_suite

Server Implementations of the rosbridge v2 Protocol
https://robotwebtools.github.io
BSD 3-Clause "New" or "Revised" License
897 stars 514 forks source link

Huge delay between server and client #889

Open jesusramondovale opened 10 months ago

jesusramondovale commented 10 months ago

I'm using a DEBIX SBC, connected through a switch to a Windows laptop running a web client. I want to communicate quickly the /tf_baselink topic to the web client.

I'm using rosbridge_websocket (on server side) and roslibjs (client side)

Steps To Reproduce This is my JavaScript client:

var tfListener = new ROSLIB.Topic({
  ros: ros,
  name: '/tf_baselink',
  messageType: 'geometry_msgs/msg/TransformStamped',
  queue_size: 1
});

tfListener.subscribe(function (message) {
  console.log("New tf received!");
  console.log("X: " + message.transform.translation.x + ", Y: ", message.transform.translation.y);
}

Expected Behavior I want to see the updated values on the web client with a minimum delay of 1-2 secs

Actual Behavior I'm seeing the values on web client with 20-30 seconds of delay with respect to the ros2 topic echo value on server machine. So I know its not a publisher problem