Chief Delphi

Chief Delphi (http://www.chiefdelphi.com/forums/index.php)
-   Programming (http://www.chiefdelphi.com/forums/forumdisplay.php?f=51)
-   -   Swerve Drive Control (http://www.chiefdelphi.com/forums/showthread.php?t=128437)

cjl2625 02-04-2014 14:44

Re: Swerve Drive Control
 
Ah, I see what you're saying. That's a pretty cool system.
I guess you're right about the gyro problems, we often reset it mid-match.

Bryce2471 02-04-2014 15:02

Re: Swerve Drive Control
 
I highly recommend that you try field-centric control. It is generally very intuitive, and allows for some complicated maneuvers to be very easy. If you do implement field-centric code, I highly recommend using a filter between gyro and compass sensors. (so that there is no drifting problem)

Also, because your driver is going to have to learn something new anyway, make sure you put in all your code before your driver gets too much stick time. Our driver drove in robot space for quite a while before we added field code. Now he just keeps it in robot-centric mode.:D

cjl2625 02-04-2014 15:46

Re: Swerve Drive Control
 
Quote:

Originally Posted by Bryce2471 (Post 1368458)
If you do implement field-centric code, I highly recommend using a filter between gyro and compass sensors. (so that there is no drifting problem)

Hmm, how does this work with a compass? I'd love to get rid of gyro drifting

Jefferson 02-04-2014 15:53

Re: Swerve Drive Control
 
Quote:

Originally Posted by cjl2625 (Post 1368504)
Hmm, how does this work with a compass? I'd love to get rid of gyro drifting

You also have to take into account the hits (especially this year). The hits can max out the gyro and cause you to lose your orientation.

Ether 02-04-2014 16:27

Re: Swerve Drive Control
 
Quote:

Originally Posted by Jefferson (Post 1368506)
You also have to take into account the hits (especially this year). The hits can max out the gyro and cause you to lose your orientation.

Add an easily-accessed joystick button in your code that the driver can simply press to re-zero the gyro whenever the robot is physically in the correct orientation.



RyanShoff 02-04-2014 16:44

Re: Swerve Drive Control
 
Our test swerve robot was just a box so the drivers had a hard time determining the "front". We wrapped an adafruit led strip around the robot. We lit half in green and half in red. Green is the "front". The driver has a button that swaps the front and the rear. Also there are buttons that rotate "front" around the robot. The led's change color to indicate the front. It looks really cool.

We didn't use it on our production robot this year because there is a defined front and we didn't want the drivers to go backwards much. And the led's would have been destroyed this year.

We decided it was better to have drivers who could "keep their head in the robot" than fight gyro errors.

We bought a cheap IMU but haven't had a chance to test it. We also have code to get the angle from the back wall with a Kinect sensor, but never really considered using that.

Also our github code assumes you have wires running to the drive motors. There is a #define MAXTURNS which limits the amount the swerve modules can twist before the wires are too tight. There is also an unwind function. Once we added sliprings we just set MAXTURNS to 100.

Skyehawk 02-04-2014 23:51

Re: Swerve Drive Control
 
Quote:

Originally Posted by Bryce2471 (Post 1368458)
I highly recommend that you try field-centric control. It is generally very intuitive, and allows for some complicated maneuvers to be very easy. If you do implement field-centric code, I highly recommend using a filter between gyro and compass sensors. (so that there is no drifting problem)

I will give this a try but first I would just like to get the whole thing moving.

I have decided that 180 degrees of rotation on the modules will probably be a better plan without sacrificing too much complexity on a starter bot.

Invictus3593 08-04-2014 09:47

Re: Swerve Drive Control
 
The masters of swerve drive *COUGH-bombsquad-COUGH* used a USB Steering-Wheel in 2013 for their orientation and just the normal Logitech Attack joystick for forward and back.

I don't know if this helps, but it would be really fun to drive! :D

Jefferson 08-04-2014 11:06

Re: Swerve Drive Control
 
Quote:

Originally Posted by Invictus3593 (Post 1371053)
The masters of swerve drive *COUGH-bombsquad-COUGH* used a USB Steering-Wheel in 2013 for their orientation and just the normal Logitech Attack joystick for forward and back.

I don't know if this helps, but it would be really fun to drive! :D

It was actually an old usb steering wheel that we gutted and put an analog encoder on the back of the shaft. We used the cypress board to feed that back to driver's station.
We've since switched to dual joysticks.

And thanks for the compliment. I don't think you ever master swerve, but we try to improve with every season.


All times are GMT -5. The time now is 21:56.

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