|
|
|
![]() |
|
|||||||
|
||||||||
here it is my true kiwi vex robot
what do you think?
14-04-2006 14:50
Arkorobotics
Woah, this is a smart design! It's small, and the structure doesn't look flimsy. How does it run?
Can you upload a video? I would like to show my friends the kiwi drive in action 
14-04-2006 14:52
Greg Perkins
|
Originally Posted by TheNotoriousKid
how does it move forward
|
14-04-2006 15:36
Greg Needel
colin,
does this mean you are going to enter the vex comp at the Ra Cha Cha this year?
Greg
14-04-2006 15:57
colin340
it works like a champ with some code from Tom Bottiglieri it should be allot easier to control as for computation I will problem not but team 340 is working on starting a 9th grade team
thank you tom Bottiglieri and Greg Perkins for advise
14-04-2006 16:12
billbo911|
Originally Posted by colin340
it works like a champ with some code from Tom Bottiglieri it should be allot easier to control as for computation I will problem not but team 340 is working on starting a 9th grade team
thank you tom Bottiglieri and Greg Perkins for advise |
14-04-2006 16:24
Tom Bottiglieri|
Originally Posted by billbo911
With Tom's permission, could you possibly post the section of code that makes the magic work? PLEASE!!!!
|
//Make sure variables are unsigned ints... rollovers WILL occur with signed ints
unsigned int trans_x, trans_y, rot;
//Grab inputs (x,y coords in rectangular coordinates and rotation rate)
trans_x = 254 - PWM_in1;
trans_y = 254 - PWM_in2;
rot = 254 - PWM_in4;
//Limit vector length to 127
trans_x = (unsigned int)(37+(254*trans_x)/359);
trans_y = (unsigned int)(37+(254*trans_y)/359);
//Assign and limit wheel outputs
wheel_1 = (unsigned char)limit( (((2*trans_x) + rot) / 3), 0, 254);
wheel_2 = (unsigned char)limit( ((601 + rot - trans_x - (168*trans_y/97)) / 3), 0, 254);
wheel_3 = (unsigned char)limit( ((161 + rot - trans_x + (168*trans_y/97)) / 3) , 0, 254);
signed int limit(signed int value, signed int min, signed int max)
{
if (value < min)
{
value = min;
} else if (value > max)
{
value = max;
}
return value;
}
)
14-04-2006 16:50
billbo911|
Originally Posted by Tom Bottiglieri
Well credit needs to be given where it's deserved. I got the equations for my kiwi code from the living genious, Joel Johnson.
Anyway, here's what you need to do to make it work: PHP Code:
PHP Code:
) |
) so much!!
14-04-2006 16:54
s_forbesI like that design! It's so compact and sturdy, good job!
14-04-2006 16:58
colin340
|
Originally Posted by s_forbes
I like that design! It's so compact and sturdy, good job!
|
15-04-2006 14:10
billbo911I 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

15-04-2006 15:39
Steve0100Very nice design!
There seem to be many variations of Vex holomic robots out there, probably because they are so fun to drive. Here's the beginnings of my first Vex bot, thanks to the RS sale:
Here's the underside:
My goal was to design a robot as clean and symmetrical as I could. It took one Starter kit and an additional hardware kit. The orange spacers in the motor mount bracket are the only non-vex parts, from an Erector set. They are conveniently in-between sizes of the vex plastic spacers.
To avoid having to support the axles on the outer sides of the wheels, I set back the motor with these spacers to allow a collar to hold in and support the axle on the motor side inside the bracket.
I've added sensors and have devised a scheme (still in the process of Implementation ) to have the robot detect walls and "bounce" off them before hitting with an angle of reflection equal to that of the angle of incidence. I'd like to put it inside a boxed-in area and have it bounce around like an billiard ball for robotics demos.
15-04-2006 16:09
billbo911|
Originally Posted by Steve0100
Very nice design!
I've added sensors and have devised a scheme (still in the process of Implementation ) to have the robot detect walls and "bounce" off them before hitting with an angle of reflection equal to that of the angle of incidence. I'd like to put it inside a boxed-in area and have it bounce around like an billiard ball for robotics demos. |
15-04-2006 16:31
Joel J|
Originally Posted by billbo911
Now I know why I like Tom (oh yeah, and Joe too
) 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!!!! |
'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
15-04-2006 17:05
Steve0100|
Originally Posted by billbo911
Thanks.
I really like how clean your assembly looks! On sensors.... from my experience with the the Vex Ultrasonics. They do a good job of sensing objects directly in front as long as object has a surface that is perpendicular to the sensor. In other words, when approaching a wall at an angle, the sensor wont pick it up very well at all. Additionally, if you do put your bot in a box, the walls will bounce the 40KHz signal pulses quite a bit, causing misreadings from the controller. Here's a thought. Try using the light sensors from the Line Following kit. With a little experimentation, you should be able to fine tune an algorithm to detect the relative distance from the wall based on the amount of light being reflected off of it. The biggest problem you will face with that is consistent light levels, and that may render this option useless. (Remember the difficulties with the CMU cam. and reflected light in 2005?) ![]() |
15-04-2006 18:51
billbo911|
Originally Posted by billbo911
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 ![]() |
16-04-2006 00:50
Francis-134|
Originally Posted by billbo911
As I mentioned earlier, I was working on getting this coded using EasyC v2.0. Well I finally got it working. The math is the same, the process is a little different, but it works. Oddly, the bot works smoother with the code done in MPLAB than it does with the code from EasyC. Anyway, I'm attaching the .hex, .bds and .ecp files from EasyC in the hopes someone else can use them. They are in a .zip file, so download and do what you will with them.
|
16-04-2006 02:54
billbo911|
Originally Posted by Francis-134
I noticed that your code uses a lot of custom c blocks to do the math. May I suggest using the "assignment" block, located in program flow in order to cut down on the labor. Perhaps it will work better as well.
|
16-04-2006 09:03
Francis-134Indeed 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.
19-04-2006 00:32
billbo911|
Originally Posted by Francis-134
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. |
|
Originally Posted by Francis-134
I noticed that your code uses a lot of custom c blocks to do the math. May I suggest using the "assignment" block, located in program flow in order to cut down on the labor. Perhaps it will work better as well.
|
My BAD!!!! I will correct this as soon as I re-create the files correctly. Please stay tuned.
19-04-2006 13:45
jgarbers|
Originally Posted by billbo911
What you see in the video is coded with MPLAB in about 20 minutes.
|
19-04-2006 14:48
billbo911|
Originally Posted by jgarbers
If I may ask - are you using the "Student Version" of the C18 compiler with MPLAB? If not, what compiler are you using? I'm trying to figure out what's appropriate to buy above and beyond what comes with the stock Vex Programming Kit... I've already bought the easyC v2 upgrade, but I'd like to be able to just edit source code.
Thanks! |
19-04-2006 15:00
jgarbers|
Originally Posted by billbo911
Excellent question...
|
01-10-2012 18:57
adam the greatThis code helps a lot. Me and Casey Godzyk (current 229 members) have been resurrecting the old Kiwi bot and updating the hardware and we happened to find this code...Then later realized that we were basing our new code off of the actual original code from this robot. Can't wait to be able to post pics and video of it all updated and rebuilt (hopefully with underglow).