Go to Post Did you inform McMaster Carr that up to 3000 FRC teams would all be attempting to acquire a very specific spring ASAP all on the same weekend? - cgmv123 [more]
Home
Go Back   Chief Delphi > Technical > Electrical
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 10-09-2015, 10:25
CadetGizmo's Avatar
CadetGizmo CadetGizmo is offline
The guy with the horse mask
AKA: Ethan Sanborn
FRC #1073 (The FORCE Team)
Team Role: Electrical
 
Join Date: Sep 2015
Rookie Year: 2015
Location: Hollis, NH
Posts: 39
CadetGizmo has a spectacular aura aboutCadetGizmo has a spectacular aura about
PID functionality on the Talon SRX?

Hi everyone! First time poster here, so sorry in advance if I'm practicing any ill-advised posting methods.

Our team is considering incorporating PID controllers for either an off-season project or possibly this year's game.

So, I'd like to hear from some people on here who have had past experience with this system! The main things that I'm worried about are pros and cons of the system, but I'd also love to hear anyone's personal experiences with using PID controllers!
  #2   Spotlight this post!  
Unread 10-09-2015, 13:41
tr6scott's Avatar
tr6scott tr6scott is offline
Um, I smell Motor!
AKA: Scott McBride
FRC #2137 (TORC)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2005
Location: Oxford, MI
Posts: 535
tr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond reputetr6scott has a reputation beyond repute
Re: PID functionality on the Talon SRX?

I might suggest that you post the details of the application where you would want to do this, and then ask for feedback from the community.

The success of the PID solution is all in the details.

If you read the manual, in section 18 they have the code that is running on the Talon SRX.

http://www.ctr-electronics.com/Talon...e%20Manual.pdf
__________________
The sooner we get behind schedule, the more time we have to catch up.

  #3   Spotlight this post!  
Unread 10-09-2015, 22:47
CadetGizmo's Avatar
CadetGizmo CadetGizmo is offline
The guy with the horse mask
AKA: Ethan Sanborn
FRC #1073 (The FORCE Team)
Team Role: Electrical
 
Join Date: Sep 2015
Rookie Year: 2015
Location: Hollis, NH
Posts: 39
CadetGizmo has a spectacular aura aboutCadetGizmo has a spectacular aura about
Re: PID functionality on the Talon SRX?

Ah, yes, sorry. Currently we don't have a type of driving system that we want to implement the PIDs on, but rather the general idea of using PIDs on a drive base in general. We have a 6 CIM lying around as of now, and PID functionality might be a fun project.
  #4   Spotlight this post!  
Unread 10-09-2015, 23:03
Ari423's Avatar
Ari423 Ari423 is offline
LabVIEW aficionado and robot addict
AKA: The guy with the yellow hat
FRC #5987 (Galaxia)
Team Role: Mentor
 
Join Date: Mar 2015
Rookie Year: 2012
Location: Haifa, Israel
Posts: 658
Ari423 has much to be proud ofAri423 has much to be proud ofAri423 has much to be proud ofAri423 has much to be proud ofAri423 has much to be proud ofAri423 has much to be proud ofAri423 has much to be proud ofAri423 has much to be proud ofAri423 has much to be proud of
Re: PID functionality on the Talon SRX?

Maybe someone can explain, I never understood the benefit of using PID through the talons (or jags). You have the downside of not being able to see the encoder data on the roboRIO, but what is the upside?
__________________
2017-present: Mentor FRC 5987
2017-present: CSA for FIRST in Israel
2012-2016: Member FRC 423
2013: Programmer
2014: Head Programmer, Wiring
2015: Head Programmer, Wiring
2016: Captain, Head Programmer, Wiring, Manipulator, Chassis, CAD, Business, Outreach (basically everything)


  #5   Spotlight this post!  
Unread 10-09-2015, 23:15
TheHolyHades1 TheHolyHades1 is offline
Registered User
no team
 
Join Date: Jan 2014
Rookie Year: 2010
Location: usa
Posts: 145
TheHolyHades1 is a jewel in the roughTheHolyHades1 is a jewel in the roughTheHolyHades1 is a jewel in the rough
Re: PID functionality on the Talon SRX?

Quote:
Originally Posted by Ari423 View Post
Maybe someone can explain, I never understood the benefit of using PID through the talons (or jags). You have the downside of not being able to see the encoder data on the roboRIO, but what is the upside?
With the Talons, you get PID built in. It can run in a tight closed loop, possibly faster than you can with the RoboRIO if you're doing a lot of processing on it. Also, it's harder to get the timing right on the roborio than on the talon which serves as a dedicated processor - along the same lines, it's harder to count all of the encoder ticks, especially if you're using a high tick encoder.

Also, as it turns out, you *can* get the encoder (sensor) data back from the Talon(SRX), in either 20 ms or 100 ms intervals by default. The 100ms intervals will stay (in a different control frame), but you can customize the 20ms interval for the sensor frame.

In short, I think it's just easier to get up and running with that if you're not in the mood to spend hours and hours testing timing code and don't really care to do super advanced control loops.
  #6   Spotlight this post!  
Unread 11-09-2015, 08:14
GeeTwo's Avatar
GeeTwo GeeTwo is offline
Technical Director
AKA: Gus Michel II
FRC #3946 (Tiger Robotics)
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 3,723
GeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond reputeGeeTwo has a reputation beyond repute
Re: PID functionality on the Talon SRX?

Also, as you do this, you may want to rethink the placement of the motor controller. If you aren't using encoders at all, or are connecting them to the 'RIO, you'll usually want the motor controller to be on the control board to minimize the number of wires being run out to the motors. With the encoder wires going to the Talon, you may want to move it out closer to the motor and sensor. The combined powered wire run (PDP to Talon to motor) is the main run you want to keep short to reduce resistance losses. Reducing the length of sensor and CAN wires is secondary.
__________________

If you can't find time to do it right, how are you going to find time to do it over?
If you don't pass it on, it never happened.
Robots are great, but inspiration is the reason we're here.
Friends don't let friends use master links.
  #7   Spotlight this post!  
Unread 11-09-2015, 17:45
Levansic's Avatar
Levansic Levansic is offline
Registered User
AKA: Len Evansic
FRC #0585 (Cyber Penguins)
Team Role: Mentor
 
Join Date: Jan 2012
Rookie Year: 2008
Location: Tehachapi, CA
Posts: 185
Levansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud ofLevansic has much to be proud of
Re: PID functionality on the Talon SRX?

PID (PIDF) on the Talon SRX is awesome! Now is the time to dive in on an off-season project to figure them out.

We used them for position and speed control this year. They delivered on the promise that the Jaguars couldn't. As GeeTwo said, they pass the data back to the roborio. The onboard loops are very tight, and wiring is really simplified using CAN. We taped over our DIO and AIO ports on the roborio, as we didn't need the FOD traps. The Talon SRX handled the switch IO for limits with the same breakout that we attached the encoder with.

I know that CTRE was working on some cool new expansion sensors for the SRX, which will just make them that much cooler. I don't want to get into those details, as they haven't announced new products yet. There is a lot of upside for this controller. You would do well to learn how to exploit its functionality now, way before build season.

Last edited by Levansic : 11-09-2015 at 17:47.
  #8   Spotlight this post!  
Unread 13-09-2015, 14:52
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: 751
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: PID functionality on the Talon SRX?

Quote:
Originally Posted by CadetGizmo View Post
Hi everyone! First time poster here, so sorry in advance if I'm practicing any ill-advised posting methods.

Our team is considering incorporating PID controllers for either an off-season project or possibly this year's game.

So, I'd like to hear from some people on here who have had past experience with this system! The main things that I'm worried about are pros and cons of the system, but I'd also love to hear anyone's personal experiences with using PID controllers!
We used the Talon SRX and the built in PID this year. Our take is we aren't one of those teams who want to write something from ground up. We tend to look around and not re-invent the wheel if someone has a product that will help us build our robot faster. Our goal is to always have a working robot in 5 WEEKS. Struggling for a couple of weeks with ground-up written software is not for us.

We are EXTREMELY happy with the performance, software, and features of the Talon SRX. I know without these on our robot, our robot would not have been as consistent as it was. PIDs help eliminate driver error with pre-written routines in your machine.

The main advantage our team sees is the following:

1. The processing of your PID loops are handled in a secondary microprocessor, in this example the Talon SRX. Your RIO only sends "commands" to the Talon SRX once you have your Talon "tuned".

2. You're not writing code in your RIO to handle complex PID. For example, the Talon SRX has built in ACCEL and DECEL handling. Here is a demo video from our elevator. The driver just pressed one button on our driver station, and an "automation" routine or a "state logic" machine took over and sent values to the Talon SRX which positions to go to. Look how smooth the ACCEL and DECEL is in the Talon SRX.
https://www.flickr.com/photos/teamth...7653103659130/

3. Something that really, really worried us...It is CAN BUS. If the CAN BUS goes down, we would be screwed. But after 3 District Events, 1 State Champs, and the World Champs, so far...no problems with CAN BUS on our competition robot. We had CAN BUS problems on our practice robot, but I think that is because the CAN BUS wires got tugged too hard one time or snagged on something.


I also disagree with the encoders not being able to be seen, you can see everything about the Talon's SRX. One time, we was troubleshooting the Talon SRX missing encoder counts, so we made this video for troubleshooting help. It turns out it was a software RESET in the RIO that was being called in a loop that was causing the counts to reset (our fault, not the Talon SRX), so we resolved this problem, however you can see the encoder counts LIVE in the video.
https://dl.dropboxusercontent.com/u/...lly-moving.MOV
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369
  #9   Spotlight this post!  
Unread 13-09-2015, 15:13
asid61's Avatar
asid61 asid61 is offline
Registered User
AKA: Anand Rajamani
FRC #1072 (MVRT)
Team Role: Mechanical
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Cupertino, CA
Posts: 2,231
asid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond repute
Re: PID functionality on the Talon SRX?

Quote:
Originally Posted by Chris_Elston View Post
2. You're not writing code in your RIO to handle complex PID. For example, the Talon SRX has built in ACCEL and DECEL handling. Here is a demo video from our elevator. The driver just pressed one button on our driver station, and an "automation" routine or a "state logic" machine took over and sent values to the Talon SRX which positions to go to. Look how smooth the ACCEL and DECEL is in the Talon SRX.
https://www.flickr.com/photos/teamth...7653103659130/
So are you implementing special code (state logic) on the RIO, or is that entire movement all programmed into the Talon? That is extremely smooth!
__________________
<Now accepting CAD requests and commissions>


Last edited by asid61 : 13-09-2015 at 15:15.
  #10   Spotlight this post!  
Unread 13-09-2015, 15:21
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: 751
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: PID functionality on the Talon SRX?

Quote:
Originally Posted by asid61 View Post
So are you implementing special code (state logic) on the RIO, or is that entire movement all programmed into the Talon?
You write all your State Logic in the RIO.

Basically something like this...Let's use the video as reference:

State 1
Grip CAN

State 2
Send Position to Talon SRX = 10,000 counts or "30 inches".

State 3
Retract Drawer

State 4
Send Position to Talon SRX = 9,000 counts or "28 inches".

State 5
Ungrip CAN

etc...

Basically, at those states, you use the Talon SRX library to send position values to the Talon SRX over CAN BUS. It's really easy. Prior to sending commands, you need to TUNE your mechanical system until it's stable, then you can just issue commands or presets to the Talon SRX after that.

The manual referenced above already, is the bible to the Talon SRX library.
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369
  #11   Spotlight this post!  
Unread 13-09-2015, 15:23
asid61's Avatar
asid61 asid61 is offline
Registered User
AKA: Anand Rajamani
FRC #1072 (MVRT)
Team Role: Mechanical
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Cupertino, CA
Posts: 2,231
asid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond reputeasid61 has a reputation beyond repute
Re: PID functionality on the Talon SRX?

Quote:
Originally Posted by Chris_Elston View Post
You write all your State Logic in the RIO.

Basically something like this...Let's use the video as reference:

State 1
Grip CAN

State 2
Send Position to Talon SRX = 10,000 counts or "30 inches".

State 3
Retract Drawer

State 4
Send Position to Talon SRX = 9,000 counts or "28 inches".

State 5
Ungrip CAN

etc...

Basically, at those states, you use the Talon SRX library to send position values to the Talon SRX over CAN BUS. It's really easy. Prior to sending commands, you need to TUNE your mechanical system until it's stable, then you can just issue commands or presets to the Talon SRX after that.

The manual referenced above already, is the bible to the Talon SRX library.
Oh wow, so all you're doing is just executing one command after another. All the smoothness comes form the Talon. Definitely trying this! Thank you.
__________________
<Now accepting CAD requests and commissions>

  #12   Spotlight this post!  
Unread 13-09-2015, 15:28
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: 751
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: PID functionality on the Talon SRX?

Quote:
Originally Posted by asid61 View Post
Oh wow, so all you're doing is just executing one command after another. All the smoothness comes form the Talon. Definitely trying this!
CORRECT. That's what I mean, the TALON has built in ACCEL and DECEL into their PID algorithms. You can set how smooth or aggressive you want it by another TALON SRX library control. I believe if memory serves me, you use the "SET RAMP RATE" VI.
__________________
Team T.H.R.U.S.T. 1501
Download all of our past robot's source code here:Repository

Favorite CD quote:
"That can't be their 'bot. not nearly enough (if any) rivets to be a 1501 machine." ~RogerR: Team #1369
  #13   Spotlight this post!  
Unread 13-09-2015, 16:51
Ken Streeter's Avatar
Ken Streeter Ken Streeter is offline
Let the MAYHEM begin!
FRC #1519 (Mechanical Mayhem)
Team Role: Engineer
 
Join Date: Feb 2005
Rookie Year: 2005
Location: Team: Milford, NH; Me: Bedford, NH
Posts: 475
Ken Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond reputeKen Streeter has a reputation beyond repute
Re: PID functionality on the Talon SRX?

Quote:
Originally Posted by CadetGizmo View Post
Our team is considering incorporating PID controllers for either an off-season project or possibly this year's game.

So, I'd like to hear from some people on here who have had past experience with this system! The main things that I'm worried about are pros and cons of the system, but I'd also love to hear anyone's personal experiences with using PID controllers!
Last year, 1519 used the PIDF control loops in the Talon SRX in our mecanum drive code, as well as for our elevator. We were very happy with its performance, both in teleop and autonomous. Our autonomous performance last year probably speaks for itself.

We'd be happy to provide more info -- look us up at one of the fall off-season events (we're planning to attend River Rage and Battle of the Bay) and we'll be glad to give you more details.

If we're selected as a Beta Test team this fall, we'll probably also have an "open house" event again this year (like the one that 1073 hosted for us last year!) and could provide more details at that time, too.

Lastly, if you want some personal help at one of your meetings, you're sufficiently close by that I could come over if you'd like.
__________________
Ken Streeter - Team 1519 - Mechanical Mayhem (Milford Area Youth Homeschoolers Enriching Minds)
2015 NE District Winners with 195 & 2067, 125 & 1786, 230 & 4908, and 95 & 1307
2013 World Finalists & Archimedes Division Winners with 33 & 469
2013 & 2012 North Carolina Regional Winners with teams 435 & 4828 and 1311 & 2642
2011, 2010, 2006 Granite State Regional Winners with teams 175 & 176, 1073 & 1058, and 1276 & 133
Team 1519 Video Gallery - including Chairman's Video, and the infamous "Speed Racer!"
Closed Thread


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 20:24.

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


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