View Single Post
  #9   Spotlight this post!  
Unread 29-11-2016, 14:10
marshall's Avatar
marshall marshall is online now
My pants are louder than yours.
FRC #0900 (The Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 1,220
marshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond reputemarshall has a reputation beyond repute
Re: Team 4926 Swerve Drive CAD

Quote:
Originally Posted by asid61
I think your encoder stage should be fine, as long as you do the right math to convert it to true angle.
Quote:
Originally Posted by NowlingPro View Post
With some simple gear ratio math I think we should be able to get the right angle.
Math? Yes. Simple? No.

I will give you that the SRX libraries and CTRE sensors make this easier by overflowing and counting ticks and keeping them across reboots but it's not as simple as multiplying by a gear ratio. You also need to account for the angle over time and deal with different offsets for each module. Not to mention that least-turn-angle is a lot easier to implement without all of this.

Also, keep in mind the processing power of the controller and the fact that you are multiplying calculations by 4 for all of the modules. Swerve is CPU intensive and anyone who says otherwise isn't logging that data or paying any attention to it. Also keep in mind the limitations of the closed loop calculations that you can do on the Talons. PID is a lot easier with 1:1.

There is a reason other swerve designs incorporate 1:1 turning encoders. Teams went crazy in 2015 trying to figure out how to do it for the AM Swerve modules. Triple Strange just posted a design that had some not-so-simple machining to do it. Check out the 221 site and you'll see 1:1 for turning on all of their designs and crab chassis. There is a reason for this. This is a bigger headache than folks seem to think.
__________________
"La mejor salsa del mundo es la hambre" - Miguel de Cervantes
"The future is unwritten" - Joe Strummer
"Simplify, then add lightness" - Colin Chapman
Reply With Quote