OCCRA
Go to Post I can't think of a match where we didnt do the ritual. We always called it... "Deploying the code" - Briansmithtown [more]
Home
Go Back   Chief Delphi > Technical > Programming
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 08-10-2018, 02:59 PM
slong slong is offline
Registered User
FRC #0115
 
Join Date: Oct 2017
Location: California
Posts: 1
slong is an unknown quantity at this point
How are arms programmed?

There seem to be a lot of really nice arms on 2018 robots, and I was wondering how teams control the arms. Also for arms with 2 pivots, how do teams stabilize the wrist joint so it is always parallel to the ground?

Thanks
Reply With Quote
  #2   Spotlight this post!  
Unread 08-10-2018, 03:11 PM
justin.chau justin.chau is offline
Registered User
AKA: Justin Chau
FRC #1414 (IHOT Robotics)
Team Role: Mechanical
 
Join Date: Jun 2016
Rookie Year: 2016
Location: Atlanta, GA
Posts: 113
justin.chau is just really nicejustin.chau is just really nicejustin.chau is just really nicejustin.chau is just really nicejustin.chau is just really nice
Re: How are arms programmed?

Arms are typically controlled with a closed-loop control system. There are numerous ways of doing it, but one of the most common is called a PID controller. A way I like to explain it is a thermostat. It uses to the control loop to get the process variable (the value being measured) to reach a desired state or setpoint. It simply turns on and off repeatedly to achieve this. That controller is known as a bang-bang controller. In an arm, you use a sensor such as an encoder to measure the angle of the arm. The control loop calculates the error and the motor voltages needed to get rid of the error and maintain the setpoint. I would suggest looking up PID and understanding the concept. Once you get a hang of it you can look up motion profiling, which is a more advanced method of control. The Talon SRX speed controller can abstract a lot of this for you, so you can look at its documentation. Though, it would still be good to have an understanding first.

Your problem of keeping the arm parallel can be achieved mechanically using a 4 bar linkage (or other ones). Though, you can also achieve it through software.

Keep in mind, you need to size your system correctly for the control loops to work, enough torque, speed, etc.
__________________
IHOT Robotics - 1414| Captain | Mechanical Design

Last edited by justin.chau : 08-10-2018 at 03:16 PM.
Reply With Quote
  #3   Spotlight this post!  
Unread 08-10-2018, 03:16 PM
Tom Line's Avatar
Tom Line Tom Line is online now
Don't lay blame. Fix probems.
FRC #1718 (The Fighting Pi)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 1999
Location: Armada, Michigan
Posts: 3,200
Tom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond reputeTom Line has a reputation beyond repute
Re: How are arms programmed?

There is a paper that explains PID very well located here:

https://www.wescottdesign.com/articl...ithoutAPhd.pdf

In addition, Wikipedia has some very helpful pseudocode in their article (in the Pseudo Code section) - it's how I originally learned to program a PID.

https://en.wikipedia.org/wiki/PID_controller

The TalonSRX's that we like to use have the PID functions built in. You simply need to connect a sensor, set the paramters correctly, and it takes care of the math for you.
Reply With Quote
  #4   Spotlight this post!  
Unread 08-10-2018, 03:17 PM
GeeTwo GeeTwo is offline
Somebody Else
AKA: Gus Michel II
no team
Team Role: Mentor
 
Join Date: Jan 2014
Rookie Year: 2013
Location: Slidell, LA
Posts: 5,982
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: How are arms programmed?

The key point to controlling an arm without overworking your motors (and likely having undesired shaking) is having some sort of counter load - a counter spring or counter weight. Then, make sure that what torque you are applying is not being pushed through too small a shaft - for arms, dead axles and sprockets/pulleys fixed to the arm spread the load out.

Keeping things parallel: the parallel 4-bar. Make a quadrilateral with hinges/pins on the corners such that both pairs of opposite sides are the same length, and those sides will remain parallel. Then fix one of those to your (horizontal) chassis, and the top part remains horizontal as well!
__________________

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.
[Quoting brennonbrimhall]: We design a new robot every year, but we can't forget that we also design a new team every year as folks come and go.
Reply With Quote
  #5   Spotlight this post!  
Unread 08-10-2018, 04:18 PM
kylelanman's Avatar
kylelanman kylelanman is offline
Programming Mentor
AKA: Kyle
FRC #2481 (Roboteers)
Team Role: Mentor
 
Join Date: Feb 2008
Rookie Year: 2007
Location: Tremont Il
Posts: 248
kylelanman is a splendid one to beholdkylelanman is a splendid one to beholdkylelanman is a splendid one to beholdkylelanman is a splendid one to beholdkylelanman is a splendid one to beholdkylelanman is a splendid one to beholdkylelanman is a splendid one to beholdkylelanman is a splendid one to behold
Re: How are arms programmed?

In 2015 our arm and wrist were kept parallel by 2 PID controllers. We always controlled the arm by feeding a set point to the shoulder. We took the actual position of the shoulder joint to calculate a parallel angle and then fed it in to the wrist PID. The wrist lagged the shoulder by several degrees but it wasn't notice able enough to matter. You can see this in action at the 25 second mark in https://www.youtube.com/watch?time_c...&v=pb_X4dG3GLQ

Fast forward to 2018. Our arm utilized Motion Magic on both joints. As GeeTwo stated a counter load (spring) was key to making the arm controllable. Our arm required force to stay all the way down. It naturally wanted to float about level. We controlled the arm by enforcing max dimensions per the game manual. When ever we command the arm we command a pivot angle and a max extension. The pivot set point was fed directly to the pivot and the extension set point was the lesser of the max extension desired and the max legal extension given the angle of the pivot. You can see this in action here. https://www.thebluealliance.com/match/2018dar_qm48
__________________







"May the coms be with you"

Is this a "programming error" or a "programmer error"?
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 11:20 PM.

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


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