![]() |
Newbie Autonomous Question(s)
I'm from a rookie team and we are having some coding issues. We have one member on our team that can code just about anything, but he can only come about one day a week. Meanwhile, we are trying to accomplish things on our own. Everyone else that is working on coding began learning C about, oh, last week. Meaning we're all clueless. Really, really, seriously clueless.
We are trying to get the autonomous mode to work. The problem is we have no clue where to begin. We don't even know where to find the source code that is supposed to be on the FIRST site, or so we've been told. Basically, we need a STEP BY STEP guide on how to begin our autonomous programming. We need to know how to initialize an autonomous mode, how to set it up to follow sensors, and how to set up a programmed list of directions (i.e. "Move forward 10 feet, turn 30 degrees, etc.") Any help would be GREATLY appreciated. |
Re: Newbie Autonomous Question(s)
the default code can be found at www.innovationfirst.com
also, the place for putting default code is found in the user_routines_fast.c file. |
Re: Newbie Autonomous Question(s)
Quote:
Click on "FIRST Robotics" then on "Documents" at the top. The source is on that page. Look in ChiefDelphi's white papers for help on getting started...there are 3-4 papers on just that. :) If you need more help, PM me and I'll be glad to help. |
Re: Newbie Autonomous Question(s)
Quote:
First, let's say you want a function 'void Turn_Robot (int angle)' to turn the robot by some specified angle 'angle.' How do you do this? Well, without encoders or gyros, the answer is pray! But you'll have to settle for a simple counter. E.g., Code:
/*Okay, set the constant CYCLES_PER_RADIAN to some value, any value (I'd guess what you think, from judging how fast the robot can turn). Don't do anything in your code, but call the function Turn_Robot (angle), with some angle you feel like turning. If the robot doesn't turn enough, increase the constant by a variable amount, depending on how much is left to turn. If the robot turns too much, decrease the constant. (You might want to put tape on the floor marking off a 45 deg angle, or some such sort that is easily determined, so you can quickly tell what to do.) Oh, and I haven't tested this code, so beware (I'm frequently wrong ;)) As Knuth said, Beware, I've only proven the above code correct, I haven't tested it. |
Re: Newbie Autonomous Question(s)
well if u download the source codes from the sites listed above, they come ready to work. make sure u wire up the beacon right. to start try to see if ur senors pick up the beacon by using the tracking code. if the works then use teh navigate code. oh make sure that u use two of the same type servos or it wont work right. we had to fix this in the code to. this should get u started. make sure u hit the trigger when using the navigate code or it wont start.
|
rokkie needs help
k i am from a first year team from fl and basically we have alot of problems with programming some kid told me bout encoders and buildin a cirui would be the best way to go if any one can help me plz help
|
Re: Newbie Autonomous Question(s)
Don't feel too bad...We're clueless too! And to make things worse, they never sent us the CDROM that was supposed to come with the new Edubot Controller, so we didn't even have the CBot compiler until I borrowed a copy from another team! If you find that step-by-step let us know!
|
Re: rokkie needs help
Quote:
|
Re: Newbie Autonomous Question(s)
http://www.rec.ri.cmu.edu/education/...tent/index.htm has a lot of tutorials that are very helpful, such as running a motor for 1 second, and another one called making a timed turn.
|
Re: Newbie Autonomous Question(s)
I'm following the instructions in the 2004 introduction to programming guide, but when i followed their instructions to insert the code b/w the "Getdata" and "Putdata", but when i pressed the make button, it did not compile. What is wrong? :confused:
|
Re: Newbie Autonomous Question(s)
Quote:
|
Re: Newbie Autonomous Question(s)
Our robot will not follow a line of tape. (The banners are calibrated correctly.)
Let me explain our setup: pwm01 = Left Drive Wheel pwm02 = Right Drive Wheel rc_digi_in01 = Left Banner (WHITE Sig.) rc_digi_in02 = Right Banner (WHITE Sig.) Our Autonomus Code: PHP Code:
The problem is our robot will not do anything if the sensors are not seeing the tape. It just stops. We are clueless, and any help would be appreciated. (This is the first time I worked with any C[++] programming other than the old "Hello, World!" program. ;) (If you see any bugs in our code, please respond! :confused: )) LBK Rules; VB Programmer being suddenly forced to C by FIRST (or IFI, I don't know which). (BTW: I just got back from a meeting about an hour ago.) |
Re: Newbie Autonomous Question(s)
Quote:
First, when you're going off the line, you correct yourself wrong. If your left sensor goes off the line, you drive the right side harder, meaning you actually go further left. That's an easy mistake to make. :) Second, somebody correct me if I'm wrong, the pins are pull ups, meaning that they are normally 1, unless they recieve a signal, which makes them 0. So you need to switch the test for 0s and 1s. Third, make the power that the motors are driven at a little higher. I'm not sure if your problem was that it wasn't moving, but the way it is now, it will either move really slow or not at all. P.S. Being a newbie isn't bad. I'm on a newbie team too. :) |
Re: Newbie Autonomous Question(s)
Quote:
|
Re: Newbie Autonomous Question(s)
Quote:
|
| All times are GMT -5. The time now is 04:22. |
Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi