OCCRA
Go to Post Where can I buy the awesomeness that you used on that? Do they sell it at andymark? - HansJ [more]
Home
Go Back   Chief Delphi > Technical > Programming > NI LabVIEW
CD-Media  
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 03-07-2018, 10:05 AM
calebbagby calebbagby is offline
Registered User
FRC #6937
 
Join Date: Mar 2018
Location: Tennessee
Posts: 6
calebbagby is an unknown quantity at this point
Andymark Swerve Drive Labview Programming Help

We have purchased 4 andymark swerve drive modules with absolute encoders on each, but are struggling with the programming. Is there any chance anyone could send some current gen (2017 or 18) labview programming examples?
Reply With Quote
  #2   Spotlight this post!  
Unread 03-07-2018, 11:05 AM
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 820
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: Andymark Swerve Drive Labview Programming Help

We played with it in the FALL. I wrote a version and my head programmer wrote a version. I don't have his version uploaded.

We did not use swerve on the robot this season, however you are welcome to look at the code. Me and head programmer learned from what Apple Pi had done. (Thanks Apple Pi, our 4-H team twins!)

We are using the AndyMark swerve modules with the analog sensors for steering. This code is NOT FINAL, it works except we haven't figure how not to get the pods to rotate all the way around the long way. All of our code, electrical prints are archived on frcsoft. This was made in 2017 Labview, so you have to port it over to 2018 for sure, because the libraries are drastically different this year.

http://www.frcsoft.com/forums/index....ds&showfile=70

We learned alot from Ether's Swerve_Steer_8 spreadsheet, I think you can download that from CD Media. If you can not find it, let me know. (Thank you Ether)
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository
Reply With Quote
  #3   Spotlight this post!  
Unread 03-07-2018, 11:28 AM
marshall's Avatar
marshall marshall is offline
"Who's Marshall?"
FRC #0900 (The Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 3,062
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: Andymark Swerve Drive Labview Programming Help

Quote:
Originally Posted by Chris_Elston View Post
We learned alot


I now imagine an alot with swerve wheels...

Also - we used to do LabVIEW Swerve so check out our old Github repos from 2015 and 2017.
__________________
"La mejor salsa del mundo es la hambre" - Miguel de Cervantes
"The future is unwritten" - Joe Strummer
"Simplify, then add lightness" - Colin Chapman
Clarke's Laws
Reply With Quote
  #4   Spotlight this post!  
Unread 03-07-2018, 11:45 AM
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 820
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: Andymark Swerve Drive Labview Programming Help

Quote:
Originally Posted by marshall View Post
I now imagine an alot with swerve wheels...
Make fun of me all you want, I don't care. I am here to inspire and help the students when I can with what I know. I got a D- in English in college. I am not here to teach English lessons. Sorry I offended you.

Attached Thumbnails
Click image for larger version

Name:	me.jpg
Views:	12
Size:	22.1 KB
ID:	23155  
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository
Reply With Quote
  #5   Spotlight this post!  
Unread 03-07-2018, 11:48 AM
marshall's Avatar
marshall marshall is offline
"Who's Marshall?"
FRC #0900 (The Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 3,062
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: Andymark Swerve Drive Labview Programming Help

Quote:
Originally Posted by Chris_Elston View Post
Make fun of me all you want, I don't care. I am here to inspire and help the students when I can with what I know. I got a D- in English in college. I am not here to teach English lessons. Sorry I offended you.

I'm not offended but obviously you are. My post was not meant to offend as I find it humorous - thus the amusing and cute picture of the "alot".

You should try not to use engineering as a cover for poor English. It leads me to having to tell people I can't hire them because they can't communicate. A large portion of engineering is communication. Spelling and grammar are part of that.
__________________
"La mejor salsa del mundo es la hambre" - Miguel de Cervantes
"The future is unwritten" - Joe Strummer
"Simplify, then add lightness" - Colin Chapman
Clarke's Laws
Reply With Quote
  #6   Spotlight this post!  
Unread 03-07-2018, 11:49 AM
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 820
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: Andymark Swerve Drive Labview Programming Help

Quote:
Originally Posted by calebbagby View Post
We have purchased 4 andymark swerve drive modules with absolute encoders on each, but are struggling with the programming. Is there any chance anyone could send some current gen (2017 or 18) labview programming examples?
Here are a couple of videos of that setup, if that helps you. I looked at what was posted, and in that version of code, the pods rotate the "long" way just so you know. But a good start to help you, I hope. Good luck this season.

https://www.dropbox.com/sh/58v17fc20...5zfZn7Y4a?dl=0
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Last edited by Chris_Elston : 03-07-2018 at 11:52 AM.
Reply With Quote
  #7   Spotlight this post!  
Unread 03-07-2018, 02:58 PM
calebbagby calebbagby is offline
Registered User
FRC #6937
 
Join Date: Mar 2018
Location: Tennessee
Posts: 6
calebbagby is an unknown quantity at this point
Re: Andymark Swerve Drive Labview Programming Help

Chris,
Thank you. This is wildly helpful. We actually had used Spark Motor controllers, instead of Talon SRXs. I have ordered some to put on the robot at the competition, but in the meantime, is there any way to do this with sparks instead of talons?
Reply With Quote
  #8   Spotlight this post!  
Unread 03-07-2018, 03:08 PM
marshall's Avatar
marshall marshall is offline
"Who's Marshall?"
FRC #0900 (The Zebracorns)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2003
Location: North Carolina
Posts: 3,062
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: Andymark Swerve Drive Labview Programming Help

Quote:
Originally Posted by calebbagby View Post
Chris,
Thank you. This is wildly helpful. We actually had used Spark Motor controllers, instead of Talon SRXs. I have ordered some to put on the robot at the competition, but in the meantime, is there any way to do this with sparks instead of talons?
You should be able to process your encoder data on the RIO and use the sparks similarly to how you would use the Talons. The closed loop will have to happen on the RIO instead of on a Talon SRX though.
__________________
"La mejor salsa del mundo es la hambre" - Miguel de Cervantes
"The future is unwritten" - Joe Strummer
"Simplify, then add lightness" - Colin Chapman
Clarke's Laws
Reply With Quote
  #9   Spotlight this post!  
Unread 03-08-2018, 08:05 AM
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 820
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: Andymark Swerve Drive Labview Programming Help

Quote:
Originally Posted by calebbagby View Post
Chris,
Thank you. This is wildly helpful. We actually had used Spark Motor controllers, instead of Talon SRXs. I have ordered some to put on the robot at the competition, but in the meantime, is there any way to do this with sparks instead of talons?
The nice thing about Talon SRX controllers, is that they have built-in motor control or closed loop features that make it easier to program. If you bought Talons, you could get away with having just 4 Talons, one for each steering pod. This is where the closed loop control is needed the most.

The drive motors could remain Spark controllers to help reduce cost or budget in the robot.

If you must use Spark controllers for the steering pods, then you will need to create or use the internal PID function in labview. The code provided by Apple Pi calculates the angle where the wheels need to turn in the screen shot provided below. Where it sets the Motor Output would need to be replaced with PID block(s) that is always checking some scaled value of your angle turn as well from your analog sensors.

There would not be much code changes if Talons SRX could be used for the steering pods. But you still do need to replace and update to the new CTRE libraries, as you can see the sample is broken because it was create in last years labview if you opened in this years labview version, where as the libraries are now considered 3rd party.
Attached Thumbnails
Click image for larger version

Name:	sparks.jpg
Views:	39
Size:	107.9 KB
ID:	23162  
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Last edited by Chris_Elston : 03-08-2018 at 11:56 AM. Reason: clarify on 4 talons, one for each pod, not 4 talons per pod.
Reply With Quote
  #10   Spotlight this post!  
Unread 03-08-2018, 11:04 AM
calebbagby calebbagby is offline
Registered User
FRC #6937
 
Join Date: Mar 2018
Location: Tennessee
Posts: 6
calebbagby is an unknown quantity at this point
Re: Andymark Swerve Drive Labview Programming Help

So many of the icons and language have changed from 2017-2018... For instance, the SETREFERENCE in begin no longer exists as it was in the 2017 version. I have tried to come up with something similar but it doesnt seem to mesh.

It is also making several dependency errors in the example you sent.

https://drive.google.com/file/d/17Fi...ew?usp=sharing

https://drive.google.com/file/d/1vco...ew?usp=sharing
Reply With Quote
  #11   Spotlight this post!  
Unread 03-08-2018, 12:13 PM
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 820
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: Andymark Swerve Drive Labview Programming Help

Quote:
Originally Posted by calebbagby View Post
So many of the icons and language have changed from 2017-2018...
Yes...this is a PAIN...for labview, I would not recommend opening up the old sample Labview (2016) and trying to make it work in this years Labview (2017). There are things we don't know behind the scenes that have changed. For example a big change is the CTRE libraries are moved out, and that's why the 2016 project is all broken.

The way I would recommend to keep you out of trouble would be to start a new robot project in this years Labview (2017) version, and re-create the logic you see in the a new robot template. This way all the new dependencies will have the latest update. It will be a pain to re-create all of that but it will work correctly in the end. I am sure there are "porting" guides to walk you through it or someone on here might be able to give you advice how to port a Labview 2016 to Labview 2017 project, but by the time you fight with all that, you could have just redone the whole thing in Labview 2017. Plus by actually wiring and programming it, you learn every part of the code, which helps understand it better I think, atleast for me.

Just make sure you install the latest Labview Update and the latest CTRE library before you begin. Then create a new labview robot template and go from there. When it comes time to deploy on the RIO, don't forgot to format the RIO and do the Lifeboat update from CTRE.

https://wpilib.screenstepslive.com/s...8-labview-only
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository
Reply With Quote
  #12   Spotlight this post!  
Unread 03-08-2018, 01:49 PM
calebbagby calebbagby is offline
Registered User
FRC #6937
 
Join Date: Mar 2018
Location: Tennessee
Posts: 6
calebbagby is an unknown quantity at this point
Re: Andymark Swerve Drive Labview Programming Help

For the analog encoders, did you run them directly to the Talon SRX or did you run them to the analog port on the rio? We are using these, and attaching them to the analog ports on the rio. Thanks!
Reply With Quote
  #13   Spotlight this post!  
Unread 03-08-2018, 01:54 PM
Chris_Elston's Avatar
Chris_Elston Chris_Elston is offline
Controls Engineer
AKA: chakorules
FRC #1501 (Team THRUST)
Team Role: Engineer
 
Join Date: Feb 2004
Rookie Year: 2001
Location: Huntington, Indiana
Posts: 820
Chris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond reputeChris_Elston has a reputation beyond repute
Re: Andymark Swerve Drive Labview Programming Help

Quote:
Originally Posted by calebbagby View Post
For the analog encoders, did you run them directly to the Talon SRX or did you run them to the analog port on the rio? We are using these, and attaching them to the analog ports on the rio. Thanks!
If you are going to use the Talons SRX for position control of your steering pods, then the analog sensors need to be connected directly to the Talons.

You will need this board, to solder the analog sensor too, then connect it directly to the talon. I dunno if you can see that in the video I posted earlier, but the big gear is connected to the analog sensor and that is wired to a local talon for that pod.

http://www.andymark.com/product-p/am-2634.htm
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository
Reply With Quote
  #14   Spotlight this post!  
Unread 03-08-2018, 07:14 PM
page2067's Avatar
page2067 page2067 is offline
Registered User
AKA: rick page
FRC #2067 (Apple Pi)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Guilford CT
Posts: 216
page2067 is a jewel in the roughpage2067 is a jewel in the roughpage2067 is a jewel in the rough
Re: Andymark Swerve Drive Labview Programming Help

Chris we (Apple Pi) always love to hear that teams find usefulness from our code - particularly a team like yours we admire so much (ever since you came to CT in 2010 with your tiny triangle robot).

The latest variant of code we have posted is identified here: https://www.chiefdelphi.com/forums/s...pple+pi+swerve

But as mentioned requires some updating due to CTRE changes. If you go to our 2015 code it does not use Talon SRX libraries - all on RoboRio and is an alternative approach, though we do like the pigeon imu.

This year during build season we have substantially overhauled this and are including Motion Magic for the steering control. It is not yet ready for posting and likely will continue to evolve over the season, but is showing some promise.

We have found that the CTRE stuff is fantastic - but like a lot of powerful tools can have some unintended consequences, our programmers are all students, occasionally misguided by a retired Mech E mentor.

I have no problem with your englesh, and we also love being a 4H team!
Reply With Quote
  #15   Spotlight this post!  
Unread 03-08-2018, 07:25 PM
page2067's Avatar
page2067 page2067 is offline
Registered User
AKA: rick page
FRC #2067 (Apple Pi)
Team Role: Mentor
 
Join Date: Oct 2008
Rookie Year: 2008
Location: Guilford CT
Posts: 216
page2067 is a jewel in the roughpage2067 is a jewel in the roughpage2067 is a jewel in the rough
Re: Andymark Swerve Drive Labview Programming Help

"we haven't figure how not to get the pods to rotate all the way around the long way."

We only turn the wheels a maximum of 90 degrees, if the need is for more than 90 degrees, we reverse the direction of the drive wheels and rotate desired angle minus 180 degrees.
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 05:55 PM.

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


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