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:
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.
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
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.