On 10/13/2011 04:35 AM, Jan Stevens wrote:
I'm working on a project were I have to combine the Arduino
with the Irobot and with Player/Stage. The idea is to create a
uniform programming language for different kinds of robots. I've
seen Arduino's get connected to an Irobot Create and also
player/stage works wonderfully with the Irobot, the problem is
The purpose is to compile the custom player code for
the Arduino so the Arduino can send the right commands to the
irobot. Meaning that I will need to alter the player/stage code
so my program can run on the Arduino and all
the necessarily translation is done.
So basicly I have a textbook player code, I will need the
translations of the different proxy's and command's so
the Arduino can translate the player code into opcodes for the
irobot. I know that alot of people send there own opcodes in the
arduino programming language but the point of this project is to
have one program that can run on multiple robots (and then see
witch robot handels the commands better).
My question is, what files are used and is it possible?
It sounds like you want to write an arduino program that will
respond to commands and data requests from a remote computer (over
te USB/Serial), and that you want Player to be sending the
commands. If that's wrong, please clarify so that we can give you
To do something like the above, first you'll have to define a
command structure and a set of commands that the Arduino understands
(stuff like "get sensor", "set motor speed", etc.) Then you'll need
to program a Player driver that is able to send those commands and
retreive that data based on the messages it gets over the interfaces
it provides. For example, if your driver gets a position2d velocity
command, it will convert that to something the Arduino understands,
and send it along.
Writing your own Player drivers is pretty simple, there is more
information on the wiki (Make sure to also read the articles in
"Further Reading".) Since Player already knows how to command the
create, I don't know that it's necessary to include an Arduino in
the loop to begin with. And since it's fairly easy to add drivers
to Player for other robot types, it seems like adding an Arduino is
just an extra level of complexity, especially since Player already
abstracts all of its devices to a uniform set of interfaces, making
client programs largely hardware-agnostic.