Go to Post Never underestimate the ability of a team of high school students and engineers to break expensive things. - Alan Anderson [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
  #1   Spotlight this post!  
Unread 26-09-2013, 18:07
thinker&planner thinker&planner is offline
Registered User
AKA: CAAAAAD
no team
Team Role: Mechanical
 
Join Date: Jan 2013
Rookie Year: 2013
Location: Tallahassee, FL
Posts: 115
thinker&planner is a splendid one to beholdthinker&planner is a splendid one to beholdthinker&planner is a splendid one to beholdthinker&planner is a splendid one to beholdthinker&planner is a splendid one to beholdthinker&planner is a splendid one to beholdthinker&planner is a splendid one to behold
Mecanum Tank drive

Our team has been trying to develop a program to allow us to drive our robot "Tank" style with two joysticks yet still have parallel control of the side-to-side movement of Macanum at the same time.
In a simpler way: With an Xbox controller, use the y-axis of each stick to control the forward-backward movement of each side, tank style, but still factoring in the value of side-to-side motion from the analog triggers.

We have tried to write many programs, and none of them have quite worked.
From scratch, simply writing something like this ends up only being able to control fwd/bkw or strafe, not both at the same time.
Code:
    public void SetRight(double RightY)
 {
        FrontRight.set(-RightY);
        RearRight.set(-RightY);
    }
    public void SetLeft(double LeftY) {
        FrontLeft.set(-LeftY);
        RearLeft.set(-LeftY);
    }
    public void Strafe(double RightX) {
        FrontLeft.set(RightX);
        RearLeft.set(-RightX);
        FrontRight.set(RightX);
        RearRight.set(-RightX);
}
So we tried to use the pre-existing function drive.mecanumDrive_Cartesian setup with the X value as simply the "x" trigger axis, and for the Y and Twist axis, averaging and getting the difference of the two sticks. (I can't seem to upload the table that we made to prove it)

But even this algorithm does not seem to work. When we tested it, it seemed like the wheels were fighting themselves (something like if we told it to go sideways it would try to go both left and right at the same time)

Has anyone attempted anything like this? How should we proceed? Should we write a completely new function, or should we tinker with the pre-written ones?
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 08:40.

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