Go Back   PCMech Forums > Help & Discussion > Web Design / Development

Need Some Help? Type Your Keywords Here:

Reply
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
Old 10-03-2005, 03:37 PM   #1
Chop Chop
 
catacon's Avatar
 
Join Date: Jan 2005
Location: St. Louis, MO
Posts: 1,035
Send a message via AIM to catacon Send a message via Yahoo to catacon
Question Robotics Programming

I joined my school's FIRST Robotics team to do their webpage, but as I have begun meeting with the members and getting more into it, I have seen that there is more I would like to do. One thing is the programming on the robot. I really have no idea where to begin with this, I have done web programming and so I have experience with general stuff, but what do I need to know to program a robot. I think I saw C as the main language, which I kind of know (I use PHP which is based off and written in C). So has anyone had experience with this and is there anyone who would liek to give me some pointers as to where to begin? Are there any books I should look at, websites, etc.? Any help would be appreciated.

Thanks,
Aaron
catacon is offline   Reply With Quote
Old 10-03-2005, 03:39 PM   #2
Dark
 
Dark Nova's Avatar
 
Join Date: May 2004
Posts: 1,128
Send a message via MSN to Dark Nova
like a robot moving, picking up things and turning ect...?
__________________
1.
Intel Core2Duo 3Ghz|Asus P5K Deluxe Wifi|4GB DDR2 800Mhz| Seagate 500GB*2| Evga 8800GTX 768MB| Antec SonataII case w/ 550W TruePower PSU|XP Pro
2.
AMD Athlon 64 3500|Asus A8N-sli deluxe|2GB DDR ram|Maxtor 250GB HDD|ASUS NVIDIA 6800 256MB|antec sonataII case w/ 450W PSU|XP home
Dark Nova is offline   Reply With Quote
Old 10-03-2005, 04:17 PM   #3
Chop Chop
 
catacon's Avatar
 
Join Date: Jan 2005
Location: St. Louis, MO
Posts: 1,035
Send a message via AIM to catacon Send a message via Yahoo to catacon
Yeah, detecting the input from joysticks stuff like that. Also, during the competition, they have and automated 15 seconds where the robot can move by itself (no human input) to get a head start on the task. You have to program the robot to do so, so that would be another thing to learn.
catacon is offline   Reply With Quote
Old 10-03-2005, 04:35 PM   #4
Defenestrator
 
Stuey's Avatar
 
Join Date: Jan 2005
Location: NYC & NJ
Posts: 1,371
First of all, go to the USFIRST website as there will be resources there to help you.

I was involved with my HS's FIRST team some 5 years ago. I never was too familiar with the software programming but I am still familiar with the basic functions our coders put into the program. Information about the electronics systems can be found on Innovation First's website.

Specific information about the controller's brain and its programming can be found here.

They made some modifications to the kit that they supply you with, but there should be plenty of documentation available when you get the kit, or at the very least there is plenty of electronic documentation. I remember we had a thick binder AND some electronic documents.

Is this your team's first year? If not, they probably have last year's materials too so you can get an idea of how they programmed their controller.

The language may be based on a computer language, but it's going to vary very differently so when you learn the language, don't make any assumptions. The syntax may be similar but there are many different commands.

You may want to see if the robotics team has any other microcontrollers such as the Parallax Basic Stamp II or the Javelin stamp, or if they have other brands of microcontrollers. Those will be portable systems you can play with at home to get a feel of robotic programming. If your finances allow, you may want to purchase a starter kit for yourself and once you're done you still have a robot to experiment with or at the very least the microcontroller to incorporate into a computer mod somehow. Parallax.com is a good place to find information on the Basic Stamp II or the Javelin microcontroller. Note that Stamp II w/ a programming board and chip and ac adapter costs a little over $100 (last time I checked) but they offer student discounts.

Now... to the function of the controller you will be using with your robot entry... Before anything, common to every entry, you will need to program failsafes into the code. I don't remember too many details on this, but you are required to install circuit breakers and/or fuses, and I believe an emergency cut-off command switch. You will need to familiarize yourself with the workings of electronic sensors, most important touch, IR, ultrasonic sensors. You may need to incorporate solenoids into your robot to control pneumatic systesm. You will need to program subcommands for the robot's motors and speed controls.

If you have any other questions, PM me or email me as I really wanted to be a mentor for my old HS's team but alas I am 200 miles away for much of the year so I am quite eager to have questions to answer...

Also... you're almost definitely going to have to work with other team members on the programming as it is an intense endeavor and the best way to do it is for each member to tackle a subprogram and have group revisions to finalize and tune the code.

But yea... please ask away any further questions you may have and update any progress you make!
__________________
ToolGuyd.com - My Tool Blog
Stuey is offline   Reply With Quote
Old 10-09-2005, 01:51 AM   #5
Defenestrator
 
Stuey's Avatar
 
Join Date: Jan 2005
Location: NYC & NJ
Posts: 1,371
Oh c'mon... how about an update!
Stuey is offline   Reply With Quote
Old 10-09-2005, 08:55 AM   #6
Gremlin Overlord
 
Jaggannath's Avatar
 
Join Date: Apr 2003
Location: Australia
Posts: 2,382
Quote:
Originally Posted by Stuey83
Oh c'mon... how about an update!
Agreed

I have a few mates doing robotics for their thesis's, and one has used a programming language called NQC (not quite C), as he was using it for Lego Mindstorm. The other was controlling the strength of the robots arm, and he used a program called dSpace to control it, with a MATLAB GUI
Jaggannath is offline   Reply With Quote
Old 10-09-2005, 02:57 PM   #7
Chop Chop
 
catacon's Avatar
 
Join Date: Jan 2005
Location: St. Louis, MO
Posts: 1,035
Send a message via AIM to catacon Send a message via Yahoo to catacon
Sorry guys, I kind of forgot about this thread. I have done some reading and talked with the team members and I think we will use C. I am thinking about getting a basic robotics kit to play around with to just learn how this stuff works. I'm still undecided about what I would really like to focus on with the robot, but right now it's a tie between the programming and building the transmission.
catacon is offline   Reply With Quote
Old 10-09-2005, 04:22 PM   #8
Defenestrator
 
Stuey's Avatar
 
Join Date: Jan 2005
Location: NYC & NJ
Posts: 1,371
It's not really about what language you want to use, I'm pretty sure that you HAVE to use the language that is the microcontroller can understand.

As for the transmission... if your team isn't in its rookie year, they probably have old parts that you can throw together to get a feel for robotic controls and locomotion. Since I joined the rookie team at my school, we had no equipment until the official kickoff. However, in the meantime we bought cheap drills and we hacked the motor assemblies to use as makeshift drive-motors. We built a base and we used the time before the kickoff to learn a few things.
Stuey is offline   Reply With Quote
Old 10-09-2005, 06:04 PM   #9
Chop Chop
 
catacon's Avatar
 
Join Date: Jan 2005
Location: St. Louis, MO
Posts: 1,035
Send a message via AIM to catacon Send a message via Yahoo to catacon
Yeah we are not in our rookie year (this is the third I believe), so we have stuff to work with. Our main transmission guy has a new idea for a toroidal CVT (??) and some of the guys have begun making power supplies already. I think this year we are scraping the 1st years robot, but the last years. We won 1st in the regions with that robot, so i think we are going to keep it around.

I think they have used C in the past years, but I'm not sure. What did you guys use?
catacon is offline   Reply With Quote
Old 10-09-2005, 06:13 PM   #10
Gremlin Overlord
 
Jaggannath's Avatar
 
Join Date: Apr 2003
Location: Australia
Posts: 2,382
dSpace, like I said.... it's a computer control program, it's quite good
Jaggannath is offline   Reply With Quote
Old 10-09-2005, 07:20 PM   #11
Defenestrator
 
Stuey's Avatar
 
Join Date: Jan 2005
Location: NYC & NJ
Posts: 1,371
Quote:
Originally Posted by Jaggannath
dSpace, like I said.... it's a computer control program, it's quite good

nonono. In the competition, every team is limited as to what they may use for their robot. Sometime in December or early January (eh, sometime in the winter), there is a "kickoff" and a challenge is announced. Every registered team receives the same exact parts, and this includes the mandatory microcontroller. Since the provided microcontroller MUST be used, the teams are limited to using the only language that the controller supports, which I also believe is a variation of C.

Guidelines are established which authorize the use of a specified range of additional parts. Occassionally, permission must be sought from the competition judges/authorities before additional parts are obtained. For example, they don't care if extra lexan is used in the chassis of the robot, but if you want to add a different pneumatic system, you're going to need approval from the judges who are likely to dismiss your request.

But... one of my acquaintences used the LEGO Mindstorms language on a non-GUI computer sciencey level as well and he kept claiming that it was far more powerful than most people are led to believe.
Stuey is offline   Reply With Quote
Old 10-10-2005, 04:21 AM   #12
Gremlin Overlord
 
Jaggannath's Avatar
 
Join Date: Apr 2003
Location: Australia
Posts: 2,382
Lego Mindstorms isn't bad, but it didn't provide the functionality my mate required, so he used NQC... what NQC does is basically offer the functions on a higher level than the Mindstorms one, and then converts it to Mindstorm commands. If you are asking what resources I used to learn C, then the answer is my uni taught me it after I learnt Java
Jaggannath is offline   Reply With Quote
Old 10-10-2005, 09:53 AM   #13
Defenestrator
 
Stuey's Avatar
 
Join Date: Jan 2005
Location: NYC & NJ
Posts: 1,371
Here is a complete tutorial concerning the exact language you will need to know. This involves several powerpoint slides or download the entire thing from the link at the bottom of the page.

There are also other resources available here in the USFIRST resource page.

Unless you know what you're doing, it isn't adviseable to learn C from a source other than the materials provided by Innovation First (they make the microcontroller) or USFIRST (they run the competition and provide the learning materials and the programming software). Although the languages are probably going to be very similar, since you're going to be running a hardware environment instead of a software environment, the differences are great enough that you'd need to relearn many commands.

EDIT: Actually I just read about a graphical interface that was made to facilitate the programming of the microcontroller you'll be using.

Last edited by Stuey; 10-10-2005 at 10:19 AM.
Stuey is offline   Reply With Quote
Old 10-11-2005, 08:36 AM   #14
Member (9 bit)
 
cuog's Avatar
 
Join Date: Aug 2004
Location: powhatan "the stix" VA
Posts: 511
Send a message via AIM to cuog Send a message via Skype™ to cuog
I am a member of Team 422 and i have been getting into the programming this year, on ifirobotics.com there is a spot where you can download the default code from last year, this will be good for playing with.

Also the C language used is just like C except you use a different API for the method calls etc.

http://ifirobotics.com/rc.shtml#Programming This is where it is
__________________
|>Sempron64 3000+ @2450 Mhz and counting||1.5 gb AData V-Series RAM||Biostar TForce6100 skt754 || eVGA 7600GT KO 600 core/803 mem||
|> Dual 1.26 GHz Pentium III || 2GB ECC Registered RAM || 18gb scsi 10 HD||

Last edited by cuog; 10-11-2005 at 08:38 AM.
cuog is offline   Reply With Quote
Old 10-11-2005, 04:09 PM   #15
Defenestrator
 
Stuey's Avatar
 
Join Date: Jan 2005
Location: NYC & NJ
Posts: 1,371
Hmm... now I'm confused. I thought that there were more differences between the codes than similarities but now it seems I'm wrong.
Stuey is offline   Reply With Quote
Old 10-11-2005, 06:46 PM   #16
Member (9 bit)
 
cuog's Avatar
 
Join Date: Aug 2004
Location: powhatan "the stix" VA
Posts: 511
Send a message via AIM to cuog Send a message via Skype™ to cuog
The diff between ifi robotics C is kinda like the diffs between C/C++ but not quite, elementally they are the same but there are a lot of smaller difference that make knowing both a bit difficult.
cuog is offline   Reply With Quote
Old 10-11-2005, 10:22 PM   #17
Defenestrator
 
Stuey's Avatar
 
Join Date: Jan 2005
Location: NYC & NJ
Posts: 1,371
Wait, so then I was right about learning the C in terms of how Innovation First provides it, rather than learning traditional C first.
Stuey is offline   Reply With Quote
Old 10-13-2005, 08:38 PM   #18
Chop Chop
 
catacon's Avatar
 
Join Date: Jan 2005
Location: St. Louis, MO
Posts: 1,035
Send a message via AIM to catacon Send a message via Yahoo to catacon
Does anyone know where I could find a basic robotics kit to build and play with? I would use it to practice the programming, but also to work with the circuits and such.

Thanks!
catacon is offline   Reply With Quote
Old 10-13-2005, 11:38 PM   #19
Defenestrator
 
Stuey's Avatar
 
Join Date: Jan 2005
Location: NYC & NJ
Posts: 1,371
There's the BOEBOT from Parallax, and for almost double the money, check out the VEX system which you can buy from Radio Shack. The VEX robotic system was created to allow for mirror the FIRST competition but on a smaller scale.
Stuey is offline   Reply With Quote
Old 10-15-2005, 03:03 PM   #20
Member (9 bit)
 
cuog's Avatar
 
Join Date: Aug 2004
Location: powhatan "the stix" VA
Posts: 511
Send a message via AIM to cuog Send a message via Skype™ to cuog
The programming for these will likely be different from the IFIRobotics controller FIRST gives you, unfortunetally the OI & RC are like 400 usd
cuog is offline   Reply With Quote
Old 10-17-2005, 02:51 PM   #21
Chop Chop
 
catacon's Avatar
 
Join Date: Jan 2005
Location: St. Louis, MO
Posts: 1,035
Send a message via AIM to catacon Send a message via Yahoo to catacon
Yeah, those seem a little expensive. I really just want to see what commands to use and that type of stuff. I know the actual language we will use is different, but any experience would help. Does anyone know of any cheaper basic robotics kits?
catacon is offline   Reply With Quote
Old 10-17-2005, 08:41 PM   #22
Defenestrator
 
Stuey's Avatar
 
Join Date: Jan 2005
Location: NYC & NJ
Posts: 1,371
There are MANY cheaper robot kits out there but they are not programmable. Head over to Parallax's Stamps in Class page and look at some of the categories. Download the pdf manual and read up a little bit. That will give you some of the background (for free) although I can't suggest any cheap hands-on resources.
Stuey is offline   Reply With Quote
Reply

Bookmarks

Still Need Help? Type Your Keywords Here:


Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are On



All times are GMT -5. The time now is 04:58 AM.
Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2012, vBulletin Solutions, Inc.
SEO by vBSEO 3.6.0 PL2