Go to Post Thank you NASA (except for Dave, his tormenting hints make us even) - Mike Schroeder [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

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 19-11-2004, 14:15
Mr. Van Mr. Van is offline
Registered User
#0599 (Robo-Dox)
 
Join Date: Feb 2002
Location: Granada Hills, CA
Posts: 350
Mr. Van has a reputation beyond reputeMr. Van has a reputation beyond reputeMr. Van has a reputation beyond reputeMr. Van has a reputation beyond reputeMr. Van has a reputation beyond reputeMr. Van has a reputation beyond reputeMr. Van has a reputation beyond reputeMr. Van has a reputation beyond reputeMr. Van has a reputation beyond reputeMr. Van has a reputation beyond reputeMr. Van has a reputation beyond repute
Unhappy Single joystick control problem

Ok, I know someone must have worked this out...

We're having trouble trying to correct the "backwards is backwards" problem with single joystick control.

We are using the following algorithm:
(We do have the appropriate limits in place to keep all values acceptable.)

L=x+y-127
R=y-x+127

Everything forward works fine, as does straight back, but "back and to the left" actually results in "back and to the right".

How can we correct this?

-Mr. Van
Coach, 599
  #2   Spotlight this post!  
Unread 19-11-2004, 15:27
greencactus3 greencactus3 is offline
occra 23.
AKA: ryo
None #1481
Team Role: Alumni
 
Join Date: Feb 2004
Rookie Year: 2006
Location: North Farmington, MI
Posts: 1,523
greencactus3 is a name known to allgreencactus3 is a name known to allgreencactus3 is a name known to allgreencactus3 is a name known to allgreencactus3 is a name known to allgreencactus3 is a name known to all
Send a message via AIM to greencactus3 Send a message via MSN to greencactus3
Re: Single joystick control problem

the code we downloaded was like that too last year. i just thought it was supposed to be, as we had no programmers.. and anyways, i hate single stick drive anyways.
  #3   Spotlight this post!  
Unread 19-11-2004, 15:36
Joe Ross's Avatar Unsung FIRST Hero
Joe Ross Joe Ross is offline
Registered User
FRC #0330 (Beachbots)
Team Role: Engineer
 
Join Date: Jun 2001
Rookie Year: 1997
Location: Los Angeles, CA
Posts: 8,576
Joe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond reputeJoe Ross has a reputation beyond repute
Re: Single joystick control problem

gwross and I experimented with a bunch of different single stick algorithms in 1998, trying to correct the problem that you described. We never found a solution we were completely happy with though. It's not as simple as checking if you are going back and reversing the directions as that creates a spike as the motors suddenly change directions as you cross the axis.
  #4   Spotlight this post!  
Unread 19-11-2004, 17:00
Holtzman's Avatar
Holtzman Holtzman is offline
Sometimes...
AKA: Tyler Holtzman
FRC #2056 (OP Robotics)
Team Role: Engineer
 
Join Date: Apr 2003
Rookie Year: 2003
Location: St. Catharines
Posts: 179
Holtzman has a reputation beyond reputeHoltzman has a reputation beyond reputeHoltzman has a reputation beyond reputeHoltzman has a reputation beyond reputeHoltzman has a reputation beyond reputeHoltzman has a reputation beyond reputeHoltzman has a reputation beyond reputeHoltzman has a reputation beyond reputeHoltzman has a reputation beyond reputeHoltzman has a reputation beyond reputeHoltzman has a reputation beyond repute
Send a message via MSN to Holtzman
Re: Single joystick control problem

Mr. Van
One thing you have to remember is that robots are not cars. They do not drive like cars. If I'm understanding you correctly, when the joystick is pushed to the back left corner, the robot is going backwards and to the right, but it is still turning to the left relative to the forward direction. This is consistent with tank style robot drive systems.

This is the way that single joystick drive has been since the beginning and it is the way that most robots are set up. I say most because robots with swerve drives can be set either way, depending on driver preference. Last year, on 1114's swerve drive, the turning was "car style"(ie, what your hoping to attain). We also had a button to switch between swerve, and tank style steering. It became very confusing since in either mode, turning in reverse became opposite.

Your drivers just have to get used to it. After a couple of hours, it will be second nature.

I hope this helps, and sorry if I confused anyone more than they already were.
__________________
"making the simple complicated is commonplace; making the complicated simple, awesomely simple, that's creativity." - Charles Mingus
  #5   Spotlight this post!  
Unread 19-11-2004, 19:58
Joshua May's Avatar
Joshua May Joshua May is offline
Go Bears!
FRC #1110 (Binary Bulldogs)
Team Role: College Student
 
Join Date: Nov 2003
Rookie Year: 2003
Location: Berkeley, CA
Posts: 1,306
Joshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond reputeJoshua May has a reputation beyond repute
Send a message via AIM to Joshua May
Re: Single joystick control problem

Well, I don't have a robot here to test with, but one way you could correct this would be to create an if() loop after the drive code that revereses the direction of the robot's movement on the x axis. Sorry, I can't think of the exact formula that you would use, but the code would go somewhat like this:

Code:
if (y >= 127)
{
  "Normal" Drive Code
}
else
{
  X-Axis Reversed Code
}
__________________
The FIRST Wiki - openFIRST - Ultimate Robot Challenge - URC Wiki
I currently have 50 GMail invites, PM or email me for one.
UC Berkeley Class of 2009

2005 Las Vegas Regional Autodesk Visualization Award
2005 Las Vegas Regional #8 Seeded Alliance with 988 and 1505
2006 Southern California Regional #15 seed
  #6   Spotlight this post!  
Unread 20-11-2004, 00:01
JoshJ JoshJ is offline
Registered User
#0316 (LuNaTeCs)
Team Role: College Student
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Salem County
Posts: 44
JoshJ is on a distinguished road
Send a message via AIM to JoshJ
Re: Single joystick control problem

i would recommend getting used to the way it is currently instead of changing the default. when i first messed around with the Edu-bot (i forget what they call it now), i noted it to be backwards. However, when you are far away driving instead of "inside" (like a car), it makes life sooo much easier. you want to turn clockwise? push right. counterclockwise? push left. it is more intuitive if you want to turn your robot towards something. also, i THINK if it was set up the other way, if u were counter-rotating (full left or right), and pulled back, instead of slowing, and stopping, one side would have to completely change direction, which is not the smoothest thing for your robot.
  #7   Spotlight this post!  
Unread 21-11-2004, 12:04
phillutz phillutz is offline
Registered User
FRC #0851 (The Froggers)
Team Role: Mentor
 
Join Date: Nov 2004
Rookie Year: 2004
Location: El Segundo,CA
Posts: 28
phillutz is on a distinguished road
Re: Single joystick control problem

Quote:
Originally Posted by Joe Ross
gwross and I experimented with a bunch of different single stick algorithms in 1998, trying to correct the problem that you described. We never found a solution we were completely happy with though. It's not as simple as checking if you are going back and reversing the directions as that creates a spike as the motors suddenly change directions as you cross the axis.
One solution that we use is an Head/Tail switch or trigger.
The operator or better yet the driver, pulls a trigger, and the robot head becomes the tail and the tail becomes the head. (front > back, back > front)
Hit the switch again and it switches again.
We also had a toggle for one-stick > two-stick and back.
  #8   Spotlight this post!  
Unread 23-11-2004, 09:10
Unsung FIRST Hero
Warren Boudreau Warren Boudreau is offline
Registered User
FRC #0180 (Team SPAM)
Team Role: Mentor
 
Join Date: Jan 2002
Rookie Year: 1999
Location: Stuart, FL
Posts: 354
Warren Boudreau has a reputation beyond reputeWarren Boudreau has a reputation beyond reputeWarren Boudreau has a reputation beyond reputeWarren Boudreau has a reputation beyond reputeWarren Boudreau has a reputation beyond reputeWarren Boudreau has a reputation beyond reputeWarren Boudreau has a reputation beyond reputeWarren Boudreau has a reputation beyond reputeWarren Boudreau has a reputation beyond reputeWarren Boudreau has a reputation beyond reputeWarren Boudreau has a reputation beyond repute
Re: Single joystick control problem

After teaming with Eric S and scatching our heads a while, I think we've come up with the reason and a solution to the backward left isn't really backward left problem. It's a bit complicated, but it has to do with having the tread speed differential (Dt) being a function of both joystick x and y input. Currently, the Dt is x-127. If you use a Dt = (x-127)((y-127)/127), you get a solution where the robot will turn left when you ask it to.

However, and there always is a however, you lose the ability to spin on the axis of the robot. This is because the slope of the Dt vs x curve is zero when y equals 127.

I told you that it was a little complicated. Anyway, here's the equations:
Tread 1 = -x + ((x*y)/127) + 127
Tread 2 = 2y + x - ((x*y)/127) - 127

I will leave the exercise of determining right and left to the reader at this time. It was not relevant to the derivation, so I didn't worry about it yet.

I hope to write up a white paper on this over Thanksgiving weekend.
__________________
Warren B

Pool Noodles. They're not just for bumpers anymore.
Closed Thread


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
One Joystick Control KWalsh Programming 4 24-02-2004 17:53
problem with joystick buttons (top left one) Richomundo Programming 5 15-02-2004 17:16
single joystick programming Bill Bonsky OCCRA 2 04-10-2003 09:47
how do i control a piston with a joystick Ryan Foley Programming 2 27-05-2003 17:13
joystick problem archiver 2000 12 23-06-2002 23:08


All times are GMT -5. The time now is 06:00.

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