Go to Post In the end any amount of time can work, just be smart about how you use it. - Jay O'Donnell [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
  #6   Spotlight this post!  
Unread 28-08-2004, 01:13
generalbrando's Avatar
generalbrando generalbrando is offline
Build, Break, Repeat
AKA: Brandon Mensing
FRC #0246 (Overclocked)
Team Role: College Student
 
Join Date: Nov 2002
Rookie Year: 2001
Location: Boston, MA
Posts: 366
generalbrando is a splendid one to beholdgeneralbrando is a splendid one to beholdgeneralbrando is a splendid one to beholdgeneralbrando is a splendid one to beholdgeneralbrando is a splendid one to beholdgeneralbrando is a splendid one to beholdgeneralbrando is a splendid one to beholdgeneralbrando is a splendid one to behold
Send a message via AIM to generalbrando
Re: A Simple Improvement to Driving

[quote=Andrew Schuetze]
Quote:
Originally Posted by generalbrando
This may be common knowledge, but I couldn't find it searching, so I post away.



Those two averages will be 1/4 way from the original values toward the other joy stick. The result, if you can visualize, is that if you push both sticks forward, but you don't do it in perfect sync, the program will minimize the difference and the robot will go straight forward instead of swerving a lot.

For the techies:
pwm01=(p1_y+((p1_y+p2_y)/2)/2)
pwm02=(p2_y+((p1_y+p2_y)/2)/2)

I have not seen this posted before but have not looked at drive algorithms much in the past. I appretiated your program line codes as the paragraph description then made sense.

Question: What is the result with one stick full forward and the other full reverse? Does it still do a zero degree spin albeit just slower? The spin factor in a traditional tank steer is where a lot of loss of control causes problems. The other being the swerving during a forward motion that you mentioned.

Checking my logic, both sticks in maximum deflection in the same direction results in the averages being the actual stick positions??


Thanks for posting,

APS
Well if you work through the math, it should be 0 and 256 averaged=128. Then average between that and the originals...64 and 194. Technically 127 is center (right?) so that's a tiny bit off, but the results is a slower spin. I thought there might be a quirk where I would need to handle an exception for such a thing like this, but in testing, I found it works fine all around.

Am I making sense? (it's 1am and my brain took the weekend off several hours ago).
__________________
Lead Mentor of Team #246, Boston University Academy and Boston University, Overclocked
www.burobotics.org

 


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
A Simple note about life dddriveman Chit-Chat 14 13-05-2004 20:33
Simple things you can do to make your bot/team perform better KenWittlief General Forum 21 01-04-2004 15:11
Simple Autonomous Mode Example deltacoder1020 Programming 5 08-03-2004 20:22
In reference to the driving of Team 25 Goober65 General Forum 24 14-04-2003 23:09
Who's robots are driving already? Anton Abaya General Forum 67 16-02-2002 00:07


All times are GMT -5. The time now is 18:06.

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