View Single Post
  #11   Spotlight this post!  
Unread 09-11-2008, 11:22
daltore's Avatar
daltore daltore is offline
Electronics/programming/design
AKA: Aaron Osmer
FRC #3529 (ausTIN CANs)
Team Role: Mentor
 
Join Date: Dec 2007
Rookie Year: 2007
Location: San Antonio, TX
Posts: 272
daltore has a spectacular aura aboutdaltore has a spectacular aura aboutdaltore has a spectacular aura about
Send a message via AIM to daltore Send a message via MSN to daltore Send a message via Yahoo to daltore
Re: Omni Vex code in easyc?

Why is it necessary to cap the values at the maximums and minimums? Does the processor not automatically do this? I've always found it easier to subtract values from full drive and having the motors that need to be full power just have values greater than 255 and subtracting values from the other wheels instead of just starting from half power for everything. That way, you get full speed, but everything still works fine. I've never done a holonomic function, but this usually works fine for homemade arcade drives and the similar.

Also, please correct me when I say the obvious thing I'm missing, but the algorithm doesn't quite look right:

Code:
            LF = RR = lefty - leftx + 127 ;
            RF = LR = 255 - lefty - leftx ;
The first one would seem to stop the front left and rear right motors if the joystick goes to the upper right or bottom left, which would defeat the purpose of being able to translate diagonally, wouldn't it? As for the second one, it looks like it would barely have any power even when the joystick was straight forward, and again stopped when going to the upper left or bottom right. I know I'm probably missing something here, but I can't seem to get it. Is this what the adding 63 is supposed to solve? I figured that was to offset the below 127 motor values for spinning.

I'm designing a robot to drive this way for practicing during Elevation, and I've not yet had time to start (notice the 4 weeks between BEST competition and VEX).

Any clue what I'm missing?