Go to Post More to the point, stop worrying about whether your "Atlanta bot" got screwed over or whatever. Worry about whether you've got an "Atlanta team." - RebelWithARobot [more]
Home
Go Back   Chief Delphi > Technical > Control System
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 18-01-2008, 23:19
manderson5192 manderson5192 is offline
Registered User
AKA: Matt Anderson
FRC #0948 (Newport Robotics Group: NRG (pronounced eNeRGy))
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Bellevue, WA
Posts: 62
manderson5192 is on a distinguished road
Joystick Input for Rotation about Z-Axis

Is there a way to get a reading for desired rotation about the z-axis of the robot from a single-joystick setup? Is one able to twist the joystick or use the "wheel" on top of the joystick? And if it is the "wheel" we need to use, what is the range of input values we can get from there? I am really just looking for the name of the input (like in the code) and what the range of possible input values for it is.

Thanks in advance guys!

EDIT: One more question: Is there a better joystick or better solution to this? We want to program a mecanum drive and our algorithm needs a z-axis rotation input

Last edited by manderson5192 : 18-01-2008 at 23:56. Reason: One more question
  #2   Spotlight this post!  
Unread 19-01-2008, 11:46
paulcd2000's Avatar
paulcd2000 paulcd2000 is offline
Accidentally speaks in C
AKA: Paul Dagnelie
FRC #1719 (The Umbrella Corp.)
Team Role: Programmer
 
Join Date: Jan 2006
Rookie Year: 2006
Location: Baltimore
Posts: 368
paulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the roughpaulcd2000 is a jewel in the rough
Send a message via AIM to paulcd2000
Re: Joystick Input for Rotation about Z-Axis

ok, well, the default joystick doesn't rotate, but the wheel does. i've never used it but, i know it's an analog input. the easiest way to test it is to set up some printfs and just print out what it is at various postions.
__________________
"People don't say 'It's just a game' when their team is winning!" -- Scott Adams

5.5 students (on average)* $7/h *210 hours/student= $8085 of labor, all volunteered (not counting mentors', who are each that much)

We have blades on our robot?! ***sweeeeeet***

There are 11 types of people in the world. Those who can read binary, those who can't, and those who say this joke is supposed to be, "There are 10 types of people in the world. Those who can read binary and those who have a life."
  #3   Spotlight this post!  
Unread 19-01-2008, 14:58
Lucretius Lucretius is offline
#395 Mentor, #1884 Alumnus
FRC #0395 (2 Train Robotics)
Team Role: Mentor
 
Join Date: Jan 2007
Rookie Year: 2007
Location: New York, NY
Posts: 42
Lucretius is an unknown quantity at this point
Re: Joystick Input for Rotation about Z-Axis

We're using the Saitek ST290 Pro with the USB Chicklet. It has X, Y, and Z (twist) axes, as well as a whole ton of buttons and even a throttle. It can be configured for lefties, too.
  #4   Spotlight this post!  
Unread 19-01-2008, 16:18
manderson5192 manderson5192 is offline
Registered User
AKA: Matt Anderson
FRC #0948 (Newport Robotics Group: NRG (pronounced eNeRGy))
Team Role: Programmer
 
Join Date: Jan 2008
Rookie Year: 2007
Location: Bellevue, WA
Posts: 62
manderson5192 is on a distinguished road
Re: Joystick Input for Rotation about Z-Axis

Thanks for the help guys. I'm pretty sure the "wheel" input on the KOP joystick is only an analog input because it has the 4 states of up, down, left, or right with no variation on the scale of 0-255. We have decided to use a second joystick's X-axis as the Z-axis rotation input.
  #5   Spotlight this post!  
Unread 19-01-2008, 17:26
Andy A. Andy A. is offline
Getting old
FRC #0095
Team Role: Coach
 
Join Date: Jun 2001
Rookie Year: 2001
Location: New Hampshire
Posts: 1,013
Andy A. has a reputation beyond reputeAndy A. has a reputation beyond reputeAndy A. has a reputation beyond reputeAndy A. has a reputation beyond reputeAndy A. has a reputation beyond reputeAndy A. has a reputation beyond reputeAndy A. has a reputation beyond reputeAndy A. has a reputation beyond reputeAndy A. has a reputation beyond reputeAndy A. has a reputation beyond reputeAndy A. has a reputation beyond repute
Re: Joystick Input for Rotation about Z-Axis

The 'wheel' input is in fact an analog 0-5v (0-255 increments) signal, just like the X&Y axis. It is typically the throttle in a flight sim. In FIRST it is almost never used on the joysticks. You can however use it, if you so choose, as a 'hip' or rudder axis.

On the old CH flight sticks it is the left most wheel and rotates something like 60 degrees. The other two wheels are trim. Some joysticks may use the 'wheel' as a 4 way 'hat' switch using a resistor network to get 4 distinct increments out of the analog. This is what I think you are referring to on your stick. The newer sticks they have been including in the kit probably use the hat switch in place of a real throttle wheel.

There is also a 4th analog on each joystick port that is also rarely used. The original design of the gameport intended for a y cable to be used to connect two joysticks to one computer. That never really happened, and the two other analogs usually were used for a throttle and hat switch. Then USB sticks came out and manufactures where no longer limited by the gameport and so you end up with a zillion buttons and axises.

There are many joysticks on the market that allow you to twist the stick about the z axis, usually to substitute for rudder pedals. They are probably all usb based however.

-Andy A.
  #6   Spotlight this post!  
Unread 19-01-2008, 18:48
Steve_Alaniz Steve_Alaniz is offline
Registered User
FRC #2848 (All Sparks)
Team Role: Mentor
 
Join Date: Mar 2007
Rookie Year: 1997
Location: Dallas
Posts: 211
Steve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond reputeSteve_Alaniz has a reputation beyond repute
Re: Joystick Input for Rotation about Z-Axis

I'm using a Saitek with a chicklet board with mechanums and I'm using the twist for rotation. It's actually pretty easy to program.

Steve
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
Reversing the joystick axis JBotAlan Programming 3 09-02-2005 19:47
Tri-axis Analog Joystick KVermilion Control System 5 19-01-2005 00:24
pwm outputs vs. joystick y-axis stephenthe1 Programming 4 01-12-2004 17:29
Inverting Y axis on joystick FormatteD_C Programming 7 24-02-2004 16:56
switching joystick axis????? team222badbrad Technical Discussion 9 16-01-2002 23:07


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

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