Go to Post We're still not ready for 2012.... - AdamHeard [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #12   Spotlight this post!  
Unread 18-02-2015, 23:48
vps vps is offline
Registered User
FRC #3021 (The Agency)
Team Role: Programmer
 
Join Date: Mar 2013
Rookie Year: 2011
Location: United States
Posts: 30
vps is an unknown quantity at this point
Re: Acceleration Curve java help

I wanted Can Motor controllers but we ended up using regular one. I was going to use the setVoltageRampRate function, because we are top heavy, but I had to create something else. The acceleration curve by Math.pow(val, x) wasn't good enough for us, where x is an int. Why? because if the joystick slips, we don't want the robot to rapidly accelerate. So, what I do is that I read the "ReachVal" from the joystick, then, read the "CurrentVal" from what I set to the CIMs (CurrentVal is initialized to 0). Then, I take the difference, divide that by 7500 (trial and error lead me to this constant), add that to "CurrentVal", in my drive thread. This results in a smooth drive and we don't topple over even though we are quite top heavy.

Hope that helps!

Last edited by vps : 18-02-2015 at 23:50.
Reply With Quote
 


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:23.

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