OCCRA
Go to Post Anything released in a game hint is subject to enough misinterpretation and "nah, they'll never do that" to deflect any possibility of something being actionable. - EricH [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 08-19-2018, 08:51 PM
llung llung is offline
Registered User
FRC #4048
 
Join Date: Jan 2013
Location: Westborough, MA
Posts: 21
llung is an unknown quantity at this point
Team 4048 - swerve drive code release

FRC Team 4048/Redshift has used the AndyMark swerve drive modules the past 2 years. Last year's re-write was made in a more portable/layered form so that it can be more easily adapted to other off-the-shelf or custom swerve modules. Since swerve is not natively supported in WPIlib we're releasing our Java and C++ versions. Links to the Git repository are on our team web page:

http://team4048.org/software.html

The Java code is fully tested and working. The C++ code is really close but needs more debugging to make it work right. There is also a LabVIEW version that was working when last used; but it's been a while since we've tried it so we need to take another look before posting it.

The code supports 8 motors (4 for steering, 4 for driving), uses Talon SRX controllers for PID steering, and a gyro/IMU for field-centric driving (switchable to robot-centric).

tkx
Reply With Quote
  #2   Spotlight this post!  
Unread 08-20-2018, 06:51 AM
gerthworm's Avatar
gerthworm gerthworm is offline
Making the 1's and 0's
FRC #1736 (Robot Casserole)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Peoria, IL
Posts: 645
gerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond repute
Re: Team 4048 - swerve drive code release

Thanks for sharing! A couple thoughts:

1) Do you have a list of the public API's? AKA, what are the methods the user is expected to interact with to make the code do its thing?

2) Awesome job putting in testcases!

3) Any plans to release this as a gradle artifact for easy pickup in 2019?
Reply With Quote
  #3   Spotlight this post!  
Unread 08-20-2018, 07:54 PM
llung llung is offline
Registered User
FRC #4048
 
Join Date: Jan 2013
Location: Westborough, MA
Posts: 21
llung is an unknown quantity at this point
Re: Team 4048 - swerve drive code release

Quote:
Originally Posted by gerthworm View Post
Thanks for sharing! A couple thoughts:

1) Do you have a list of the public API's? AKA, what are the methods the user is expected to interact with to make the code do its thing?

2) Awesome job putting in testcases!

3) Any plans to release this as a gradle artifact for easy pickup in 2019?
I'm going to beg a little ignorance here as it's been a while since I looked at the code. That said...
(1) I thought the sample code had this covered. But if it's not obvious than clearly it needs more/better documentation.
(2) tkx!
(3) No plans here.

The hope is to get the current C++ and LabVIEW version debugged when school starts again in the Fall. Beyond that, any code changes will all depends on how much student and mentor time we have before the 2019 build season starts. Looking ahead to 2019 - one gotcha for 2018 when we wrote this code was that CTR Electronics made major changes to the TalonSRX interface. If a change of that magnitude were to occur again, there'll be more work to be done (of course one can always use a software PID instead of the one in the TalonSRX and not worry about the CTRE library).

Any and all suggestions are welcome.

tkx
-lou
Reply With Quote
  #4   Spotlight this post!  
Unread 08-20-2018, 08:04 PM
maccopacco's Avatar
maccopacco maccopacco is offline
Registered User
AKA: maccopacco
FRC #3452 (GreengineerZ)
Team Role: Programmer
 
Join Date: Mar 2017
Rookie Year: 2016
Location: Berrien Springs, Michigan
Posts: 75
maccopacco is an unknown quantity at this point
Re: Team 4048 - swerve drive code release

Looks like move(double fwd, double str, double rcw, Double gyroValue) out of SwerveDrive.java
Reply With Quote
  #5   Spotlight this post!  
Unread 08-20-2018, 08:24 PM
gerthworm's Avatar
gerthworm gerthworm is offline
Making the 1's and 0's
FRC #1736 (Robot Casserole)
Team Role: Mentor
 
Join Date: Jan 2015
Rookie Year: 2015
Location: Peoria, IL
Posts: 645
gerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond reputegerthworm has a reputation beyond repute
Re: Team 4048 - swerve drive code release

Quote:
Originally Posted by llung View Post
sample code had this covered
Ah, fair enough, I missed that. Teaching by example works great!
Reply With Quote
Reply


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump


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

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


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