Go to Post I don't think we really fit into those rigidly defined categories, my team builds our robot. - AdamHeard [more]
Home
Go Back   Chief Delphi > Old Forum Archives > 2001
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-06-2002, 23:50
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
pbasic question

Posted by Stephen at 1/29/2001 9:07 PM EST


Other on team #122, NASA Knights, from Grafton High School (Robotics team is at NHGS) and NASA.



I was programming the logic to automatically calibrate the joysticks each time the robot was turned on, and I ran into a problem. I should start off saying that the code works fine as long as the wheels aren't terribly off center. The problem comes when the wheels near a limit (either 255 or 0). When I thought of the logic, I was counting on the fact that if a joystick command goes further than 255 than it would wrap around to 0; but I was wrong. Apparently it just maxes out at 255. So ... if the wheel is all the way in one direction, the robot will not be able to move in that direction. I was thinking about just changing p1_x and p1_y to word variables (as opposed to bytes [8 bits]), but that will not work- so I have come here to ask for help. If you (the chief-delphi community) cannot find a solution than it's still all right, because the code works fine as long as the wheels are somewhat close to center (leeway of about 20 either way [40 total])


__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #2   Spotlight this post!  
Unread 23-06-2002, 23:50
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
I vote against calibrating joysticks...

Posted by Joe Johnson at 1/29/2001 10:06 PM EST


Engineer on team #47, Chief Delphi, from Pontiac Central High School and Delphi Automotive Systems.


In Reply to: pbasic question
Posted by Stephen on 1/29/2001 9:07 PM EST:



I recommend against recalibrating joysticks (and the
Victors by the way -- for similar reasons).

Basically the problem is that the system works just
fine until it doesn't work anymore.

As you move the center trims more and more off of
center, you gradually lose resolution of the joysticks
until the resolution so bad nothing works right.

Here is what I recommend instead: Use the lights on
the OI (or your handy dandy Dashboard) to provide
feedback on the trim position of the joystick.

In this way, you can get the joysticks set right
without using valuable CPU time to scale them.

There is an even strong case against re-calibrating the
Victors, but that is a problem for antoher day.

Joe J.



__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #3   Spotlight this post!  
Unread 23-06-2002, 23:50
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
How about tomorrow?

Posted by Ken Wilson at 1/30/2001 2:35 AM EST


Engineer on team #248, FEMEX, from Philadelphia Girls High and PECO Energy Company.


In Reply to: I vote against calibrating joysticks...
Posted by Joe Johnson on 1/29/2001 10:06 PM EST:



: Joe

FEMEX calibrated its Victors last year. Could you explain the possible pitfalls? THANX

kenny ...out of control in Philadelphia


__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #4   Spotlight this post!  
Unread 23-06-2002, 23:50
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
dead zone

Posted by Ken Leung at 1/30/2001 5:09 AM EST


Student on team #192, Gunn Robotics Team, from Henry M. Gunn Senior High School.


In Reply to: I vote against calibrating joysticks...
Posted by Joe Johnson on 1/29/2001 10:06 PM EST:



: Here is what I recommend instead: Use the lights on
: the OI (or your handy dandy Dashboard) to provide
: feedback on the trim position of the joystick.

A little advice about using the lights as an indicator of joystick calibration. You might want to include a dead zone around the center of range of the axis. Being a driver myself, I can tell you that it is really hard to calibrate the joystick to exact zero. You might want to make a "dead zone" around the center, so even if the joystick is slightly off, it will still count as the center. A few advantage for doing this: 1. easier and quicker for calibration, 2. easier for (shakey hand) drivers to hold joystick at center position when they doesn't want to move the robot, 3. Driver can control the robot much more accuratly if they are used to fast maneuvers on the joystick.

Probably Everyone are doing this... but no harm posting this out.


__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #5   Spotlight this post!  
Unread 23-06-2002, 23:50
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Re: dead zone

Posted by Josh Vetter at 1/30/2001 10:40 PM EST


Student on team #548, Robostangs, from Northville High School and BOSCH.


In Reply to: dead zone
Posted by Ken Leung on 1/30/2001 5:09 AM EST:



How do you create the dead zone? We are a rookie team, and need all the programming help we can get.
Thanks
Josh Vetter


__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
  #6   Spotlight this post!  
Unread 23-06-2002, 23:50
archiver archiver is offline
Forum Archival System
#0047 (ChiefDelphi)
 
Join Date: May 2001
Location: Pontiac, MI
Posts: 21,214
archiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond reputearchiver has a reputation beyond repute
Re: dead zone

Posted by Joe Ross at 1/31/2001 2:59 AM EST


Engineer on team #330, Beach Bot, from Hope Chapel Academy and NASA/JPL , J&F Machine, and Raytheon.


In Reply to: Re: dead zone
Posted by Josh Vetter on 1/30/2001 10:40 PM EST:



: How do you create the dead zone? We are a rookie team, and need all the programming help we can get.

There are many different ways to program a dead zone. The simplest (but not always the best) is to use an if statement.

in pseudo-code:

if joystick is greater than 117 AND joystick is less than 137 then joystick = 127

127 is the neutral position, so if the joystick value is ever +/- 10 from the neutral position, then the robot won't move. out team has found that a value of +/- between 5 and 10 works the best.

There are a few problems with this method. If you can find them, then you probably don't need help developing a dead stick routine ;-)

You should also read the whitepaper on filtering the joysticks availible from innovationfirst.com. It contains a "dead stick" routine among other things



__________________
This message was archived from an earlier forum system. Some information may have been left out. Start new discussion in the current forums, and refer back to these threads when necessary.
 


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 Off
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
PBASIC Syntax Question Raven_Writer Programming 4 20-08-2003 08:07
Question Obtaining Pbasic 2.5 PyroPhin Programming 3 18-01-2003 01:26
pbasic question Mike375 Programming 14 15-01-2003 06:54
PBasic Question Melissa H. Programming 28 17-11-2002 18:53
Another PBASIC Question Ian W. Programming 4 31-01-2002 21:36


All times are GMT -5. The time now is 17:49.

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