Go to Post Even if this is the Rumor Mill, there are behaviors that need to be adhered to. - meaubry [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
  #5   Spotlight this post!  
Unread 14-01-2006, 02:04
Leav's Avatar
Leav Leav is offline
Spud Gun Division
AKA: Leav Oz-Ari
FRC #3316 (D-Bug)
Team Role: Mentor
 
Join Date: Dec 2004
Rookie Year: 2005
Location: Technion, Haifa, Israel
Posts: 774
Leav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond reputeLeav has a reputation beyond repute
Send a message via ICQ to Leav Send a message via AIM to Leav Send a message via MSN to Leav
Re: Mixing Joystick Values for mecanum wheels

Quote:
Originally Posted by artdutra04
This following code does exactly what you want, but it does not use a gyro. The robot control is relative to the current position of the robot. It might not be as easy to drive as an absolute position omni/mecanum drive, but it is still very intuitive and easy to control.

Here is the code I used for my Vex Holonomic Drive. The motors (when looking onto the top of the robot) were numbers exactly as they would for a mathmatical quadrants......
[/code]And here is that code in action:

~15 Mb - Windows Media Video - http://www.team228.org/index/multime...omic-drive.wmv
Quote:
Originally Posted by artdutra04
This following code does exactly what you want, but it does not use a gyro. The robot control is relative to the current position of the robot. It might not be as easy to drive as an absolute position omni/mecanum drive, but it is still very intuitive and easy to control......
~15 Mb - Windows Media Video - http://www.team228.org/index/multime...omic-drive.wmv
thanks, that looks great and just what i need!
I have a couple of questions though:

1)what does
Code:
GetRxInput ( 1 , 4 ) ;
do?
I assumed that it get's the forth axis position information from joystick 1
and so on for
Code:
GetRxInput ( 1 , 1) ;
and
Code:
GetRxInput ( 1 , 3 ) ;
.
i'm assuming a RC like radio control... am i right?

2)Why did you cut all the joystick values in half?
Code:
            leftx = leftx / 2 ;
            lefty = lefty / 2 ;
            spin = rightx / 2 ;
3)something doesn't make sense:
let's say that the joystick is full forward with no spin
Code:
            leftx = GetRxInput ( 1 , 4 )  ----->=127 ;
            lefty = GetRxInput ( 1 , 3 ) ------>=256;
            rightx = GetRxInput ( 1 , 1 )  ----->=127;
then:
Code:
            leftx = leftx / 2 = 63;
            lefty = lefty / 2 = 127 ;
            spin = rightx / 2 = 63 ;
right?
and then:
Code:
            LF = RR = lefty - leftx + 127 = 127-63+127=193 ;
            RF = LR = 255 - lefty - leftx = 255-127-63=63;
            RR = 255 - RR = 63;// Reverse Direction
            LR = 255 - LR = 193  ; // Reverse Direction
and then:
Code:
            RF = RF - spin + 63 = 63-63+63=63 ;
            RR = RR - spin + 63 = 63-63+63=63;
            LF = LF - spin + 63 = 193-63+63=193;
            LR = LR - spin + 63 = 193-63+63=193;
so you end up with:
Code:
            RF=63 ;
            RR=63;
            LF=193;
            LR=193;
which would in my opinion induce spin on your robot (both right wheels goinf forward and both left wheels going back) while the stick is forward (assuming that vex motors use the same 0=full_backwards 127=stop and 256=full_forward configuration) as the FRC bots.

also, with full forward the motors only get up to 193 max 63 min values... (instead of 255 max and 0 min...) is this intentional?

would you mind clearing this up for me?

Thanks!
-Leav
__________________
"We choose to build robots this season and do the other things; Not because they are easy, but because they are hard."
-Paraphrasing JFK

Participated in FIRST as a student: 2005-2006 (But still learning every season!)
Mentor: 2008 - ? (Team 2630 2008-2011, and Team 3316 since 2013)
Engineer: 2011 - ? (B.Sc. and M.Sc. in Mech. Eng. from the Technion IIT)
FIRST Volunteer - 2007 - ? (MC, FTA, FIRST Aid etc.)
 


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
Getting A Bot To Turn Andrew Blair Technical Discussion 20 16-10-2005 23:49
Change joystick to pwm mapping Joe Lewis Programming 3 30-03-2005 19:27
Changing 1 joystick code to 2 (rookie team) Brawler006 Programming 5 20-02-2004 17:00
Lots of Wheels and F = u x N archiver 2001 17 23-06-2002 23:37
"Motors and Drive train edition" of Fresh From the Forum Ken Leung CD Forum Support 6 29-01-2002 12:32


All times are GMT -5. The time now is 03:13.

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