Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Technical Discussion (http://www.chiefdelphi.com/forums/forumdisplay.php?f=22)
-   -   Best Sensor for Unlimited Rotation Swerve (http://www.chiefdelphi.com/forums/showthread.php?t=137230)

ratdude747 13-05-2015 18:02

Re: Best Sensor for Unlimited Rotation Swerve
 
Quote:

Originally Posted by R.C. (Post 1481904)
I'm assuming this is the ma3?

Yup. I thought that was the model but it's been nearly five years since I worked with them and I didn't want to provide false information.

---

One issue that was encountered was sensor alignment... it should be a no-brainer but one ought to make sure all the sensors are aligned the same (same 0/360 position)... on can calibrate in code and account for the 0/360 transition, sure, but it is a pain and can slow the processing down if not written well.

What makes this issue common is that the input shafts of the encoders, back then at least, had no reference mark and being continuous, there is no stop to reference to. In retrospect, the fix for this is to use a DMM to find the 0/360 point, and make a mark with a scribe on the end of the shaft and on the encoder body (or reference the first mark to a known spot on the body).

RyanShoff 13-05-2015 18:15

Re: Best Sensor for Unlimited Rotation Swerve
 
Quote:

Originally Posted by Bryce2471 (Post 1481908)
Here is a link to the sensor that we have been using on our swerves. It meets all of you requests (and probably some you haven't encountered yet) except that it has an analog output, and you can get it for ~$10 if you shop around a little.

We use these too. I haven't seen anything close to the price.

We tend to get a twitch, when trying to hold a wheel at a position that crosses from 5v - 0v. It probably could be calibrated out. We just don't set any wheels in either drive or strafe position to this position.

I would not recommend trying anything other than absolute feedback geared one to one with the wheel.

Bryce2471 13-05-2015 19:25

Re: Best Sensor for Unlimited Rotation Swerve
 
Quote:

Originally Posted by RyanShoff (Post 1481946)
We use these too. I haven't seen anything close to the price.

We tend to get a twitch, when trying to hold a wheel at a position that crosses from 5v - 0v. It probably could be calibrated out. We just don't set any wheels in either drive or strafe position to this position.

I would not recommend trying anything other than absolute feedback geared one to one with the wheel.

If you read the technical documents, you will find that the voltage output is not 0v to 5v. Depending on the model, I think it's roughly 0.1v to 4.9v. It's very simple to fix.

AdamHeard 13-05-2015 19:30

Re: Best Sensor for Unlimited Rotation Swerve
 
Quote:

Originally Posted by RyanShoff (Post 1481946)
We use these too. I haven't seen anything close to the price.

We tend to get a twitch, when trying to hold a wheel at a position that crosses from 5v - 0v. It probably could be calibrated out. We just don't set any wheels in either drive or strafe position to this position.

I would not recommend trying anything other than absolute feedback geared one to one with the wheel.

Why?

Joe Johnson 13-05-2015 20:22

Re: Best Sensor for Unlimited Rotation Swerve
 
Quote:

Originally Posted by Ether (Post 1481922)
4-wheel independent-steering and independent-driven drivetrain, with unlimited steering rotation of the wheels and sensors, and no gaps in the sensor feedback

http://www.chiefdelphi.com/forums/sh...07&postcount=9

http://www.chiefdelphi.com/forums/sh...4&postcount=13



I second your thought expressed in the second link above:
So says JVN. So say we all.
Now a question for you Ether, two actually.

1) "No gaps in feedback sensor feedback" Strange wording. First of all, it is inconceivable to have swerve without feedback loops controlling the steering angle. Open Loop steering control is just not Swerve in my view. So... if I have infinite steering angles, then (for me at least) that implies sensors sufficient to provide the control loops information it needs to do its job.

Are there people in the world who would design a sensor system that would have gaps? You don't say anything about wheels that have continuous outer surfaces -- why the special attention to sensor gaps?

2) Can I get you to agree to a new definition that replaces 4 with N (N=number of drive wheels on the robot and must be >2)? If a team has 6 drive wheels then all of them have to have independent steering and infinitely turnable. Same with 3, 5, or 57.

I am torn about 2. If they had caster or omniwheels that were not powered but the 2 that were powered were independently steered and so on... Is that "Unicorn Swerve"? I say nay. "Unipony Swerve" is the best I am going to give them.

Ether, what say you?

Dr. Joe J.

Mike Bortfeldt 13-05-2015 20:43

Re: Best Sensor for Unlimited Rotation Swerve
 
Joe,

I think the "No gaps in sensor feedback" relates to the use of some potentiometers (and other sensors) like this one. While they are continuous rotation, electrically they have a gap in the signal for about 20 degrees of rotation.

Mike

Joe Johnson 13-05-2015 21:19

Re: Best Sensor for Unlimited Rotation Swerve
 
Quote:

Originally Posted by Mike Bortfeldt (Post 1481967)
Joe,

I think the "No gaps in sensor feedback" relates to the use of some potentiometers (and other sensors) like this one. While they are continuous rotation, electrically they have a gap in the signal for about 20 degrees of rotation.

Mike

Bleck! I threw a a little as I thought of someone going to all the trouble of making a swerve with infinite rotation and then using a sensor with a 20 degree no signal zone.

How's that going to end well?

Dr. Joe J.

Ether 13-05-2015 21:39

Re: Best Sensor for Unlimited Rotation Swerve
 
Quote:

Originally Posted by Joe Johnson (Post 1481964)
Now a question for you Ether, two actually

1) What Mike said. I vaugely remember that there was some discussion back then about swerve designs with continuous-rotation pots with gaps. I wanted to explicitly rule that out.

2) Sure. That seems reasonable.



PAR_WIG1350 14-05-2015 00:48

Re: Best Sensor for Unlimited Rotation Swerve
 
Quote:

Originally Posted by Joe Johnson (Post 1481972)
Bleck! I threw a a little as I thought of someone going to all the trouble of making a swerve with infinite rotation and then using a sensor with a 20 degree no signal zone.

How's that going to end well?

Dr. Joe J.

I have been working on a background project with a sensor that gives a ~7 degree gap, which I considered to be quite bad. 20 degrees is just pure evil!

teku14 15-05-2015 07:59

Re: Best Sensor for Unlimited Rotation Swerve
 
https://pixhawk.org/modules/px4flow

We're experimenting with this in the off-season... please critique on this idea

Andrew Schreiber 15-05-2015 08:34

Re: Best Sensor for Unlimited Rotation Swerve
 
Quote:

Originally Posted by teku14 (Post 1482216)
https://pixhawk.org/modules/px4flow

We're experimenting with this in the off-season... please critique on this idea

I like the idea, I'd be curious how you get around the issues with it's max velocity. It's designed for aerial vehicles so the camera expects to have a long distance to the ground. To get data for 14 fps you'd need to mount it 18 inches from the ground.

4/(1/400)*18*.0254/(.004/.000024)*3.28 = 14.4

RyanShoff 15-05-2015 14:35

Re: Best Sensor for Unlimited Rotation Swerve
 
Quote:

Originally Posted by AdamHeard (Post 1481957)
I would not recommend trying anything other than absolute feedback geared one to one with the wheel.

Why?

Because we've tested robots that violated that, and they caused lots of trouble.

Early in our swerve testing, we didn't store the offset from a known direction. So our absolute feedback was really incremental. Every time you changed batteries, rebooted, pushed code, or suffered a brown out, you had to make sure the wheels where pointed in a specific direction. That gets old really quick. Also different people would set the wheels slightly differently, or worse incorrectly.

We had another test chassis with the feedback geared 2:1 to the direction. On this one, you still had to start the robot with the wheels pointed close to straight. The robot always knew the axis of the wheel, but not which direction it would go. It was a real joy, because we tried to count the 2.5v crossings of an analog 0-5v signal. Sometimes it would miss count and the wheel would start dragging.

I cringed when I saw Andymark release their swerve modules this year with non1:1 gearing on the feedback.

So I always recommend to teams thinking about a swerve drive: Use absolute feedback and gear it 1:1 to steering rotation.

Analog or digital signaling shouldn't really matter much. But the analog sensors quoted above are the cheapest I've seen.

To Bryce2471:
We do scale the analog voltage from the datasheet to 0-5v. It still twitches, but I haven't really tried to fix it. I agree it should be an easy fix, unless maybe the sensor has trouble pulling the signal quick enough.

AdamHeard 15-05-2015 15:10

Re: Best Sensor for Unlimited Rotation Swerve
 
Quote:

Originally Posted by RyanShoff (Post 1482364)
Because we've tested robots that violated that, and they caused lots of trouble.

Early in our swerve testing, we didn't store the offset from a known direction. So our absolute feedback was really incremental. Every time you changed batteries, rebooted, pushed code, or suffered a brown out, you had to make sure the wheels where pointed in a specific direction. That gets old really quick. Also different people would set the wheels slightly differently, or worse incorrectly.

We had another test chassis with the feedback geared 2:1 to the direction. On this one, you still had to start the robot with the wheels pointed close to straight. The robot always knew the axis of the wheel, but not which direction it would go. It was a real joy, because we tried to count the 2.5v crossings of an analog 0-5v signal. Sometimes it would miss count and the wheel would start dragging.

I cringed when I saw Andymark release their swerve modules this year with non1:1 gearing on the feedback.

So I always recommend to teams thinking about a swerve drive: Use absolute feedback and gear it 1:1 to steering rotation.

Analog or digital signaling shouldn't really matter much. But the analog sensors quoted above are the cheapest I've seen.

To Bryce2471:
We do scale the analog voltage from the datasheet to 0-5v. It still twitches, but I haven't really tried to fix it. I agree it should be an easy fix, unless maybe the sensor has trouble pulling the signal quick enough.

We ran an entire season (and seperately an offseason) with swerves that had incremental steering encoders.

We loved it. Not having any hardcoded positions was great. Could replace a module or sensor and not have to touch code.

We zero'd by hand straight and/or used a seperate zeroing sensor when we felt like it.

In the future we'd do it again but use a mechanical hardstop (deployable pin or something) to zero with a hall effect as a backup.

Not having any magic numbers in code is magical.

RyanShoff 15-05-2015 16:10

Re: Best Sensor for Unlimited Rotation Swerve
 
Quote:

Originally Posted by AdamHeard (Post 1482375)
Not having any magic numbers in code is magical.

I agree hard coding calibration values is bad.

We put a button on the smart dashboard called 'zero encoders'. Pushing it stores the steering encoder positions to the roborio using Preferences. That way there is nothing hardcoded, and the same code will work on two different robots. If something mechanically changes on the bot, just set the wheels to straight, press the button, and the new offsets are stored.

AdamHeard 15-05-2015 16:14

Re: Best Sensor for Unlimited Rotation Swerve
 
Quote:

Originally Posted by RyanShoff (Post 1482385)
I agree hard coding calibration values is bad.

We put a button on the smart dashboard called 'zero encoders'. Pushing it stores the steering encoder positions to the roborio using Preferences. That way there is nothing hardcoded, and the same code will work on two different robots. If something mechanically changes on the bot, just set the wheels to straight, press the button, and the new offsets are stored.

That is essentially the same though. It requires the robot to be on and get comm for the sensor position to be saved.

Might not be enough time to do that in elims.


All times are GMT -5. The time now is 09:27.

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