Re: reset position of the controller using supervisor_field_set
"fernando alonso" <[email protected]> Wed, 24 May 2006 12:34:40 +0200
| Newsgroups | gmane.comp.cybernetics.webot.contest |
|---|---|
| Message-ID | <[email protected]> |
Sorry, me English es very poor: I want reset the position of the my robot, I wan't receiver information in my robot. I only want put my robot in a place when need it. I want the code for put my robot in a coordenades when the normal controller need it. I want apply Swarm Intelligence for learning to move for the laberint and I need use fitness funtion that each execute reset the position the robot for can evaluate the fitness of the movement. I don't understand why I have to use the supervisor. 2006/5/24, Olivier Michel <[email protected]>: > Hello, > > The "stand me up" trick won't work with Webots 5.1.6 as it was not > implemented in the roboka world. > However, I just ported it from the previous contest and integrated it > into Webots 5.1.7 which I just released now. So, rush to download Webots > 5.1.7 and you will see in the source code of the Roboka0.java controller > how to set the robot at any position in the maze (this is done when > pressing the Esc key, but you can do it programmatically as well). Of > course this feature will be disabled in the contest matches (real robots > can't fly that way), but I believe it is very useful for developing > robot controllers. > > Moreover, as requested by several people, I added new sample roboka > worlds called roboka0.wbt, roboka1.wbt, roboka2.wbt and roboka3.wbt > which offer different maze configurations. > > Cheers, > > -Olivier > > L=E1szl=F3 M=E1rton wrote: > > Hello, > > > > In last two robojudo conets I used for training > > pruposes a different robot like the one from contest. > > > > It was capable to reset himself if it was necessary. > > I don't know if it works with the new controlers but > > it worths a try. > > > > The code looks like that: > > > > //first declare the desired coordinates and position > > > > //String message=3D"stand me up 0 0 1 0"; > > String message=3D"stand me up 0 0 0.5f 3.14f"; > > //String message=3D"stand me up 0"; > > // the figures here mean the following: > > // 0: robot =3D Judoka0 1: robot =3D Judoka1 > > // 0.5 the X position of the robot > > // 0.5 the Z position of the robot > > // 0 the orientation of the robot (radians) > > // It is also possible to simply pass "stand me up 0" > > // the supervisor will then use the last initial > > position > > > > byte [] msg=3Dnull; > > try > > { // convert the String into bytes using the > > // ISO-8859-1 encoding > > msg=3Dmessage.getBytes("ISO-8859-1"); > > } catch(Exception e) {} > > > > > > > > //then when you want to reset the robot position call > > emitter_send(emitter,msg.length,msg); > > > > Best regards > > M=E1rton L=E1szl=F3 > > > > > >> fernando alonso wrote: > >> Hello, i need some help: > >> > >> I'm not able to put my bot in a determinate > >> > > position. I want to > > > >> execute my controller and finally put my bot > >> > > again at the beginning, > > > >> but Webot doesn't work as I want. I'd very much > >> > > like to know how to do > > > >> it!! > >> > >> I send you the Controller and the World. > >> > >> > > > > > > __________________________________________________ > > Do You Yahoo!? > > Tired of spam? Yahoo! Mail has the best spam protection around > > http://mail.yahoo.com > > > > > > > > > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > > > > > > > Yahoo! Groups Links > > > > > > > > --=20 Fernando Alonso Mart=EDn NIA: 100033362 ------------------------ Yahoo! Groups Sponsor --------------------~-->=20 Everything you need is one=A0click away.=A0 Make Yahoo! your home page=A0no= w. http://us.click.yahoo.com/AHchtC/4FxNAA/yQLSAA/pU_rlB/TM --------------------------------------------------------------------~->=20 =20 Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/webots-contest/ <*> To unsubscribe from this group, send an email to: [email protected] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/ =20