Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Robot Showcase (http://www.chiefdelphi.com/forums/forumdisplay.php?f=58)
-   -   pic: it's a Vex Holonomic Drive! (http://www.chiefdelphi.com/forums/showthread.php?t=40723)

Rosiebotboss 20-12-2005 07:53

Re: pic: it's a Vex Holonomic Drive!
 
Art,

You have done it again..........The talk from the Vex guys during Rosie team meetings has always drifted to talking about what "Art from Gus" has done this week with his Vex kit. I can hardly wait to see the Vex snowcat. Will it be full size?? :ahh:

ahecht 20-12-2005 17:31

Re: pic: it's a Vex Holonomic Drive!
 
Seeing this thing play Savage Soccer this past Saturday was a real treat. The looks on the FLL kids' faces when this thing started driving were priceless!

Michael Leicht 20-03-2006 21:22

Re: pic: it's a Vex Holonomic Drive!
 
do you have the code for that robot?

i would like to make something like this. i was wondering if i could see your code for it.

Dan Petrovic 20-03-2006 21:40

Re: pic: it's a Vex Holonomic Drive!
 
What did you use to bend and cut the metal and stuff? On the poster that comes with the kit it describes a machine that bends and cuts metal.

They don't sell anything like that at vexlabs.com

anna~marie 20-03-2006 21:41

Re: pic: it's a Vex Holonomic Drive!
 
oh dang that is sexy

Tim Delles 20-03-2006 21:52

Re: pic: it's a Vex Holonomic Drive!
 
Any wanna help me talk Alex into letting me and him build a VEX Kiwi bot?

artdutra04 20-03-2006 22:45

Re: pic: it's a Vex Holonomic Drive!
 
As requested, here is the code from EasyC ver 2.0 that I used for my Vex Holonomic Drive robot. The main drive controls are relative holonomic drive, which is relative to the current position of the robot. So if you push the left joystick to the left, the robot will go to its left. The code works well, and for a lot of people who I let drive this, it was a lot easiar for them to control than the tank drive on my Triple Play / Space Elevator vex robot. ;)

Here's the code:
Code:

#include "Main.h"

void main ( void )
{
int LF; // Left Front
int RF; // Right Front
int LR; // Left Rear
int RR; // Right Rear
int leftx;
int lefty;
int rightx;
int spin;
      while ( 1 )
      {
            // Get Data
            leftx = GetRxInput ( 1 , 4 ) ; // Left Joystick, X Axis
            lefty = GetRxInput ( 1 , 3 ) ; // Left Joystick, Y Axis
            rightx = GetRxInput ( 1 , 1 ) ; // Right Joystick, X Axis
            // Half the input signal (so code does not overflow past 255)
            leftx = leftx / 2 ;
            lefty = lefty / 2 ;
            spin = rightx / 2 ;
            // Drive Code Algorithim
            LF = RR = lefty - leftx + 127 ;
            RF = LR = 255 - lefty - leftx ;
            RR = 255 - RR ; // Reverse Direction of RR motor
            LR = 255 - LR ; // Reverse Direction of LR motor
            // Spin Code Algorithim
            RF = RF - spin + 63 ;
            RR = RR - spin + 63 ;
            LF = LF - spin + 63 ;
            LR = LR - spin + 63 ;
            // Code overflow prevention
            if ( LF < 0 )
            {
                  LF = 0 ;
            }
            else if ( LF > 255 )
            {
                  LF = 255 ;
            }
            if ( RF < 0 )
            {
                  RF = 0 ;
            }
            else if ( RF > 255 )
            {
                  RF = 255 ;
            }
            if ( RR < 0 )
            {
                  RR = 0 ;
            }
            else if ( RR > 255 )
            {
                  RR = 255 ;
            }
            if ( LR < 0 )
            {
                  LR = 0 ;
            }
            else if ( LR > 255 )
            {
                  LR = 255 ;
            }
            // Set Motors
            SetMotor ( 1 , RF ) ;
            SetMotor ( 2 , LF ) ;
            SetMotor ( 3 , LR ) ;
            SetMotor ( 4 , RR ) ;
      }
}

I may resurrect this robot (at least the drive platform) at some point over this summer and utilize the gyro from the FIRST KOP to make the robot a true absolute holonomic drive. But that will be added to my list of designs and ideas to try out, now that I have stock-piled enough Vex stuff in my fallout shelter to last through seven world wars. :yikes:

I'm dead serious too - I really do have like $2000 worth of Vex stuff. :p

Dmkaz 21-09-2006 22:00

Re: pic: it's a Vex Holonomic Drive!
 
I love bringing back up old topics =)

Anyways, I tried to import this code into EasyC 1.1 to see how it actually worked. To no avail though. After the code transfers to the controller, the motors seem to randomly spin at different times. I've tweaked this for numerous hours and still no luck. It would be great if someone could help on this issue. Thanks in advance

P.S. I apologize if I posted this in the wrong area. Didn't want to create a new topic for something that has been discussed numerous times.

Dylan Gramlich 10-10-2006 14:29

Re: pic: it's a Vex Holonomic Drive!
 
did u use just one of the joysticks to control this or some other combination? I should think about building something like that...hmm...

artdutra04 10-10-2006 16:58

Re: pic: it's a Vex Holonomic Drive!
 
Quote:

Originally Posted by Dmkaz
I love bringing back up old topics =)

Anyways, I tried to import this code into EasyC 1.1 to see how it actually worked. To no avail though. After the code transfers to the controller, the motors seem to randomly spin at different times. I've tweaked this for numerous hours and still no luck. It would be great if someone could help on this issue. Thanks in advance

If the motors seem to be randomly moving, it's probably because of a code overflow error. (I.e. 256 would wrap back around to 0, reversing the motor.) EasyC 1.1 does not support the Else If blocks. If you substitute regular If blocks for the If Else ones, the code should work fine.

Also, the variable names are shorthand for which motor is controlled. RF is short for Right Front, LR is short for left rear, and so on. Make sure the your code controls the correct motors; if you were to swap two or three of the motors around, then the motors would appear to move randomly.

If you are still having problems, can you add some PrintScreen commands to display the values for each motor (add them right before the SetMotor blocks, download the original code (posted here), and then post the values you are getting? Or a simpler way would be to look at each of the motors while you control the robot. When you hit forward, the motors should rotate like this:



Quote:

Originally Posted by Dylan Gramlich
did u use just one of the joysticks to control this or some other combination? I should think about building something like that...hmm...

The left joystick controlled the laternal movement - up on the joystick moved the robot forward, left on the joystick moved the robot to the left, and so on. The right joystick was used to control spin. Move the joystick to the right and the robot would spin to the right, etc. Any combination of the two joysticks, such as moving diagonally while applying a spin would mix the values, so it really would spin while driving diagonally.

pyro20911d 01-11-2006 12:39

Re: pic: it's a Vex Holonomic Drive!
 
THAT'S PRETTY SWEET

Lil' Lavery 01-11-2006 14:58

Re: pic: it's a Vex Holonomic Drive!
 
Quote:

Originally Posted by artdutra04
The left joystick controlled the laternal movement - up on the joystick moved the robot forward, left on the joystick moved the robot to the left, and so on. The right joystick was used to control spin. Move the joystick to the right and the robot would spin to the right, etc. Any combination of the two joysticks, such as moving diagonally while applying a spin would mix the values, so it really would spin while driving diagonally.

Did you use a robot-centric or a driver-centric code? In other words, if you pushed the joystick left, would the robot move to it's left, or your left?

artdutra04 01-11-2006 17:02

Re: pic: it's a Vex Holonomic Drive!
 
Quote:

Originally Posted by Lil' Lavery
Did you use a robot-centric or a driver-centric code? In other words, if you pushed the joystick left, would the robot move to it's left, or your left?

Robot-centric. I didn't have any gyros or accelerometers around, so there was no way for me to program absolute (driver-centric) control. That, and at the time I programmed it in EasyC, and I was unsure if sine, cosine, and tangent functions existed. Either way, most people who I let drive that robot found even relative (robot-centric) driving very easy to drive.

Lil' Lavery 01-11-2006 19:33

Re: pic: it's a Vex Holonomic Drive!
 
Quote:

Originally Posted by artdutra04
Robot-centric. I didn't have any gyros or accelerometers around, so there was no way for me to program absolute (driver-centric) control. That, and at the time I programmed it in EasyC, and I was unsure if sine, cosine, and tangent functions existed. Either way, most people who I let drive that robot found even relative (robot-centric) driving very easy to drive.

Just curious how you got it to move in a straight line and spin at the same time then, as with a robot centric system, while spinning and translating, it begins to arc. For instance, if it spins clockwise while translating forwards, the "front" of the robot would move clockwise, causing a clockwise arc of motion (and eventually a circle that the robot moves clockwise along the perimeter).

artdutra04 01-11-2006 23:08

Re: pic: it's a Vex Holonomic Drive!
 
Quote:

Originally Posted by Lil' Lavery
Just curious how you got it to move in a straight line and spin at the same time then, as with a robot centric system, while spinning and translating, it begins to arc. For instance, if it spins clockwise while translating forwards, the "front" of the robot would move clockwise, causing a clockwise arc of motion (and eventually a circle that the robot moves clockwise along the perimeter).

If you do not compensate for that while driving the robot, then yes, that is what it would do. But if you start driving forward and start to rotate to the right, if you move the left (transversal) joystick to the more to the left, you can compensate for the spin and more or less the robot will continue to move "forward" while spinning. With only relative control, it takes a lot more driver skill to translate while transversing.


All times are GMT -5. The time now is 06:03.

Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi