Getting camera data

classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Getting camera data

Amanda Whitbrook
Hi,

I am trying to get data from the CameraProxy object
when running my program in Stage. I realise this is
probably something to do with the FillData method, but
I'm not sure how to use it. The arguments are
(player_msghdr_t hdr, const char *buffer), but I can't
find any example codes that use the CameraProxy object
so I'm not sure what these mean or how to use them to
get data.

Also once I have data how do I get this onto screen as
a moving image?

Please keep replies fairly low tech as I am very new
at this! Thanks

"Milo"


               
___________________________________________________________
How much free photo storage do you get? Store your holiday
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Playerstage-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-users
Reply | Threaded
Open this post in threaded view
|

Re: Getting camera data

Richard vaughan

On 5-Oct-05, at 6:31 AM, Amanda Whitbrook wrote:

Hi,

I am trying to get data from the CameraProxy object
when running my program in Stage. I realise this is
probably something to do with the FillData method, but
I'm not sure how to use it. The arguments are
(player_msghdr_t hdr, const char *buffer), but I can't
find any example codes that use the CameraProxy object
so I'm not sure what these mean or how to use them to
get data. 

Also once I have data how do I get this onto screen as
a moving image?

Please keep replies fairly low tech as I am very new
at this! Thanks

Stage doesn't simulate a camera, so you can't use a camera proxy. If you need simulated images, Gazebo is the choice for you.

Also, as a user you never need to call FillData(). Calling Read() on the client does it for you on all proxies.

Richard/

"Milo" 


        
___________________________________________________________ 
How much free photo storage do you get? Store your holiday 
snaps for FREE with Yahoo! Photos http://uk.photos.yahoo.com


-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
_______________________________________________
Playerstage-users mailing list


--
Richard Vaughan
School of Computing Science / Simon Fraser University


we 
Reply | Threaded
Open this post in threaded view
|

Re: Getting camera data

Doug Blank
On Wed, 2005-10-05 at 08:15 -0700, Richard vaughan wrote:

> Stage doesn't simulate a camera, so you can't use a camera proxy. If
> you need simulated images, Gazebo is the choice for you.
>

We have written a blobcamera interface that takes the output of the
blobfinder and turns it into a pixel-based camera. It isn't a Player
device (resides in our memory-mapped Python/C++ code layer), but the
idea might be used to build such a beast in Player. For many types of
experiments, it is a nice approximation to a camera, without having to
resort to Gazebo. Of course, the Gazebo-rendered camera views are a
beautiful thing to behold!

Here is the C++ code that takes blobfinder data and turns it into a
pixel-based camera field:

http://compscitest.brynmawr.edu/cgi-bin/viewcvs.cgi/pyrobot/camera/blob/Blob.cpp?rev=1.1&content-type=text/vnd.viewcvs-markup

and here is the calling code, in Python:

http://compscitest.brynmawr.edu/cgi-bin/viewcvs.cgi/pyrobot/camera/blob/__init__.py?rev=1.13&content-type=text/vnd.viewcvs-markup

If you were interested in turning this into a Player device, we would
use it in our Pyro project, and I would help write and test it. I would
like to turn all of our ad hoc "devices" into Player devices over time
(including a Python-based Stage-like simulator---makes adding new
elements to the simulator very easy, if not fast).

-Doug

> Richard/

> --
> Richard Vaughan
> School of Computing Science / Simon Fraser University





-------------------------------------------------------
This SF.Net email is sponsored by:
Power Architecture Resource Center: Free content, downloads, discussions,
and more. http://solutions.newsforge.com/ibmarch.tmpl
_______________________________________________
Playerstage-users mailing list
[hidden email]
https://lists.sourceforge.net/lists/listinfo/playerstage-users