|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools |
Rating:
|
Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: pic: kiwi vex robot
Quote:
) so much!!The problem is, now I have to go buy some omni wheels for this weekends project ![]() BTW. Do you know how the constant values were determined (ie. 37, 359, 601, 168, 97, 161)? Also, I see you are using PWM_in4 for the rotation value. I assume this is off the left stick X-axis. Knowing these can help me modify this stuff for future projects. Thanks again!!!! |
|
#2
|
||||
|
||||
|
Re: pic: kiwi vex robot
I like that design! It's so compact and sturdy, good job!
|
|
#3
|
||||
|
||||
|
Re: pic: kiwi vex robot
Quote:
|
|
#4
|
||||
|
||||
|
Re: pic: kiwi vex robot
I just got this working this morning.
I tried for hours last night to code it with EasyC. Apparently doing the math wasn't so easy with EasyC. I'll figure it out later today. What you see it the video is coded with MPLAB in about 20 minutes.Vex Kiwi Drive ![]() Last edited by billbo911 : 04-15-2006 at 04:11 PM. |
|
#5
|
||||
|
||||
|
Re: pic: kiwi vex robot
Quote:
|
|
#6
|
||||
|
||||
|
Re: pic: kiwi vex robot
Quote:
|
|
#7
|
||||
|
||||
|
Re: pic: kiwi vex robot
Quote:
Logically speaking, the code should run the same whether I code it in MPLAB or EasyC. Realistically, I just need to figure out how to do it correctly in EacyC. Thanks again!! BTW, do you know if there are any detailed tutorials for EasyC 2.0? I found the programing guide for 1.1 quite helpful, but a little short on covering all options. |
|
#8
|
||||
|
||||
|
Re: pic: kiwi vex robot
Indeed there is a very nice tutorial. Unlike most programs, the help file of easyC has been worked on quite a bit and is an excellent resource for any questions regarding the software. The file explains what every block and more. Whats real nice is if you have a problem with a specific block while you are trying to program with it, simply drag it into the program and hit "help".
Oh, and there are some tutorials in the help file, but I believe the first few are the same as what came with your programming guide. |
|
#9
|
||||
|
||||
|
Re: pic: kiwi vex robot
Quote:
Quote:
EDIT: I just double checked this file. It appears that I didn't save my changes, so, these files are the old version. My BAD!!!! I will correct this as soon as I re-create the files correctly. Please stay tuned.EDIT2: OK, I've replaced the files with the corrected versions. Sorry to anyone who tried the previous ones. These new files were updated to CD on 4/19/06 at 4:25pm PDST Last edited by billbo911 : 04-19-2006 at 07:28 PM. |
|
#10
|
|||
|
|||
|
Re: pic: kiwi vex robot (slightly OT)
Quote:
Thanks! Last edited by jgarbers : 04-19-2006 at 02:02 PM. |
|
#11
|
||||
|
||||
|
Re: pic: kiwi vex robot (slightly OT)
Quote:
I am one of the more impatient people in this world. I couldn't wait for the programming kit to be released through Radio Shack. So, when I found out that there was a possibility to purchase a prototype programming module directly from IFI , I jumped at it. It came with the cables, circuit board (unhoused) and a C-BOT CD which included MPLAB 7.0, C18 and IFI loader. These are all licensed to me and not part of my FRC teams programs. I have since then upgraded all three applications to the most current versions that work with FRC, and they still work with Vex. This allows me to use my laptop with the team to help them in programming and fiddle around with my Vex system as well. I added EasyC when I bought the kit on sale, then later purchased the 2.0 upgrade. Now I can program in either environment. Honestly, I really like EasyC, it is amazingly powerful for a module based programming environment and is extremely easy to teach noobs the basics of robot programming. I can quite literally have a complete novice programming a Vex bot to work autonomously in less that ten minutes. On the other hand, MPLAB offers a lot more flexibility and advanced programming ability. I am not versed well enough in C to use MPLAB exclusively, but I have to admit, I can do some things in MPLAB much faster than I can with EasyC. So, what do I recommend? Definitely keep EasyC. Only add MPLAB/C18/IFI Loader when you have mastered the use of EasyC and started running into limitations that require you to program directly in C. I know others will have different opinions, and listen to what they say as well. I base mine on my experience and knowledge level in programming. Weigh others opinions on their experience and ability as well. That will give you the truest measure of "What you should do". Last edited by billbo911 : 04-20-2006 at 01:22 AM. |
|
#12
|
|||
|
|||
|
Re: pic: kiwi vex robot (slightly OT)
Quote:
I suspect it's possible to compile and download "manually-edited" C code using everything that comes with easyC -- it seems to be running an external compiler during its build step -- but I have a little more experimenting to do. I've been coding for over 25 years and the drag-the-block approach seems to get in my way, although my kids seem quite comfortable with it. Maybe they'll just use easyC the way it's intended and I can try messing around under the hood in my "copious free time".... then I'll figure out if I can justify MPLAB (which looks very nice, by the way... the free IDE is quite the "gateway drug" for the rest of the product line). |
|
#13
|
||||
|
||||
|
Re: pic: kiwi vex robot
Quote:
Code:
'KIWI Code Overview '------------------ ' 'Vx, Vy, and w are on the interval [-127, 127], but the inputs p2_x, p2_y, p1_x are on the interval [0, 254], 'so we compensate by setting Vx, Vy, and w to the shifted version of the input: ' ' trans_x = p2_x ' trans_y = p2_y ' rot = p1_x ' ' Vx = trans_x - 127 ' Vy = trans_y - 127 ' w = rot - 127 ' 'The kiwi system is characterized by the equation: ' ' [ Vx ] [ 1 -1/2 -1/2 ] [ V1 ] ' [ Vy ] = [ 0 -sqrt(3)/2 sqrt(3)/2 ] [ V2 ] ' [ w ] [ 1 1 1 ] [ V3 ] ' ' [1x3 matrx] = [3x3 matrix] * [1x3 matrix] ' 'where L is a length constant, Vx, Vy, and w are the system translation velocity components, and the system 'angular velocity, and V1 is the wheel velocity vector at angle 0 degrees, V2 the wheel velocity vector at 'angle -120 degrees, and V3 the wheel velocity vector at 120 degrees. ' 'Solving this system for V1, V2, and V3 yields the following equations of motion: ' ' V1 = (2Vx + w) / 3 ' V2 = (-Vx - SQR(3)*Vy + w) / 3 ' V3 = (-Vx + SQR(3)*Vy + w) / 3 ' '(NOTE: These equations operate on the assumption that the magnitude of the desired velocity vector can be 'no greater than 127. That is, the hypotenuse of the triangle formed by the trans_x and trans_y variable 'cannot exceed 127. To ensure that this condition is met, one has to convert the rectangular 'coordinates (trans_x, trans_y) into polar coordinates (V_desired, theta), limit V_desired to 127, then 'back-calculate the new values of trans_x and trans_y based on the new value of V_desired and the already 'existent theta. The code that does this has been placed exactly before this large block of text.) ' '(NOTE: UPDATE! The Basic Stamp doesn't like the math required to make the previous note a reality, so I 'am using a crude solution: I scale down all input values by 127*SQR(2) to ensure that the largest vector 'magnitude doesn't exceed 127.) ' 'The output from each equation (V1, V2, V3) is on the interval [-127, 127], but the desired outputs, 'drill_1, drill_2, drill_3 are all on the interval [0, 254], so we compensate by setting drill_1, drill_2, 'and drill_3 to the shifted version of V1, V2, and V3: ' ' drill_1 = V1 + 127 ' drill_2 = V2 + 127 ' drill_3 = V3 + 127 ' 'And that's it! Plug in all the variables, and we end up with the equations of motion that follow '(note: fractions were expanded out to compensate for the integer based calculation done by the stamp): 'Motion equations |
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Using WPILib on a Vex robot | koenig3456 | Programming | 2 | 05-02-2006 02:56 PM |
| pic: Robot? What Robot? | CD47-Bot | Robot Showcase | 13 | 04-10-2004 07:08 AM |
| pic: 294's First Inventor Robot (pic 1)... | CD47-Bot | Robot Showcase | 4 | 03-10-2004 07:34 PM |
| pic: Closeup of the robot hanging on robot | CD47-Bot | Extra Discussion | 16 | 03-09-2004 06:27 PM |
| XCats - robot pic on our website | archiver | 2001 | 0 | 06-24-2002 01:06 AM |