Go to Post When we went to Wonderland people were like "So are you guys part of a rugby team or something?" and i was like "No...FIRST robotics! It beats rugby anyday" - Laura 1547 [more]
Home
Go Back   Chief Delphi > Technical > Programming
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
  #16   Spotlight this post!  
Unread 06-04-2004, 13:07
Ryan M. Ryan M. is offline
Programming User
FRC #1317 (Digital Fusion)
Team Role: Programmer
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Ohio
Posts: 1,508
Ryan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud ofRyan M. has much to be proud of
Re: Need help programming our swerve with feedback?

Quote:
Originally Posted by rosebud
hi everyone,
thanks for all ur answers to the swerve program! i think the table i made for inverse tangent was incorrect. also, when i compared and displayed the pot value and the value the pot should be at according to the joystick, printf displays garbage. but when i use it in an equation, it works, so maybe its something with printf, although both variables are signed ints, so it should be ok. anyways, i used the taylor power series expansion to find inverse tangent, and used the difference between pot and where pot should be to find a variable speed of rotation, so the code works. thanks again everyone, and check out mvrt 115 in silicon valley.
rebecca
The printf()s can be tricky to format.
__________________

  #17   Spotlight this post!  
Unread 08-04-2004, 09:48
Grommit Grommit is offline
Registered User
#0115 (Monta Vista Robotics)
 
Join Date: Oct 2002
Location: Cupertino
Posts: 47
Grommit will become famous soon enoughGrommit will become famous soon enough
Send a message via AIM to Grommit
Re: Need help programming our swerve with feedback?

Quote:
Originally Posted by Astronouth7303
Why not just make a look-up table custom made for your bot?
Update: We tried a lookup table, and it was causing us some trouble. Now we're using floating-point math (gasp!) and the arctangent maclaurin series, with up to the x^7 term. It runs fine.

At Silicon Valley, we found our potentiometer working fine, but instead, our speed was messed up, and often our wheels were going in the wrong direction entirely. Obviously, this was not good, and we ended up reverting to simple manual drive.

Thanks for all the help everyone.
__________________
Shrenik Shah
Engineering Director
Team 115: Monta Vista Robotics

Congratulations to Mr. Shinta for winning Woodie Flowers at Silicon Valley!

Last edited by Grommit : 08-04-2004 at 21:35.
  #18   Spotlight this post!  
Unread 08-04-2004, 17:01
nick180intucson nick180intucson is offline
Registered User
#1011 (CRUSH)
 
Join Date: Jan 2003
Location: Tucson,Az
Posts: 3
nick180intucson is an unknown quantity at this point
Lightbulb Re: Need help programming our swerve with feedback?

if you want some real help keep in contact with my team team 1011 team crush. we used swerve this is our second year and we made it to the semi finals but i would say look for brian on team 1011 or eric on team 1011 or korbin on team 1011

good luck at nats


niick brown
__________________
your black brother nick brown
  #19   Spotlight this post!  
Unread 09-04-2004, 19:33
activemx's Avatar
activemx activemx is offline
A M X
AKA: Akshay Dodeja
no team
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2000
Location: Portland, Oregon
Posts: 312
activemx is a glorious beacon of lightactivemx is a glorious beacon of lightactivemx is a glorious beacon of lightactivemx is a glorious beacon of lightactivemx is a glorious beacon of light
Send a message via AIM to activemx Send a message via Yahoo to activemx
Re: Need help programming our swerve with feedback?

Quote:
Originally Posted by nick180intucson
if you want some real help keep in contact with my team team 1011 team crush. we used swerve this is our second year and we made it to the semi finals but i would say look for brian on team 1011 or eric on team 1011 or korbin on team 1011

good luck at nats


niick brown
well thanks everyone for help again. we figured out how to make it work before SVR this year. Sadly we will not be goin to nationals this year . I will post the documentation about the drive and code soon. thanks again
__________________
2005 - Present - FIRST Volunteer(Inspector, Ref, Judge)
2000-2004 MVRT 115
  #20   Spotlight this post!  
Unread 10-04-2004, 23:24
rosebud rosebud is offline
Registered User
#0115 (MVRT)
 
Join Date: Sep 2002
Location: California
Posts: 24
rosebud is on a distinguished road
Re: Need help programming our swerve with feedback?

the documentation and code is really long, so there will be a link soon on monta vista's website: www.mvrt.com. id like to thank everyone again for his or her help. the swerve was working perfectly by the end of friday, so we were swerving on saturday and in finals. the speed function wasnt working because i was trying to use the greater of |p1_x | and |p1_y| so the robot would move the fastest sideways and straight. however, near 45 degrees the handoff wasnt smooth. anywas, check out the website if u are interested, or email me at rebecca@mvrt.com. thanks
rebecca
electrical officer
mvrt 115
  #21   Spotlight this post!  
Unread 11-04-2004, 01:29
eugenebrooks eugenebrooks is offline
Team Role: Engineer
AKA: Dr. Brooks
no team (WRRF)
 
Join Date: Jan 2004
Rookie Year: 2001
Location: Livermore, CA
Posts: 601
eugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond repute
Re: Need help programming our swerve with feedback?

Quote:
Originally Posted by Cyris12
It sounds a little complicated, but the code is actually pretty simple. The object does tend to overshoot some, and then oscillate a little. This can be minimized by adjusting the constants.
In physics terms, you are creating a harmonic oscillator
about the set point. The oscillation is a natural consequence of the linear force, much in the same manner that a mass bounces back and forth when suspended by a spring. You can reduce the finickyness by adding a damping term that operates much as a shock does on a car. This is done by adding a force that is proportional to, in this case the rotational, velocity and in opposition to the travel. This is easily done in he code by remembering the arm position from the prior poll with the computer, or interrupt as the case may be, and subtracting the current value. If you do this, you will find that you can increase the constant of proportionality for power to the drive motor, tightening up control, while preventing oscillation. There is a value for the damping, referred to as critically damped in physics terms if I remember correctly, that is somewhat magic in behavior.

We used this form of damping on 1280s arm at the
SanJose regional, and it was quite effective...
  #22   Spotlight this post!  
Unread 11-04-2004, 02:17
Jay Lundy Jay Lundy is offline
Programmer/Driver 2001-2004
FRC #0254 (The Cheesy Poofs)
Team Role: Alumni
 
Join Date: Jun 2001
Rookie Year: 2001
Location: Berkeley, CA
Posts: 320
Jay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to allJay Lundy is a name known to all
Re: Need help programming our swerve with feedback?

Quote:
Originally Posted by eugenebrooks
In physics terms, you are creating a harmonic oscillator
about the set point. The oscillation is a natural consequence of the linear force, much in the same manner that a mass bounces back and forth when suspended by a spring. You can reduce the finickyness by adding a damping term that operates much as a shock does on a car. This is done by adding a force that is proportional to, in this case the rotational, velocity and in opposition to the travel. This is easily done in he code by remembering the arm position from the prior poll with the computer, or interrupt as the case may be, and subtracting the current value. If you do this, you will find that you can increase the constant of proportionality for power to the drive motor, tightening up control, while preventing oscillation. There is a value for the damping, referred to as critically damped in physics terms if I remember correctly, that is somewhat magic in behavior.

We used this form of damping on 1280s arm at the
SanJose regional, and it was quite effective...
Well by oscillate a little, he meant it overshot a few inches then returned to it's target spot. In theory it would have a damped oscillation that continued infinitely, but since this is all digital the oscillation dampened quickly and disappeared.

If you were at SVR you probably saw our arm. A lot of programming went into keeping that monster controllable.
  #23   Spotlight this post!  
Unread 11-04-2004, 16:59
eugenebrooks eugenebrooks is offline
Team Role: Engineer
AKA: Dr. Brooks
no team (WRRF)
 
Join Date: Jan 2004
Rookie Year: 2001
Location: Livermore, CA
Posts: 601
eugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond reputeeugenebrooks has a reputation beyond repute
Re: Need help programming our swerve with feedback?

Quote:
Originally Posted by Jay Lundy
Well by oscillate a little, he meant it overshot a few inches then returned to it's target spot. In theory it would have a damped oscillation that continued infinitely, but since this is all digital the oscillation dampened quickly and disappeared.

If you were at SVR you probably saw our arm. A lot of programming went into keeping that monster controllable.
A description of the physics of what I am referring to can be found at:
http://hyperphysics.phy-astr.gsu.edu/hbase/oscda.html
by using an electrical damping term, not depending on mechanical
damping, you can get improved speed and control, subject to any slop
in the mechanism, of course.
  #24   Spotlight this post!  
Unread 12-04-2004, 07:33
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Need help programming our swerve with feedback?

Quote:
Originally Posted by eugenebrooks
In physics terms, you are creating a harmonic oscillator
about the set point. The oscillation is a natural consequence of the linear force, much in the same manner that a mass bounces back and forth when suspended by a spring. You can reduce the finickyness by adding a damping term that operates much as a shock does on a car. This is done by adding a force that is proportional to, in this case the rotational, velocity and in opposition to the travel. This is easily done in he code by remembering the arm position from the prior poll with the computer, or interrupt as the case may be, and subtracting the current value. If you do this, you will find that you can increase the constant of proportionality for power to the drive motor, tightening up control, while preventing oscillation. There is a value for the damping, referred to as critically damped in physics terms if I remember correctly, that is somewhat magic in behavior.

We used this form of damping on 1280s arm at the
SanJose regional, and it was quite effective...
Yikes We had a setup like the one I think you're describing. We did:
-Pot hooked to motor
-Operator set target w/ another pot
-use absdif (a function I wrote and used quite frequently) to find the difference between pot and target
-if difference < variance then stop the arm
-if pot < target then go up/out
-if pot > target then go down/in

no scaling velocities, remembering values, just find the diference and point it in the right direction.
  #25   Spotlight this post!  
Unread 12-04-2004, 13:12
10intheCrunch's Avatar
10intheCrunch 10intheCrunch is offline
Who's John V-Neun?
AKA: Alex Baxter
None #0254 (Cheesy Poofs)
Team Role: College Student
 
Join Date: Feb 2004
Rookie Year: 2004
Location: San Jose, CA
Posts: 129
10intheCrunch is a jewel in the rough10intheCrunch is a jewel in the rough10intheCrunch is a jewel in the rough10intheCrunch is a jewel in the rough
Send a message via AIM to 10intheCrunch
Re: Need help programming our swerve with feedback?

That would work, but only on a very basic level. If your motor value is too high you'll overshoot and oscillate, if it's too low, you will be really really slow, and any impediment (or heavier arm, do you carry the yellow balls around?) will stop it from working. For an arm like ours where we don't know what the torque on it is going to be, or whether its going to have a ball or not, a control system that can handle all the different situations by itself is much more important.
__________________
~Alex Baxter
Programming, Arms operation, Team 254

Last edited by 10intheCrunch : 12-04-2004 at 13:49.
  #26   Spotlight this post!  
Unread 13-04-2004, 07:29
Astronouth7303's Avatar
Astronouth7303 Astronouth7303 is offline
Why did I come back?
AKA: Jamie Bliss
FRC #4967 (That ONE Team)
Team Role: Mentor
 
Join Date: Jan 2004
Rookie Year: 2004
Location: Grand Rapids, MI
Posts: 2,071
Astronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud ofAstronouth7303 has much to be proud of
Re: Need help programming our swerve with feedback?

We solved the problem by having a dial for speed.
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

Similar Threads
Thread Thread Starter Forum Replies Last Post
Programming Compatition Angela06 Programming 30 08-04-2005 23:12
Feedback LEDs on OI bstempi Programming 1 22-02-2004 21:18
A few questions on programming the Control System Avarik Control System 21 08-02-2004 11:42
Help On Coding 2K1 Controller GregTheGreat Programming 9 05-12-2003 18:35
Chamionship Qualification - feedback needed ASAP! dlavery General Forum 97 11-10-2003 07:17


All times are GMT -5. The time now is 03:10.

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