|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
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. |
|
#2
|
|||||
|
|||||
|
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. |
|
#3
|
|||||
|
|||||
|
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. |
|
#4
|
|||||
|
|||||
|
Re: Arm Control Help
Quote:
|
|
#5
|
|||||
|
|||||
|
Re: Arm Control Help
Quote:
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. |
|
#6
|
||||
|
||||
|
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 |
|
#7
|
|||
|
|||
|
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.
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|