ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

rosbridge (v1) suffers video delay over mjpeg_server

asked 2013-05-04 17:18:48 -0600

Pi Robot gravatar image

updated 2013-05-06 15:53:41 -0600

Hello,

I'm running a rosbridge Version 1 application to teleop a robot (Pi Robot) over a wireless-g network. Everything works great except that the video stream (320x240 resolution from a Asus Xtion) always develops a noticeable delay within the first few minutes after loading the HTML5/rosbridge interface. Refreshing the web page always clears the delay for another few minutes until it creeps in again.

I never get the delay if I view just the video stream in a browser window using the mjpeg URL (http://192.168.0.193:8080/stream?topic=/camera/rgb/image_color). I only get the delay when I run the full rosbridge application which uses the same mjpeg URL.

My rosbridge application can be seen here but it's a work in progress.

Does anyone know a fix for this delay issue? And if it can't be fixed in Version 1 of rosbridge, does anyone know if it is fixed in Version 2? (I have a time crunch for this project so I have been putting off the transition.)

Thanks!
patrick

UPDATE: So I finally took the time to convert my rosbridge application to the Version 2 protocol and was sad to find that the delays with the video stream are even worse than with Version 1. I tried my application under both Fuerte and Groovy with the appropriate Debian rosbridge packages (rosbridge_suite for Fuerte and rosbridge_server for Groovy) and both gave much worse results than using rosbridge v1. In fact, the video stream tended to freeze up entirely every 15-30 seconds. Going back to the rosbridge v1 of my application produced immediately better results with the exact same hardware setup. Very odd.

edit retag flag offensive close merge delete

Comments

What browser(s) are you using and is the same freezing observed when you view the mjpeg stream directly?

SL Remy gravatar image SL Remy  ( 2013-06-18 12:30:04 -0600 )edit

1 Answer

Sort by ยป oldest newest most voted
0

answered 2013-05-07 10:32:25 -0600

rtoris288 gravatar image

Can you please clarify your issue? Image streams are fed over mjpeg_server which is separate from rosbridge entirely. It runs independent of rosbridge and on a different port/protocol. Are you attempting to feed image streams over rosbridge?

Depending on how much data you are sending to the browser, this could also slow down the image processing as well inside of the browser.

Your example code also appears to be feeding in the image stream into a Kinetic object which is probably attempting to buffer your stream. This is the library doing this, not rosbridge.

As a side note, check out http://ros.org/wiki/mjpegcanvasjs for a JavaScript implementation to display mjpeg_server streams in a canvas.

edit flag offensive delete link more

Comments

Thanks @rtoris. You are right that I am conflating mjpeg_server, rosbridge and Kinetic. I have used mjpegcanvasjs on its own and it streams nicely. But there are layering aspects of Kinetic that I use. I will update my question with additional tests when I get a chance.

Pi Robot gravatar image Pi Robot  ( 2013-05-08 03:34:29 -0600 )edit

Question Tools

1 follower

Stats

Asked: 2013-05-04 17:18:48 -0600

Seen: 1,277 times

Last updated: May 07 '13