go away spammer
Society of Robots - Robot Forum
|
Robot Tutorials
|
FAQ
|
Welcome,
Guest
. Please
login
or
register
.
Did you miss your
activation email
?
1 Hour
1 Day
1 Week
1 Month
Forever
Login with username, password and session length
News:
Squirrels have fuzzy tails.
Home
Help
Search
Login
Register
Society of Robots - Robot Forum
»
Software
»
Software
»
Resources on robot programing (or scripting) in python.
Print
Author
Topic: Resources on robot programing (or scripting) in python. (Read 7063 times)
0 Members and 1 Guest are viewing this topic.
SciTech02
Robot Overlord
Posts: 136
Helpful? 3
Life's but a green duck with soy sauce. -MegaHAL
Resources on robot programing (or scripting) in python.
«
on:
September 12, 2008, 08:48:40 PM »
I just downloaded python 2.5.2 and have a "python GUI" open (I believe this is a kind of "word processer", where you write and save scripts). I'm working with using the API command line interface of my ER1 robot (using python to build the scripts). Now I just need to learn the language (I should have thought of that before downloading it). However, there is a flood of information on how to program in python and I'm just looking how to program specifically for robots. So, I was wondering if any of you guys have any resources for robot-specific python programing (beginner-oriented if possible).
Thanks in advance for any information.
Logged
Check out the Evolution Robotics, ER1 robot, and ERSP Resource Page:
http://www.societyofrobots.com/member_tutorials/node/336
Tsukubadaisei
Robot Overlord
Posts: 293
Helpful? 0
Re: Resources on robot programing (or scripting) in python.
«
Reply #1 on:
September 12, 2008, 11:07:35 PM »
First, there is no such a thing as robot specific programming language. If you learn c, the same rules you use to write a game also apply when programming a robot. The same applies for python. If you are talking about algorithms, like any engineering field, robotics has its own algorithms but fortunatelly they are language independent.
Second, for the kind of program you want to build the only things you might want to learn from python are the general syntax and how to use the serial, usb or bluetooth in python.
Third, I dont know the platform you are going to use but you problably will have to program it as well. The controller in your robot must know what to do with the data it will receive from the pc.You will problably need c or c++ (or assembly). And some knowledge about the controller hardware(see the datasheet).
I dont know python(or any other script language except for some basic lisp) so I cant help more. Just in case, it is good to know micro controllers dont run python(theorically they can but it doesnt worth the trouble).
Logged
A.I.(yes those are my initials)
SciTech02
Robot Overlord
Posts: 136
Helpful? 3
Life's but a green duck with soy sauce. -MegaHAL
Re: Resources on robot programing (or scripting) in python.
«
Reply #2 on:
September 13, 2008, 01:10:47 AM »
I did not mean a language specific only to robot programing, just information on using the language (which can be used for anything) for robotic-based applications, such as basic commands and how to create simple looping programs/scripts. I ask this because these languages are used for
everything
and the information about them is for
everything
(just like with c or java). Also, my application would benifit from a general scripting language, since it could "tie" everything together (since I'm using API's from another program that does the specific stuff, a very general language is no problem). Finally, the ER1 is a PC-based robot, so microcontroller compatablility is not an issue
.
I guess my question should have said what resources would you guys suggest for learning python (robot-specific as in using the language for a robot and not a server). I see that the same methods used to write a game work when programing a robot, which makes perfect sense. I'll look into it.
Logged
Check out the Evolution Robotics, ER1 robot, and ERSP Resource Page:
http://www.societyofrobots.com/member_tutorials/node/336
Ro-Bot-X
Contest Winner
Supreme Robot
Posts: 1,431
Helpful? 25
Store: RoBotXDesigns.ca
Re: Resources on robot programing (or scripting) in python.
«
Reply #3 on:
September 13, 2008, 05:46:15 AM »
I have a few samples downloaded from the time the ER1 forum was online. I also have a sample of interfacing a BasicStamp to controll a scanning range finder, but done in Active Python. I attach the archives to this message, maybe it will be good enough inspiration for you. Let me know what you came up with, maybe I'll give it a try on my robot.
Logged
Check out the
uBotino
robot controller!
Ro-Bot-X
Contest Winner
Supreme Robot
Posts: 1,431
Helpful? 25
Store: RoBotXDesigns.ca
Re: Resources on robot programing (or scripting) in python.
«
Reply #4 on:
September 13, 2008, 08:10:16 AM »
Here are some links that will help better understanding ER1 programming and internals:
http://www.parex.org/weblog/archive/cat_er1.html
http://home.comcast.net/~dprutchi/er1_rcm.pdf
http://home.att.net/~rhowarth/Robots/ER1.pdf
Logged
Check out the
uBotino
robot controller!
Ro-Bot-X
Contest Winner
Supreme Robot
Posts: 1,431
Helpful? 25
Store: RoBotXDesigns.ca
Re: Resources on robot programing (or scripting) in python.
«
Reply #5 on:
September 13, 2008, 12:26:09 PM »
I think this website is the answer for your original question:
http://www.pyrorobotics.org/
PyRo = Python Robotics!
Logged
Check out the
uBotino
robot controller!
SciTech02
Robot Overlord
Posts: 136
Helpful? 3
Life's but a green duck with soy sauce. -MegaHAL
Re: Resources on robot programing (or scripting) in python.
«
Reply #6 on:
September 13, 2008, 07:57:40 PM »
Thank you, again, for your comments. I've already researched the two of the three sites you posted (I read the one with the took-apart RCM numerous times when trying to find a battery and the R2-D2 one a time or to in the past). The first link was really useful and I plan to research it in greater detail later. The most recent post was interesting and it did answer my original question, but I'm going to research some basic python before I download anything that I might not need later on (the python 2.5.2 has a huge tutorial that came with it, so I'll read that before anything else).
Logged
Check out the Evolution Robotics, ER1 robot, and ERSP Resource Page:
http://www.societyofrobots.com/member_tutorials/node/336
brijesh
Full Member
Posts: 55
Helpful? 0
Re: Resources on robot programing (or scripting) in python.
«
Reply #7 on:
September 14, 2008, 10:56:05 AM »
Hello,
I don't know anything about ER1 but have used python to control my own robot.
In general python is pretty powerful and easy to use.
Here are somethings that will be helpful.
1) Data Format: Usually when communicating with robots you need to parse data from C structs or get data from char, int or short int data types. Python does not have char or 16bit short int. To convert Python data types to C struct and vise-versa use the library "Struct". The Python docs does a good job of explaining the usage.
2) For keyboard input and printing to console check out the library WConio. The every useful kbhit() function is present in this library.
3) Library time has usual sleep() function to add delay.
4) For plotting things on PC without getting into complicated GUI programming check out matplotlib. It provides Matlab like plotting features.
5) Ofcourse library Serial gives access to serial ports on the PC. This library works just fine with the FTDI USB to serial converter chips.
Hope these things help.
Edit:
The tutorials that come with the language download are not that noob friendly. This book is much lighter and good introduction
http://www.greenteapress.com/thinkpython/
«
Last Edit: September 14, 2008, 12:41:48 PM by brijesh
»
Logged
Print
Society of Robots - Robot Forum
»
Software
»
Software
»
Resources on robot programing (or scripting) in python.
Get Your Ad Here