Go to Post "So [you're] like battlebots" Standard answer: No -- it's better! - Roger [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

 
 
 
Thread Tools Rate Thread Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 13-02-2007, 12:39
EricS-Team180's Avatar
EricS-Team180 EricS-Team180 is offline
SPAM, the lunchmeat of superheroes!
AKA: Eric Schreffler
FRC #0180 (SPAM)
Team Role: Engineer
 
Join Date: Apr 2002
Rookie Year: 2001
Location: Stuart, Florida
Posts: 561
EricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond reputeEricS-Team180 has a reputation beyond repute
Re: Moderating Acceleration / Deceleration

Hi Tom, It's a be-deviling problem, isn't it

Here's a thread with a plot (from last year) that may shed some light on what you are dealing with:

pwm / voltage dat

and just a day or 2 ago, I saw a plot of a team's wheel speeds vs joystick input that is also good data....but I'll be darned if I can find it again

Anyway, you might try something like a rate limiter. We've done this in the past, but just ended up in an argument among team members on robot handling qualities. You can also search on something like "exponential drivetrain" to see how some teams re-map the joystick to motor relationship.

Here's a shot at some rate limit code that shows the general idea ... it ain't tested, so caveat cursor

Code:
//
// a joy stick rate limiter
//
unsigned char RateLImitJoyStick(unsigned char* joy,   // current joystick
                                unsigned char* LPjoy,           // LastPass joystick
                                int            RateLimit)            // rate of change limit
{
   int speed ;
   unsigned char limited = 0;

   speed = (int)*joy - (int)*LPjoy ;
   if(speed > RateLimit)
   {
       speed = RateLImit;
       *joy = speed + (int)*LPjoy ;
       limited = 1 ;
   }
   else if(speed < -RateLImit)
   {
       speed = -RateLImit;
       *joy = speed + (int)*LPjoy ;
       limited = 1 ;
   }
   else{} 
   *LPjoy = *joy
   return(limited) ;
}

I'm sure there are others on this forum that can improve on these ideas.

Good Luck!
(not quite in panic mode)Eric


PS the fighting pi's is a great name! Ha!
__________________

Don't PANIC!
S. P. A. M.

Last edited by EricS-Team180 : 13-02-2007 at 12:51. Reason: forgot a line...yikes!
 


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
Acceleration Curve EricWilliams Programming 5 01-02-2006 16:27
Acceleration Sensor Connected, but values are odd.... Leav Electrical 7 04-02-2005 15:28


All times are GMT -5. The time now is 21:57.

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