Discussion:
reset position of the controller using supervisor_field_set
fernando alonso
2006-05-23 18:48:01 UTC
Permalink
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.
--
Fernando Alonso Martín
NIA: 100033362


------------------------ Yahoo! Groups Sponsor --------------------~-->
Everything you need is one click away.  Make Yahoo! your home page now.
http://us.click.yahoo.com/AHchtC/4FxNAA/yQLSAA/pU_rlB/TM
--------------------------------------------------------------------~->


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:
webots-contest-***@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Olivier Michel
2006-05-24 06:17:16 UTC
Permalink
Hi Fernando,

You cannot use supervisor* methods in your robot controller. They can be
used in a Supervisor controller only which is not available for the contest.
I will try to develop a supervisor process that receives messages from
an Emitter set on the robot to reset it to its initial position (or to
an arbitrary position given by the robot).

-Olivier

-Olivier Michel
Cyberbotics Ltd.
Post by fernando alonso
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.
------------------------ Yahoo! Groups Sponsor --------------------~-->
Protect your PC from spy ware with award winning anti spy technology. It's free.
http://us.click.yahoo.com/97bhrC/LGxNAA/yQLSAA/pU_rlB/TM
--------------------------------------------------------------------~->


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:
webots-contest-***@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
László" "Márton
2006-05-24 06:54:40 UTC
Permalink
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="stand me up 0 0 1 0";
String message="stand me up 0 0 0.5f 3.14f";
//String message="stand me up 0";
// the figures here mean the following:
// 0: robot = Judoka0 1: robot = 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=null;
try
{ // convert the String into bytes using the
// ISO-8859-1 encoding
msg=message.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árton László
Post by fernando alonso
I'm not able to put my bot in a determinate
position. I want to
Post by fernando alonso
execute my controller and finally put my bot
again at the beginning,
Post by fernando alonso
but Webot doesn't work as I want. I'd very much
like to know how to do
Post by fernando alonso
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 Sponsor --------------------~-->
Protect your PC from spy ware with award winning anti spy technology. It's free.
http://us.click.yahoo.com/97bhrC/LGxNAA/yQLSAA/pU_rlB/TM
--------------------------------------------------------------------~->


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:
webots-contest-***@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Olivier Michel
2006-05-24 08:30:34 UTC
Permalink
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
Post by fernando alonso
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.
//first declare the desired coordinates and position
//String message="stand me up 0 0 1 0";
String message="stand me up 0 0 0.5f 3.14f";
//String message="stand me up 0";
// 0: robot = Judoka0 1: robot = 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=null;
try
{ // convert the String into bytes using the
// ISO-8859-1 encoding
msg=message.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árton László
Post by fernando alonso
I'm not able to put my bot in a determinate
position. I want to
Post by fernando alonso
execute my controller and finally put my bot
again at the beginning,
Post by fernando alonso
but Webot doesn't work as I want. I'd very much
like to know how to do
Post by fernando alonso
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 Sponsor --------------------~-->
You can search right from your browser? It's easy and it's free. See how.
http://us.click.yahoo.com/_7bhrC/NGxNAA/yQLSAA/pU_rlB/TM
--------------------------------------------------------------------~->


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:
webots-contest-***@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
fernando alonso
2006-05-24 10:34:40 UTC
Permalink
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.
Post by fernando alonso
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
Post by fernando alonso
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.
//first declare the desired coordinates and position
//String message="stand me up 0 0 1 0";
String message="stand me up 0 0 0.5f 3.14f";
//String message="stand me up 0";
// 0: robot = Judoka0 1: robot = 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=null;
try
{ // convert the String into bytes using the
// ISO-8859-1 encoding
msg=message.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árton László
Post by fernando alonso
I'm not able to put my bot in a determinate
position. I want to
Post by fernando alonso
execute my controller and finally put my bot
again at the beginning,
Post by fernando alonso
but Webot doesn't work as I want. I'd very much
like to know how to do
Post by fernando alonso
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
--
Fernando Alonso Martín
NIA: 100033362


------------------------ Yahoo! Groups Sponsor --------------------~-->
Everything you need is one click away.  Make Yahoo! your home page now.
http://us.click.yahoo.com/AHchtC/4FxNAA/yQLSAA/pU_rlB/TM
--------------------------------------------------------------------~->


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:
webots-contest-***@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
fernando alonso
2006-05-24 11:01:40 UTC
Permalink
I just want to reset the position of my robot, but I don't want to
receive the real position in it.
Instead of that, I only want to use the normal controls of the robot
to place my robot in a determinate coordinate.

I am implementing "Swarm Intelligence" algorithm to learn how to move
within the labyrinth and it's necessary that
the "fitness" function leaves the position of the robot in the same
place in which it was before its execution.
That is the reason why I need resetting the position of the robot in
the robot controller and .

What I don't understand is why I must use the supervisor and if I only
want to move my robot with its
controller, I would not need sending anything from the emitter. In
addition to this I want to reset the position when
I need it not when the supervisor would think it is the time for that.
Post by fernando alonso
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.
Post by fernando alonso
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
Post by fernando alonso
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.
//first declare the desired coordinates and position
//String message="stand me up 0 0 1 0";
String message="stand me up 0 0 0.5f 3.14f";
//String message="stand me up 0";
// 0: robot = Judoka0 1: robot = 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=null;
try
{ // convert the String into bytes using the
// ISO-8859-1 encoding
msg=message.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árton László
Post by fernando alonso
I'm not able to put my bot in a determinate
position. I want to
Post by fernando alonso
execute my controller and finally put my bot
again at the beginning,
Post by fernando alonso
but Webot doesn't work as I want. I'd very much
like to know how to do
Post by fernando alonso
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
--
Fernando Alonso Martín
NIA: 100033362
--
Fernando Alonso Martín
NIA: 100033362


------------------------ Yahoo! Groups Sponsor --------------------~-->
You can search right from your browser? It's easy and it's free. See how.
http://us.click.yahoo.com/_7bhrC/NGxNAA/yQLSAA/pU_rlB/TM
--------------------------------------------------------------------~->


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:
webots-contest-***@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
fernando alonso
2006-05-24 12:10:12 UTC
Permalink
This is my simplify controller's code :


static int robot; //descriptor del robot
static float[] posicion_inicial; //posicion inicial


public static void main() {

for (int i = 0; i < 10; i++){
.....
robot_step(64);
}
resetPosition();
}


/** Get the beginning position*/
public static void getBeginningPosition(){
supervisor_field_get(robot, SUPERVISOR_FIELD_TRANSLATION_Z |
SUPERVISOR_FIELD_TRANSLATION_X, posicion_inicial,64);
}


/** Reset the position to the begining position */
public static void resetPosition(){
supervisor_field_set(robot, SUPERVISOR_FIELD_TRANSLATION_Z |
SUPERVISOR_FIELD_TRANSLATION_X, posicion_inicial);
}



how I can do it in webots?
Post by fernando alonso
I just want to reset the position of my robot, but I don't want to
receive the real position in it.
Instead of that, I only want to use the normal controls of the robot
to place my robot in a determinate coordinate.
I am implementing "Swarm Intelligence" algorithm to learn how to move
within the labyrinth and it's necessary that
the "fitness" function leaves the position of the robot in the same
place in which it was before its execution.
That is the reason why I need resetting the position of the robot in
the robot controller and .
What I don't understand is why I must use the supervisor and if I only
want to move my robot with its
controller, I would not need sending anything from the emitter. In
addition to this I want to reset the position when
I need it not when the supervisor would think it is the time for that.
Post by fernando alonso
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.
Post by fernando alonso
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
Post by fernando alonso
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.
//first declare the desired coordinates and position
//String message="stand me up 0 0 1 0";
String message="stand me up 0 0 0.5f 3.14f";
//String message="stand me up 0";
// 0: robot = Judoka0 1: robot = 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=null;
try
{ // convert the String into bytes using the
// ISO-8859-1 encoding
msg=message.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árton László
Post by fernando alonso
I'm not able to put my bot in a determinate
position. I want to
Post by fernando alonso
execute my controller and finally put my bot
again at the beginning,
Post by fernando alonso
but Webot doesn't work as I want. I'd very much
like to know how to do
Post by fernando alonso
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
--
Fernando Alonso Martín
NIA: 100033362
--
Fernando Alonso Martín
NIA: 100033362
--
Fernando Alonso Martín
NIA: 100033362


------------------------ Yahoo! Groups Sponsor --------------------~-->
Everything you need is one click away.  Make Yahoo! your home page now.
http://us.click.yahoo.com/AHchtC/4FxNAA/yQLSAA/pU_rlB/TM
--------------------------------------------------------------------~->


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:
webots-contest-***@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
fernando alonso
2006-05-24 14:02:03 UTC
Permalink
mmm.... I understand that the normal controller send a message to
supervisor for reset the position of the robot, the supervisor is in a
infinity loop reciever messages, when recieve a message, read it and
reset the position of the boot using supervisor_field_set.

But the controller's supervisor is possible do it in Java?
Post by fernando alonso
static int robot; //descriptor del robot
static float[] posicion_inicial; //posicion inicial
public static void main() {
for (int i = 0; i < 10; i++){
.....
robot_step(64);
}
resetPosition();
}
/** Get the beginning position*/
public static void getBeginningPosition(){
supervisor_field_get(robot, SUPERVISOR_FIELD_TRANSLATION_Z |
SUPERVISOR_FIELD_TRANSLATION_X, posicion_inicial,64);
}
/** Reset the position to the begining position */
public static void resetPosition(){
supervisor_field_set(robot, SUPERVISOR_FIELD_TRANSLATION_Z |
SUPERVISOR_FIELD_TRANSLATION_X, posicion_inicial);
}
how I can do it in webots?
Post by fernando alonso
I just want to reset the position of my robot, but I don't want to
receive the real position in it.
Instead of that, I only want to use the normal controls of the robot
to place my robot in a determinate coordinate.
I am implementing "Swarm Intelligence" algorithm to learn how to move
within the labyrinth and it's necessary that
the "fitness" function leaves the position of the robot in the same
place in which it was before its execution.
That is the reason why I need resetting the position of the robot in
the robot controller and .
What I don't understand is why I must use the supervisor and if I only
want to move my robot with its
controller, I would not need sending anything from the emitter. In
addition to this I want to reset the position when
I need it not when the supervisor would think it is the time for that.
Post by fernando alonso
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.
Post by fernando alonso
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
Post by fernando alonso
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.
//first declare the desired coordinates and position
//String message="stand me up 0 0 1 0";
String message="stand me up 0 0 0.5f 3.14f";
//String message="stand me up 0";
// 0: robot = Judoka0 1: robot = 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=null;
try
{ // convert the String into bytes using the
// ISO-8859-1 encoding
msg=message.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árton László
Post by fernando alonso
I'm not able to put my bot in a determinate
position. I want to
Post by fernando alonso
execute my controller and finally put my bot
again at the beginning,
Post by fernando alonso
but Webot doesn't work as I want. I'd very much
like to know how to do
Post by fernando alonso
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
--
Fernando Alonso Martín
NIA: 100033362
--
Fernando Alonso Martín
NIA: 100033362
--
Fernando Alonso Martín
NIA: 100033362
--
Fernando Alonso Martín
NIA: 100033362


------------------------ Yahoo! Groups Sponsor --------------------~-->
Get to your groups with one click. Know instantly when new email arrives
http://us.click.yahoo.com/.7bhrC/MGxNAA/yQLSAA/pU_rlB/TM
--------------------------------------------------------------------~->


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:
webots-contest-***@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
Olivier Michel
2006-05-24 16:01:59 UTC
Permalink
Hi Fernando,

No, unfortunately, this is not possible to do it in Java within the
contest framework.
You cannot call supervisor_*() methods from your Java controller. This
won't work.

-Olivier
Post by fernando alonso
mmm.... I understand that the normal controller send a message to
supervisor for reset the position of the robot, the supervisor is in a
infinity loop reciever messages, when recieve a message, read it and
reset the position of the boot using supervisor_field_set.
But the controller's supervisor is possible do it in Java?
Post by fernando alonso
static int robot; //descriptor del robot
static float[] posicion_inicial; //posicion inicial
public static void main() {
for (int i = 0; i < 10; i++){
.....
robot_step(64);
}
resetPosition();
}
/** Get the beginning position*/
public static void getBeginningPosition(){
supervisor_field_get(robot, SUPERVISOR_FIELD_TRANSLATION_Z |
SUPERVISOR_FIELD_TRANSLATION_X, posicion_inicial,64);
}
/** Reset the position to the begining position */
public static void resetPosition(){
supervisor_field_set(robot, SUPERVISOR_FIELD_TRANSLATION_Z |
SUPERVISOR_FIELD_TRANSLATION_X, posicion_inicial);
}
how I can do it in webots?
Post by fernando alonso
I just want to reset the position of my robot, but I don't want to
receive the real position in it.
Instead of that, I only want to use the normal controls of the robot
to place my robot in a determinate coordinate.
I am implementing "Swarm Intelligence" algorithm to learn how to move
within the labyrinth and it's necessary that
the "fitness" function leaves the position of the robot in the same
place in which it was before its execution.
That is the reason why I need resetting the position of the robot in
the robot controller and .
What I don't understand is why I must use the supervisor and if I only
want to move my robot with its
controller, I would not need sending anything from the emitter. In
addition to this I want to reset the position when
I need it not when the supervisor would think it is the time for that.
Post by fernando alonso
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.
Post by fernando alonso
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
Post by fernando alonso
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.
//first declare the desired coordinates and position
//String message="stand me up 0 0 1 0";
String message="stand me up 0 0 0.5f 3.14f";
//String message="stand me up 0";
// 0: robot = Judoka0 1: robot = 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=null;
try
{ // convert the String into bytes using the
// ISO-8859-1 encoding
msg=message.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árton László
Post by fernando alonso
I'm not able to put my bot in a determinate
position. I want to
Post by fernando alonso
execute my controller and finally put my bot
again at the beginning,
Post by fernando alonso
but Webot doesn't work as I want. I'd very much
like to know how to do
Post by fernando alonso
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
--
Fernando Alonso Martín
NIA: 100033362
--
Fernando Alonso Martín
NIA: 100033362
--
Fernando Alonso Martín
NIA: 100033362
------------------------ Yahoo! Groups Sponsor --------------------~-->
You can search right from your browser? It's easy and it's free. See how.
http://us.click.yahoo.com/_7bhrC/NGxNAA/yQLSAA/pU_rlB/TM
--------------------------------------------------------------------~->


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:
webots-contest-***@yahoogroups.com

<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/

Loading...