Thank you for the answer Sarah.<br>It works but not so as i want.<br><br>First of all i have problems with the setting params for mjpeg_server as it has written in tutorial: <br><pre><a href="http://localhost:8080/stream?topic=/gscam/image_raw" target="_blank">http://localhost:8080/stream?topic=/<span>gscam/image_raw</span></a>&width=320&height=240<br>
<br>Now i see only 640*480 picture with very big delay in local network.<br>Also i tried to set params in gscam (using GSCAM_CONFIG) but it didn't help<br>(like <span><b class="highlight">GSCAM_CONFIG</b>="v4l2src device=/dev/video0 ! videoscale !<br>
</span><span>video/x-raw-yuv,width=320,height=240 ! ffmpegcolorspace !<br></span><span>video/x-raw-rgb")<br></span><br><br>And also i have some other questions<br>Is gscam better for publish images then another image_transport modules?<br>
Is combination gscam and mjpeg_server is the best decision for decrease the delays between robot and<br> offboard computer?<br><br>Also if you could put up a tutorial for another way to show video from robot to web using rosjs <br>
it will be very good.<br><br>And the last question: what is the best way to transmit audio from ROS to offboard computer?<br><br>Thank you!<br></pre><br><div class="gmail_quote">2011/6/9 Osentoski Sarah (CR/RTC1.1-NA) <span dir="ltr"><<a href="mailto:Sarah.Osentoski@us.bosch.com">Sarah.Osentoski@us.bosch.com</a>></span><br>
<blockquote class="gmail_quote" style="margin: 0pt 0pt 0pt 0.8ex; border-left: 1px solid rgb(204, 204, 204); padding-left: 1ex;">
<div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Hi Alexander,</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">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.</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">1. How to get your camera to be publishing
rostopics:</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">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.</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">The documentation for gscam can be found
here:</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"><a href="http://www.ros.org/wiki/gscam" target="_blank">http://www.ros.org/wiki/gscam</a></font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">And you can download it using apt-get install
ros-diamondback-brown-perception</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">If your camera was attached to /dev/video2 then you coul
ddo the vollowing commands</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="3"><pre>roscd gscam
cd bin
export GSCAM_CONFIG="v4l2src device=/dev/video2 ! video/x-raw-rgb ! ffmpegcolorspace"
rosrun gscam gscam</pre></font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">Now gscam will be publishing the images on gscam/image_raw
topic</font></span></div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div dir="ltr" align="left"><span><font color="#0000ff" face="Arial" size="2">2. How to get the rostopics that your camera publishes to
be viewed on the website:</font></span></div>
<div> </div>
<div><span></span><font face="Arial"><font color="#0000ff"><font size="2">Y<span>ou 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.</span></font></font></font></div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span></span></font></font></font> </div>
<div><font face="Arial"><font color="#0000ff"><font size="2"><span>There is another node, mjpeg_server <a href="http://www.ros.org/wiki/mjpeg_server" target="_blank">http://www.ros.org/wiki/mjpeg_server</a> that
will let you stream the videos and take advantage of built in optimizations in
the browser</span></font></font></font></div>
<div><font color="#0000ff" face="Arial" size="2"></font> </div>
<div><span><font color="#0000ff" face="Arial" size="2">To use
this node you can install it via the following command:</font></span></div>
<div><span><font color="#0000ff" face="Arial" size="2">apt-get install ros-diamondback-remote-lab</font></span></div>
<div><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div><span><font color="#0000ff" face="Arial" size="2">then
just rosrun mjpeg_server mjpeg_server</font></span></div>
<div><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div><span><font color="#0000ff" face="Arial" size="2">To see
the image you can just type the address into your web
browser:</font></span></div>
<div><span><font color="#0000ff" face="Arial" size="2"></font></span> </div><pre><a href="http://localhost:8080/stream?topic=/gscam/image_raw" target="_blank">http://localhost:8080/stream?topic=/<span>gscam/image_raw</span></a></pre>
<div><font color="#0000ff" face="Arial" size="2"></font> </div>
<div><span><font color="#0000ff" face="Arial" size="2">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.</font></span></div>
<div><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div><span><font color="#0000ff" face="Arial" size="2">I hope
this helps. Let us know if you have any questions.</font></span></div>
<div><span><font color="#0000ff" face="Arial" size="2"></font></span> </div>
<div><span><font color="#0000ff" face="Arial" size="2">Sarah
Osentoski</font></span></div>
<div><font color="#0000ff" face="Arial" size="2"></font><br></div>
<div dir="ltr" lang="en-us" align="left">
<hr>
<font face="Tahoma" size="2"><b>From:</b> <a href="mailto:ros-users-bounces@code.ros.org" target="_blank">ros-users-bounces@code.ros.org</a>
[mailto:<a href="mailto:ros-users-bounces@code.ros.org" target="_blank">ros-users-bounces@code.ros.org</a>] <b>On Behalf Of </b>Alexander
Shavykin<br><b>Sent:</b> Wednesday, June 08, 2011 1:43 PM<br><b>To:</b>
<a href="mailto:ros-users@code.ros.org" target="_blank">ros-users@code.ros.org</a><br><b>Subject:</b> [ros-users] show video from robot in
the web interface (based on rosjs tutoirial)<br></font><br></div><div><div></div><div class="h5">
<div></div>Hello.
<div><br></div>
<div>I have an Irobot Create and netbook with web camera on it.</div>
<div>The system on netbook is Ubuntu 10.04</div>
<div>I try to make control the robot with ROS via web interface from offboard
computer using wi-fi.</div>
<div>So there is very good tutorial with rosjs.</div>
<div><br></div>
<div>All examples work.</div>
<div>But i am a little confused how to show video from web camera on the robot
in my web interface.</div>
<div><br></div>
<div>So as i understand there are some methods for this task</div>
<div><br></div>
<div>To use service /imagetopic</div>
<div><span style="font-size: 15px; font-family: courier,monospace;">connection.callService('/rosjs/subscribe',json(['/imagetopic',0,'jpeg',128,96,100]),function(rsp)
{});</span></div>
<div><span style="font-size: 15px; font-family: courier,monospace;">or</span></div>
<div><span style="font-size: 15px; font-family: courier,monospace;">to use
gstreamer </span></div>
<div><span style="font-size: 15px; font-family: courier,monospace;">and also
others.</span></div>
<div><span style="font-size: 15px; font-family: courier,monospace;">I don't understand how
to realize these methods.</span></div>
<div><span style="font-size: 15px; font-family: courier,monospace;">Could you give some
examples how to show the video from the robot in the web interface on off board
computer?</span></div>
<div><span style="font-size: 15px; font-family: courier,monospace;"><br></span></div>
<div><span style="font-size: 15px; font-family: courier,monospace;"><br></span></div>
<div><span style="font-size: 15px; font-family: courier,monospace;">Thank you.</span></div>
<div><span style="font-size: 15px; font-family: courier,monospace;"><br></span></div></div></div></div>
<br>_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
<br></blockquote></div><br>