Go to Post FIRST is here to reach the affluent, already college-bound students with boundless resources; it is also here to reach the poverty-stricken urban and rural students who don't see a diploma as worthwhile, and everybody in between. - Taylor [more]
Home
Go Back   Chief Delphi > Technical > Programming > Java
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
 
 
Thread Tools Rating: Thread Rating: 2 votes, 5.00 average. Display Modes
Prev Previous Post   Next Post Next
  #2   Spotlight this post!  
Unread 30-09-2013, 16:49
Telthien
 
Posts: n/a
Re: Mecanum Tank drive

First, it should be noted that a mecanum drive system won't behave like a tank drive exactly. The behavior of mecanum wheels will prevent this; driving one side forward and the other forward with less power won't cause tank-like movement. However, movement in this style is still possible.

To properly use a mecanum drive system, you need to express the heading as an angle and magnitude (in polar coordinates) as well as a rotational scalar. The first thing to do is to convert both of your Y-axes to a set of polar coordinates; the difference between the two should become the rotational scalar. Then, you factor the triggers into the rotational scalar.

Here's what I'd try:

Code:
y_max=max(y1,y2)
y_min=min(y1,y2)
mag = S1*(y1+y2)/2
theta = arctan((y_max-y_min)/y_min)
rot = S2*(((y_max-y_min)/y_max)+S3*triggers)
Where y_max is the max of the two ys, y_min is the min, mag is the magnitude in polar coordinates, theta is the direction of movement, and rot is the rotational scalar for the robot. S1, S2, and S3 are constants. Using these values as well as a proper mix of sines and cosines, you can run a mecanum drive. Hopefully this should do what you'd like; conceptually it works in my mind, at least.

Hope it helps!
Reply With Quote
 


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


All times are GMT -5. The time now is 10:59.

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