Go to Post Patience, grasshopper. They'll get to it. - Rick TYler [more]
Home
Go Back   Chief Delphi > Technical > Programming > C/C++
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 03-11-2016, 10:49 AM
4AngryNutjobs's Avatar
4AngryNutjobs 4AngryNutjobs is offline
Registered User
FRC #3859
 
Join Date: Oct 2011
Location: Elk Grove, CA
Posts: 16
4AngryNutjobs is an unknown quantity at this point
Talking Arm Control Help

My team is currently working on a pickup arm that needs to hold itself in three distinct positions. We originally tried using pid but were unable to get this to work due to the heavy weight of the arm and lack of knowledge. The arm uses a talon encoder to get its positions and needs to hold steady at -4700, -6000, and -3700 ticks with the press of a button. Our team is currently trying to use if statements and while loops to hold the arm but is struggling to move the arm precisely without it swinging down and slamming into our bumpers.

If anyone has sample code or ideas on how to control the arm please help!!!
We are competing at CVR today and are from team 3859.
Reply With Quote
  #2   Spotlight this post!  
Unread 03-11-2016, 11:31 AM
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Arm Control Help

Step one: compensate for the arm's weight mechanically. Add a bungie cord, or a counterweight, or a gas spring, or anything that will take the constant load off the motor.

Then you can proceed to step two, and use the motor just to move the arm from location to location without worrying about gravity.
Reply With Quote
  #3   Spotlight this post!  
Unread 03-11-2016, 01:17 PM
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,539
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: Arm Control Help

Absolutely agree with Alan - make a "passive" system that reduces the load on the "active" system.

Another setup we have used for this (off-competition) is a pneumatic cylinder. You don't even need a solenoid valve, just orient and pressurize it so that it is ALMOST enough to lift the load.
__________________

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.
Reply With Quote
  #4   Spotlight this post!  
Unread 03-11-2016, 01:26 PM
Kevin Sevcik's Avatar
Kevin Sevcik Kevin Sevcik is online now
(Insert witty comment here)
FRC #0057 (The Leopards)
Team Role: Mentor
 
Join Date: Jun 2001
Rookie Year: 1998
Location: Houston, Texas
Posts: 3,569
Kevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond reputeKevin Sevcik has a reputation beyond repute
Send a message via AIM to Kevin Sevcik Send a message via Yahoo to Kevin Sevcik
Re: Arm Control Help

Quote:
Originally Posted by Alan Anderson View Post
Step one: compensate for the arm's weight mechanically. Add a bungie cord, or a counterweight, or a gas spring, or anything that will take the constant load off the motor.

Then you can proceed to step two, and use the motor just to move the arm from location to location without worrying about gravity.
Second option is to just gear the arm down enough that the motor doesn't see the load much. If you're driving the arm with a Versaplanetary gearbox or something, adding an extra reduction stage might be easier than counterbalancing.
__________________
The difficult we do today; the impossible we do tomorrow. Miracles by appointment only.

Lone Star Regional Troubleshooter
Reply With Quote
  #5   Spotlight this post!  
Unread 03-12-2016, 02:05 PM
Alan Anderson's Avatar
Alan Anderson Alan Anderson is offline
Software Architect
FRC #0045 (TechnoKats)
Team Role: Mentor
 
Join Date: Feb 2004
Rookie Year: 2004
Location: Kokomo, Indiana
Posts: 9,112
Alan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond reputeAlan Anderson has a reputation beyond repute
Re: Arm Control Help

Quote:
Originally Posted by Kevin Sevcik View Post
Second option is to just gear the arm down enough that the motor doesn't see the load much.
This can work too. Just be aware of the torque loads you're going to be putting on the output of the gearing. Make sure whatever you use isn't going to get sheared off if you bump the arm wrong.

In a game like FIRST Stronghold, "bump the arm wrong" might include heavy bouncing from merely driving from one part of the field to another.
Reply With Quote
  #6   Spotlight this post!  
Unread 03-12-2016, 10:23 PM
Arhowk's Avatar
Arhowk Arhowk is offline
FiM CSA
AKA: Jake Niman
FRC #1684 (The Chimeras) (5460 Mentor)
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Lapeer
Posts: 542
Arhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to beholdArhowk is a splendid one to behold
Re: Arm Control Help

If you are having the issue of the arm slamming into the bumpers than what helped for our team was using a slow voltage ramp rate when the PID is arm level

Additionally, to make your code nicer, I'd carefully tune a feed forward constant. Multiply this by the cosine of the CURRENT (not desired) arm position to get the force required to hold the arm at that position. From there, you may find it easier to use traditional PID tuning methods as you are not fighting the force of gravity
__________________
FRC Team 1684 - Head Programmer (2013-2016)
FRC Team 5460 - Programming Mentor (2015-2016)

FIRST in Michigan - Technical Crew (2015-continuing)
Reply With Quote
  #7   Spotlight this post!  
Unread 03-19-2016, 08:33 PM
snekiam snekiam is offline
Registered User
FRC #3322 (Eagle Imperium)
Team Role: Programmer
 
Join Date: Dec 2015
Rookie Year: 2010
Location: SE Michigan
Posts: 84
snekiam has a spectacular aura aboutsnekiam has a spectacular aura aboutsnekiam has a spectacular aura about
Re: Arm Control Help

We did programmatic gravity compensation for our arm this year, and all we ended up with were motors without their blue smoke. Don't do it all by essentially stalling your motors like we did.
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 10:25 AM.

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