Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Technical Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=22)
-   -   First team with swerve drive? (http://www.chiefdelphi.com/forums/showthread.php?t=88331)

Ether 18-02-2011 08:37

Re: First team with swerve drive?
 
Quote:

Originally Posted by Tristan Lall (Post 1025727)
Independently steered?

I believe the answer is implied in the quote below (emphasis mine):

Quote:

Originally Posted by ratdude747 (Post 1025692)
it had 4 pods. each had 1 cim coaxially driven (by way of a thin gates belt) and next to the cim was a globe for steering (also connected by a gates belt). each pod had 2 rover wheels, for a total of 8 wheels. steering position was determined by 4 analog encoders. no dead zones.

and this:

Quote:

Originally Posted by ratdude747 (Post 1025710)
if what you mean is arcade drive (one stick does f/b and l/r, the other controls rotation), then yes.



Andrew Schreiber 18-02-2011 09:00

Re: First team with swerve drive?
 
Quote:

Originally Posted by Ether (Post 1022869)
Did it also have :

- unlimited rotation of the steering mechanism and the wheel angle sensor

- no "dead zones" in the wheel angle sensor

? if not, it was not Unicorn.


What are the benefits of Unicorn Drive over any other holonomic steered wheel system?

Obviously continuous rotation allows you to do a shortest distance algorithm and speed up your reaction time (a real problem according to some people) but it requires precision machining and use of efficiency robbing bevel gears or at very least use of slip rings (or I guess you could wirelessly transmit power to your wheel pods and use an on board wireless network to feed sensor data back... ok, I'm just being silly).

Ether 18-02-2011 09:08

Re: First team with swerve drive?
 
Quote:

Originally Posted by Andrew Schreiber (Post 1025801)
What are the benefits of Unicorn Drive over any other holonomic steered wheel system?

Compared to a swerve without unlimited steering it simplifies the software and allows for "shortest-distance" steering, as you said.

Compared to omni or mec it has better traction.

Quote:

but it requires precision machining and use of efficiency robbing bevel gears or at very least use of slip rings
That's the price you pay for the advantages.



Andrew Schreiber 18-02-2011 09:29

Re: First team with swerve drive?
 
Quote:

Originally Posted by Ether (Post 1025807)
Compared to a swerve without unlimited steering it simplifies the software and allows for "shortest-distance" steering, as you said.

How does implementing another check and more code simplify it? Saying, "I need to go in X direction, rotate wheel to that angle" is really simple (180 degrees of travel). I'm not saying that shortest-distance is prohibitively difficult just that it is an additional check and does not really simplify code.


Quote:

That's the price you pay for the advantages.
Ok, I wanted to make sure there were no other benefits or disadvantages I was missing (I like to have my facts straight before doing analysis).

Ether 18-02-2011 10:46

Re: First team with swerve drive?
 
Quote:

Originally Posted by Andrew Schreiber (Post 1025821)
How does implementing another check and more code simplify it?

You don't have to implement "another check". With Unicorn, the code to calculate the shortest angle_error is very simple. You don't need to implement any conditional logic:

Code:

angle_error = joystick_command - encoder_angle;
angle_error -= 360*floor(0.5+angle_error/360);

Quote:

Saying, "I need to go in X direction, rotate wheel to that angle" is really simple (180 degrees of travel).
Is it really that simple? Let's say you have steering limited to 360 degrees and an absolute encoder that reads 0 to 360 degrees (unless you add code to change it). Your Joystick angle command will be -180 to +180 (unless you add code to change it). Think about how you would code this to create the error angle necessary for your PID, and compare this code to the Unicorn code. Unlike the Unicorn, it will require conditional logic to deal with the limited steering.

Even worse (software-wise), suppose you have a more capable limited-steering vehicle that can rotate up to, say, 3 full turns. You want to take advantage of this capability to take the shortest-angle path to the setpoint whenever possible, but you must book-keep how many steering turns have been taken, and add code to control the steering differently when the limit has been reached.



Andrew Schreiber 18-02-2011 10:57

Re: First team with swerve drive?
 
Quote:

Originally Posted by Ether (Post 1025861)
You don't have to implement "another check". With Unicorn, the code to calculate the shortest angle_error is very simple. You don't need to implement any conditional logic:

Code:

angle_error = joystick_command - encoder_angle;
angle_error -= 360*floor(0.5+angle_error/360);



Is it really that simple? Let's say you have steering limited to 360 degrees and an absolute encoder that reads 0 to 360 degrees (unless you add code to change it). Your Joystick angle command will be -180 to +180 (unless you add code to change it). Think about how you would code this to create the error angle necessary for your PID, and compare this code to the Unicorn code. Unlike the Unicorn, it will require conditional logic to deal with the limited steering.

Even worse (software-wise), suppose you have a more capable limited-steering vehicle that can rotate up to, say, 2 full turns. You want to take advantage of this capability to take the shortest-angle path to the setpoint, but you must book-keep how many steering turns have been taken, and add code to control the steering differently when the limit has been reached.


For my projects dealing with crab drives I limit my angles to 180 so that I can pull the sign off and feed that into my motor and feed the direction to the steering. It does decrease response time though.* Because I never feed more than 180 into the steering motor control loop I should never need a software stop or any conditional logic.

Thanks. I didn't think of it this way. I have to plug in some numbers to understand what your pseudo code is doing but it looks like it would work.


*Disclaimer, my work so far has been with math not a physical system. I am building my physical system this week (I hope).

Ether 18-02-2011 11:48

Re: First team with swerve drive?
 
Quote:

Originally Posted by Andrew Schreiber (Post 1025868)
I have to plug in some numbers to understand what your pseudo code is doing but it looks like it would work.


Oh, it works. Here is the test code and the test results:

Code:

#include <math.h>
#include <stdio.h>

void test(double err){
printf("%12.3f",err);
err -= 360*floor(0.5+err/360.0);
printf("  %12.3f\n",err);
}


int main(void){
 
printf("\n\n2/18/2011 test of err -= 360*floor(0.5+err/360.0)\n\n");
test(0);
test(1);
test(179);
test(180);
test(181);
test(359);
test(360);
test(361);
test(719);
test(720);
test(721);

test(-1);
test(-179);
test(-180);
test(-181);
test(-359);
test(-360);
test(-361);
test(-719);
test(-720);
test(-721);

return 0;

}

/*

2/18/2011 test of err -= 360*floor(0.5+err/360.0)

      0.000        0.000
      1.000        1.000
    179.000      179.000
    180.000      -180.000
    181.000      -179.000
    359.000        -1.000
    360.000        0.000
    361.000        1.000
    719.000        -1.000
    720.000        0.000
    721.000        1.000
      -1.000        -1.000
    -179.000      -179.000
    -180.000      -180.000
    -181.000      179.000
    -359.000        1.000
    -360.000        0.000
    -361.000        -1.000
    -719.000        1.000
    -720.000        0.000
    -721.000        -1.000

*/


Andrew Schreiber 18-02-2011 15:56

Re: First team with swerve drive?
 
Quote:

Originally Posted by Ether (Post 1025889)
Oh, it works. Here is the test code and the test results:

Wasn't saying it wouldn't, I admit the testing it was mostly so I could understand what it was doing.

Ether 18-02-2011 16:06

Re: First team with swerve drive?
 
Quote:

Originally Posted by Andrew Schreiber (Post 1026093)
testing it was mostly so I could understand what it was doing.

Understanding is a good thing :-) Test away.

Just to be clear though: this code is for Unicorn, not for limited-rotation steering. With limited-rotation steering, you will need to add some conditional logic.



ratdude747 18-02-2011 16:42

Re: First team with swerve drive?
 
yes, 4 wheel independent co-axial swerve drive.

there was some talk within the team today. after shipping on tuesday, we will try to create the logarithms and publish a lot more data on it.

for now, some pictures to be posted later will have to do.

Grim Tuesday 18-02-2011 17:49

Re: First team with swerve drive?
 
We worked with Cornell University to become the first with Omniwheels.

AdamHeard 18-02-2011 18:03

Re: First team with swerve drive?
 
Quote:

Originally Posted by Grim Tuesday (Post 1026181)
We worked with Cornell University to become the first with Omniwheels.

I'm pretty sure teams had omniwheels years before your team was founded.

JVN 18-02-2011 18:10

Re: First team with swerve drive?
 
Quote:

Originally Posted by AdamHeard (Post 1026189)
I'm pretty sure teams had omniwheels years before your team was founded.

True. I believe the first I know of were teams 67 and 45 who both had them in 1998.

Akash Rastogi 18-02-2011 18:20

Re: First team with swerve drive?
 
Quote:

Originally Posted by JVN (Post 1026196)
True. I believe the first I know of were teams 67 and 45 who both had them in 1998.

Who came up with it first? :p

But really I kinda want to know.

ratdude747 18-02-2011 19:02

Re: First team with swerve drive?
 
i have a picture of the spare module that a mentor brought to me for pictures. attached.

If anybody else wants a picture of either the bot or the module, I will be glad to take a shot or two and post it.

edit- picture attached was a fail. better ones later


All times are GMT -5. The time now is 23:51.

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