Reed,
Greatly appreciate your help.

I guess what I don't understand is, how one would be able to use player/stage as a simulator embedded in C code.  From what you say, I don't see what using libstage actually does.  I really just want to be able to run a simulation within existing code with the ability to stop/start/restart the simulation over and over again (optimizing a learning parameter for example).

I really looked hard, but I found only very very minimal description on what exactly libstage as a standalone means/examples etc.

Thanks,
Franklin


On 8/27/07, Reed Hedges <reed@mobilerobots.com> wrote:

If I read correctly, I think you might be misunderstanding how Player works.
Have you read the following documents yet?

Overviews:
http://playerstage.sourceforge.net/wiki/Player
http://playerstage.sourceforge.net/wiki/Stage
http://playerstage.sourceforge.net/doc/Player-2.0.0/player/start.html

Manual:
http://playerstage.sourceforge.net/doc/Player-2.0.0/player/



Franklin Dorbon wrote:
> So suppose I wanted to run some Machine Learning experiments using
> player/stage, this is how I understand my procedure:
>
> 1) Start Player normally.
> 2) Run my libstage code below to connect to the world
> 3) Connect my player clients
> 4) Evaluate the algorithm, learn, etc.
> 5) Disconnect player clients
> 6) Goto 2
>
> Suppose I want to restart the experiment from my libstage code, do I
> need to restart Player?
>
> Should I try to add some libstageplugin code into my main execution loop
> (below) to manage the connect/re-connect?
>
> I really appreciate any further help.
>
> Thanks,
> Franklin
>
>
>
> On 8/27/07, *Reed Hedges* < reed@mobilerobots.com
> <mailto:reed@mobilerobots.com>> wrote:
>
>
>     If you want to connect to Stage with Player client programs, then
>     you must run
>     the Player server with its stage plugin (libstageplugin) loaded.  It
>     is the
>     Player server that provides for clients connecting over TCP, not the
>     standalone
>     libstage library.  The stage plugin to the player server
>     (libstageplugin) is the
>     connector between the Player server and libstage.  libstage by
>     itself contains
>     nothing about connecting to it over a network or other IPC; it is
>     only accessed
>     via local function calls.
>
>     Reed
>
>
>     P.S . I have some patches that expand libstage 2.0.0's API if this
>     is something
>     that anyone is interested in doing, check the patch tracker or email me.
>
>
>
>     Franklin Dorbon wrote:
>      > I am trying to get a standalone player/stage to run using the
>     source code below. However, when I run it I get the message:
>      >
>      >  [Loading BlobfinderExample/simple.world][Include
>     pioneer.inc][Include
>      > map.inc]
>      >
>      > And then the correct world GUI pops up, but any subsequent connection
>      > requests I make via my clients get a "Connection Refused". Do I
>     need to
>      > add more code into my simple main example to be able to connect? (I
>      > don't seem to get a "Connecting to port 6667", loading devices
>     etc. that
>      > I normally get when I run player/stage.)
>      >
>      > Thanks for the help, I am sure player/stage is correctly installed.
>      >
>      > Thanks,
>      > Franklin
>      >
>      >
>      >
>      >
>      >
>      > #include "stage.h"
>      >
>      > int main( int argc, char* argv[] )
>      > {
>      >   stg_init( argc, argv );
>      >
>      >   stg_world_t* world = stg_world_create_from_file( argv[1] );
>      >
>      >   while( (stg_world_update( world,TRUE )==0) )
>      >
>      >     {}
>      >
>      >   stg_world_destroy( world );
>      >
>      >   return 0;
>      > }
>      >
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      >
>     -------------------------------------------------------------------------
>
>      > This SF.net email is sponsored by: Splunk Inc.
>      > Still grepping through log files to find problems?  Stop.
>      > Now Search log events and configuration files using AJAX and a
>     browser.
>      > Download your FREE copy of Splunk now >>   http://get.splunk.com/
>      >
>      >
>      >
>     ------------------------------------------------------------------------
>      >
>      > _______________________________________________
>      > Playerstage-users mailing list
>      > Playerstage-users@lists.sourceforge.net
>     <mailto:Playerstage-users@lists.sourceforge.net>
>      > https://lists.sourceforge.net/lists/listinfo/playerstage-users
>
>
>     -------------------------------------------------------------------------
>     This SF.net email is sponsored by: Splunk Inc.
>     Still grepping through log files to find problems?  Stop.
>     Now Search log events and configuration files using AJAX and a browser.
>     Download your FREE copy of Splunk now >>   http://get.splunk.com/
>     _______________________________________________
>     Playerstage-users mailing list
>     Playerstage-users@lists.sourceforge.net
>     <mailto:Playerstage-users@lists.sourceforge.net>
>     https://lists.sourceforge.net/lists/listinfo/playerstage-users
>     <https://lists.sourceforge.net/lists/listinfo/playerstage-users>
>
>
>
> ------------------------------------------------------------------------
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Splunk Inc.
> Still grepping through log files to find problems?  Stop.
> Now Search log events and configuration files using AJAX and a browser.
> Download your FREE copy of Splunk now >>  http://get.splunk.com/
>
>
> ------------------------------------------------------------------------
>
> _______________________________________________
> Playerstage-users mailing list
> Playerstage-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/playerstage-users


-------------------------------------------------------------------------
This SF.net email is sponsored by: Splunk Inc.
Still grepping through log files to find problems?  Stop.
Now Search log events and configuration files using AJAX and a browser.
Download your FREE copy of Splunk now >>  http://get.splunk.com/
_______________________________________________
Playerstage-users mailing list
Playerstage-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/playerstage-users