From: Davian <dav...@ho...> - 2007-03-20 13:30:25
|
Hello everyone: If I want to use Player to control Roomba with Stage simulating, how can I do first? What I know is modify *.cfg and *.world files. Although I have found many *.cfg, *.world and *.inc sample files in /usr/local/share/stage/world/* But I don't know how to create the roomba-like device interfaces. Somone can help me to fugure out this problem? Thanks~ -- View this message in context: http://www.nabble.com/Simulating-the-Roomba-device-with-Stage-tf3433700.html#a9572451 Sent from the playerstage-users mailing list archive at Nabble.com. |
From: fscMoc <ag...@fl...> - 2007-03-21 02:19:46
|
Hello, I have been using the roomba driver for my simulations. It took me a while to figure out how things went together. I used the simple.cfg and simple.world as my base. The first thing I did was I replaced the vfh driver with my roomba driver. Also you need to make an .inc file with the specs that you want for what you want your roomba to look like and what you want it to have on it(ie. bumpers and things of that sort). The only issue I had was that IR from what I know is not yet supported by stage. Therefore when it came to trying to simulate the IR proxy I was not able to do so. I hope that helps. If you have any more specific questions I can post my code. --Alan Davian wrote: > > Hello everyone: > If I want to use Player to control Roomba with Stage simulating, how can I > do first? > What I know is modify *.cfg and *.world files. > Although I have found many *.cfg, *.world and *.inc sample files in > /usr/local/share/stage/world/* > But I don't know how to create the roomba-like device interfaces. > Somone can help me to fugure out this problem? > Thanks~ > > > > -- View this message in context: http://www.nabble.com/Simulating-the-Roomba-device-with-Stage-tf3433700.html#a9586042 Sent from the playerstage-users mailing list archive at Nabble.com. |
From: Brian G. <br...@ge...> - 2007-03-26 19:59:11
|
On Mar 20, 2007, at 6:30 AM, Davian wrote: > If I want to use Player to control Roomba with Stage simulating, > how can I > do first? From the point of view of Stage, the Roomba is just a round robot with bumpers and 1 IR (the downward facing IRs are irrelevant in a 2D simulator. Check the attached files for a very crude model of a Roomba with bumpers: $ player everthing.cfg (in another shell) $ playerv -p 6702 --bumper --position2d From there you should be able to add the IR (you can use a single short-range sonar for the same effect). Btw, these files are now in CVS on HEAD and 2.0.x. brian. |
From: Davian <dav...@ho...> - 2007-04-03 14:14:33
|
At first, I thanks for Brian and Alan's help But when I used these driver with stage I found another problem, That is, I modified the player/examples/libplayerc c sample file and printed the position2d, bumper, and sonar data just as follows: printf("position2d: f% f% f%\n", position2d->px, position2d->py, position2d->pa); printf("bumper: f% f% f%\n", bumper->pose_count, bumper->bumper_count, bumper->bumpers); printf("sonar: f% f% f%\n", sonar->pose_count, sonar->scan_count, sonar->scan); But I got the output like: position2d: 5.778497 -2.901464 -2.957611 bumper: 0.000000 -2.901463 -2.957611 sonar: 0.000000 -2.901463 -2.957611 I know the position2d data stands for 2D position, but don't know bumper and sonar output mean? Could everyboy give me some suggestion? Thanks. Brian Gerkey wrote: > > > On Mar 20, 2007, at 6:30 AM, Davian wrote: > > >> If I want to use Player to control Roomba with Stage simulating, >> how can I >> do first? > > From the point of view of Stage, the Roomba is just a round robot > with bumpers and 1 IR (the downward facing IRs are irrelevant in a 2D > simulator. > > Check the attached files for a very crude model of a Roomba with > bumpers: > > $ player everthing.cfg > (in another shell) > $ playerv -p 6702 --bumper --position2d > > From there you should be able to add the IR (you can use a single > short-range sonar for the same effect). > > Btw, these files are now in CVS on HEAD and 2.0.x. > > brian. > > > > > > > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Playerstage-users mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-users > > -- View this message in context: http://www.nabble.com/Simulating-the-Roomba-device-with-Stage-tf3433700.html#a9812093 Sent from the playerstage-users mailing list archive at Nabble.com. |
From: Brian G. <br...@ge...> - 2007-04-03 14:59:25
|
On Apr 3, 2007, at 7:14 AM, Davian wrote: > > printf("bumper: f% f% f%\n", bumper->pose_count, bumper- > >bumper_count, > bumper->bumpers); > printf("sonar: f% f% f%\n", sonar->pose_count, sonar->scan_count, > sonar->scan); The '_count' fields are all integers, so you should use %d to print them. bumper->bumpers and sonar->scan are arrays, so you should iterate through them. Check the docs for relevant type info: http://playerstage.sourceforge.net/doc/Player-2.0.0/player/ structplayerc__bumper__t.html http://playerstage.sourceforge.net/doc/Player-2.0.0/player/ structplayerc__sonar__t.html brian. |
From: Davian <dav...@ho...> - 2007-04-06 07:51:38
|
Brian: Thanks for your help. The bumper and sonar data I have figured it out succesfully. But when I refered to your "roomba.inc" file and modified it for my own. I found that there is a strange problem. That is when I set the "Debug" ->"raytrace" option, the "red" bumper sensing bar's position is different from the "black" bar I added. And the part of roomba.inc I modified is #roomba size size [1.00 1.00] #bumper data bumper( bcount 2 blength 1.00 bpose[0] [0.36 0.36 45] bpose[1] [0.36 -0.36 -45] ) I don't know why the bumper looks like that in the stage. Could you give some suggestions, thanks~ Brian Gerkey wrote: > > > On Apr 3, 2007, at 7:14 AM, Davian wrote: > >> >> printf("bumper: f% f% f%\n", bumper->pose_count, bumper- >> >bumper_count, >> bumper->bumpers); >> printf("sonar: f% f% f%\n", sonar->pose_count, sonar->scan_count, >> sonar->scan); > > The '_count' fields are all integers, so you should use %d to print > them. bumper->bumpers and sonar->scan are arrays, so you should > iterate through them. Check the docs for relevant type info: > > http://playerstage.sourceforge.net/doc/Player-2.0.0/player/ > structplayerc__bumper__t.html > > http://playerstage.sourceforge.net/doc/Player-2.0.0/player/ > structplayerc__sonar__t.html > > brian. > > ------------------------------------------------------------------------- > Take Surveys. Earn Cash. Influence the Future of IT > Join SourceForge.net's Techsay panel and you'll get the chance to share > your > opinions on IT & business topics through brief surveys-and earn cash > http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV > _______________________________________________ > Playerstage-users mailing list > Pla...@li... > https://lists.sourceforge.net/lists/listinfo/playerstage-users > > http://www.nabble.com/file/7711/stage-002.png http://www.nabble.com/file/7711/stage-002.png stage-002.png -- View this message in context: http://www.nabble.com/Simulating-the-Roomba-device-with-Stage-tf3433700.html#a9869014 Sent from the playerstage-users mailing list archive at Nabble.com. |