Thank you for the answer. It works. Now i would like to transmit compressed images. How can i subscribe mjpeg server to topic with compressed or theora images. What should also i write in browser? This string: http://192.168.0.101:8080/stream?topic=/camera/image/compressed?width=320?height=240doesn't work. i got in mjpeg_server -------------------------------- [ WARN] [1307739023.476203425]: [image_transport] It looks like you are trying to subscribe directly to a transport-specific image topic '/camera/image/compressed', in which case you will likely get a connection error. Try subscribing to the base topic '/camera/image' instead with parameter ~image_transport set to 'compressed' (on the command line, _image_transport:=compressed). See http://ros.org/wiki/image_transport for details. -------------------------------- I am a little bit confused. Should i write my owner publisher instead gscam? Thank you. 2011/6/10 Benjamin Pitzer > Hi Alex, > > There is a bug in mjpeg_server which we thought was fixed already. Please > use question marks "?" instead of ampersands "&" to separate the topic, > width, and height parameters. That should fix your resize problem. > > For streaming audio over ROS there is a package available: > http://www.ros.org/wiki/compressed_audio_streaming > > Cheers, > Ben > > > > On Thu, Jun 9, 2011 at 2:55 PM, Alexander Shavykin wrote: > >> Thank you for the answer Sarah. >> It works but not so as i want. >> >> First of all i have problems with the setting params for mjpeg_server as >> it has written in tutorial: >> >> http://localhost:8080/stream?topic=/gscam/image_raw&width=320&height=240 >> >> >> >> Now i see only 640*480 picture with very big delay in local network. >> Also i tried to set params in gscam (using GSCAM_CONFIG) but it didn't help >> (like *GSCAM_CONFIG*="v4l2src device=/dev/video0 ! videoscale ! >> >> >> video/x-raw-yuv,width=320,height=240 ! ffmpegcolorspace ! >> video/x-raw-rgb") >> >> >> And also i have some other questions >> Is gscam better for publish images then another image_transport modules? >> >> >> >> Is combination gscam and mjpeg_server is the best decision for decrease the delays between robot and >> offboard computer? >> >> Also if you could put up a tutorial for another way to show video from robot to web using rosjs >> >> >> >> it will be very good. >> >> And the last question: what is the best way to transmit audio from ROS to offboard computer? >> >> Thank you! >> >> >> 2011/6/9 Osentoski Sarah (CR/RTC1.1-NA) >> >>> Hi Alexander, >>> >>> >>> So, I'm a bit confused about getting the camera to publish topics to ros >>> or getting those topics from ros into the website. So I'll endeavour to >>> answer both. >>> >>> 1. How to get your camera to be publishing rostopics: >>> >>> The first thing to do is to make sure that you get your camera publishing >>> images to ros. There are a lot of different drivers/code you can use but >>> since you mentioned gstreammer I'll explain how to use gscam to get the >>> images from your camera into ROS. >>> >>> The documentation for gscam can be found here: >>> http://www.ros.org/wiki/gscam >>> >>> And you can download it using apt-get install >>> ros-diamondback-brown-perception >>> >>> If your camera was attached to /dev/video2 then you coul ddo the >>> vollowing commands >>> >>> roscd gscam >>> cd bin >>> export GSCAM_CONFIG="v4l2src device=/dev/video2 ! video/x-raw-rgb ! ffmpegcolorspace" >>> rosrun gscam gscam >>> >>> Now gscam will be publishing the images on gscam/image_raw topic >>> >>> 2. How to get the rostopics that your camera publishes to be viewed on >>> the website: >>> >>> You can stream the video to the website one of two ways. The first is >>> how you mentioned where you use rosjs to subscribe to the topic. If you >>> need help with what to do from here we can put up a tutorial. >>> >>> There is another node, mjpeg_server http://www.ros.org/wiki/mjpeg_server that >>> will let you stream the videos and take advantage of built in optimizations >>> in the browser >>> >>> To use this node you can install it via the following command: >>> apt-get install ros-diamondback-remote-lab >>> >>> then just rosrun mjpeg_server mjpeg_server >>> >>> To see the image you can just type the address into your web browser: >>> >>> >>> http://localhost:8080/stream?topic=/gscam/image_raw >>> >>> >>> You should see the image in your browser at this point. The >>> documentation on the mjpeg_server page will tell you parameters you can set >>> to see the images at different quality/sizes. >>> >>> I hope this helps. Let us know if you have any questions. >>> >>> Sarah Osentoski >>> >>> ------------------------------ >>> *From:* ros-users-bounces@code.ros.org [mailto: >>> ros-users-bounces@code.ros.org] *On Behalf Of *Alexander Shavykin >>> *Sent:* Wednesday, June 08, 2011 1:43 PM >>> *To:* ros-users@code.ros.org >>> *Subject:* [ros-users] show video from robot in the web interface (based >>> on rosjs tutoirial) >>> >>> Hello. >>> >>> I have an Irobot Create and netbook with web camera on it. >>> The system on netbook is Ubuntu 10.04 >>> I try to make control the robot with ROS via web interface from offboard >>> computer using wi-fi. >>> So there is very good tutorial with rosjs. >>> >>> All examples work. >>> But i am a little confused how to show video from web camera on the robot >>> in my web interface. >>> >>> So as i understand there are some methods for this task >>> >>> To use service /imagetopic >>> connection.callService('/rosjs/subscribe',json(['/imagetopic',0,'jpeg',128,96,100]),function(rsp) >>> {}); >>> or >>> to use gstreamer >>> and also others. >>> I don't understand how to realize these methods. >>> Could you give some examples how to show the video from the robot in the >>> web interface on off board computer? >>> >>> >>> Thank you. >>> >>> >>> _______________________________________________ >>> ros-users mailing list >>> >>> ros-users@code.ros.org >>> https://code.ros.org/mailman/listinfo/ros-users >>> >>> >> >> _______________________________________________ >> ros-users mailing list >> ros-users@code.ros.org >> https://code.ros.org/mailman/listinfo/ros-users >> >> > > _______________________________________________ > ros-users mailing list > ros-users@code.ros.org > https://code.ros.org/mailman/listinfo/ros-users > >