June 14, 2003
ER1 Remotely
Ok I got the ER1 moving. This was a very simple task.
The software makes it very simple to do small tasks without much effort.
But as it turns out I am always looking for a way to extend current functionality. The ER1
has a command line API that can be executed over a telnet session. This enables an external
program to submit commands either from the on board laptop of an external computer over a
wireless connection. I wanted to start out simple and write a C# program to submit commands
to the ER1. I had no idea how to open up a telnet session and communicate with the ER1
programmatically. The ER1 documentation details how to do this in JAVA, but I really wanted
to do it with C#. So I poked around a little bit on the internet and found a class that
would do the socket communications for me. After about an hour I had a program that could
submit commands to the ER1 and display the results.
Since I finished the basic program to do the communucations I decided to move onto using the
ER1 GUI to create a small task. I wanted to see if the ER1 could successfully navigate my
upstairs hallway without banging into the walls. The ER1 I have is equiped with 3 IR sensors
for obsticle avoidance. The hallway I wanted to navigate is 3 feet wide and 10 ft long.
After the 10ft mark the hallway drifts to the left and then back to the right and enters into
my sons bedroom. I created a behavior that detected an image and moved forward for 25 ft.
Once the robot saw the object it began it's run down the hallway. As the IR sensors picked
up the hallway walls the robot made small adjustments to stay in the middle of the hallway.
After the 10 ft mark the robot started to drift left and then drift right once the hall
straightened back out. The robot continued into my sons room. Once in the room the robot
proceded to vier to the right to get back on the original straight line of path. After
the robot figured it was back on the path it proceeded to turn to the left before it finished
the 25 ft path. Wow I was impressed! I didn't measure the actual path to see if it was
truely 25 feet but the robot made it from start to finish without touching the walls. I tried
the exercise two more times with simular success.
Posted by Mike Linnen at June 14, 2003 03:14 AM
| TrackBack
I have tried several socket programs (in C++) and have not managed yet to send a command to my ER1. The connection seems to open well but the commands don't seem to go through afterwards... Could you please share you program with me, or give me a hint as to where to find sample socket programs to make it work?
Thanks,
Olivier
You can check out the ER1 community site in the API forum. I posted my C# program there. Here is a link to it.
http://www.evolution.com/forum/gforum.cgi?do=post_view_threaded;post=13180;sb=post_latest_reply;so=ASC;guest=235876