Go to Post The toughest part about that Chairman's Award was the fact that someone was cutting onions in the stands near 558/on the field while it was being read out. At least that was the excuse I'm going to use ;) - esquared [more]
Home
Go Back   Chief Delphi > FIRST > General Forum
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 24-10-2016, 11:08
kingca kingca is offline
Registered User
FRC #0108 (SigmaC@ts)
Team Role: Programmer
 
Join Date: Feb 2016
Rookie Year: 2015
Location: Florida
Posts: 19
kingca is an unknown quantity at this point
Problem with Joystick axis problem

Our team is using c++ and we been having a problem with the joystick axis. The problem occurs when we plug in the joystick into the USB port and it is not configured properly sometimes making the robot start moving by itself. Has any others teams had this problem and how have you solved the problem?
Reply With Quote
  #2   Spotlight this post!  
Unread 24-10-2016, 11:12
nickbrickmaster's Avatar
nickbrickmaster nickbrickmaster is online now
Not Allowed Near Power Tools
AKA: Nick Schatz
FRC #3184 (Blaze Robotics)
Team Role: Leadership
 
Join Date: Jan 2015
Rookie Year: 2014
Location: Eagan MN
Posts: 157
nickbrickmaster is an unknown quantity at this point
Re: Problem with Joystick axis problem

It's a common problem, especially on video game consoles. The solution is to make sure that the joystick is at center when it is plugged in. The reason is that the joystick takes the value when plugged in to be the zero value.

If that doesn't work, introduce a small deadband in your code, 0.05 abouts.
__________________
I have approximate knowledge of many things.

FRC 3184: 2014-, FTC 10648: 2015-
Reply With Quote
  #3   Spotlight this post!  
Unread 24-10-2016, 11:13
jimbo493's Avatar
jimbo493 jimbo493 is offline
Quasi Mentor
AKA: Jimmy
FRC #3357 (The COMETS)
Team Role: Electrical
 
Join Date: Oct 2013
Rookie Year: 2011
Location: Grand Rapids/Big Rapids
Posts: 78
jimbo493 is on a distinguished road
Re: Problem with Joystick axis problem

Is it just moving a little bit, slowly? If so I would assume that you may want to put a dead zone around the center of the axis, since a lot of joysticks dont always fall back to dead center. I assume if you move the axis and let go it stops the movement?
__________________


FTC Student 2011-2012 FRC Student 2012-2016
FIRST Alum/Quasi-Mentor 2016-present
Reply With Quote
  #4   Spotlight this post!  
Unread 24-10-2016, 11:41
Christopher149 Christopher149 is offline
Registered User
FRC #0857 (Superior Roboworks) FTC 10723 (SnowBots)
Team Role: Mentor
 
Join Date: Jan 2011
Rookie Year: 2007
Location: Houghton, MI
Posts: 1,100
Christopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond reputeChristopher149 has a reputation beyond repute
Re: Problem with Joystick axis problem

How many axes does your joystick have?

We have a 3-axis joystick where (at least in 2013 using Java, don't know if any software fix happened later) the x- and y-axis made perfect sense, but the "twist" axis was actually called "throttle" in the code, and "z" and "twist" were both the little paddle-like axis on the base of the stick.

So when we first went to run our mecanum (thankfully it was on blocks), we had no idea why it was running so fast and seemingly randomly, but it was because the little paddle wasn't at 0 (which is around 45 degrees), but all the way down at 1/-1.
__________________
2015-present: FTC 10723 mentor
2012-present: 857 mentor
2008-2011: 857 student

2015: Industrial Design, Excellence in Engineering, District Finalist, Archimedes Division (#6 alliance captain)
2014: Judges Award, District Engineering Inspiration, District Finalist, Galileo Division


Last edited by Christopher149 : 24-10-2016 at 11:48.
Reply With Quote
  #5   Spotlight this post!  
Unread 24-10-2016, 19:07
orangelight's Avatar
orangelight orangelight is offline
Registered User
AKA: Alex
FRC #0548 (Robostangs)
Team Role: Programmer
 
Join Date: Feb 2014
Rookie Year: 2014
Location: Northville
Posts: 166
orangelight is a splendid one to beholdorangelight is a splendid one to beholdorangelight is a splendid one to beholdorangelight is a splendid one to beholdorangelight is a splendid one to beholdorangelight is a splendid one to beholdorangelight is a splendid one to beholdorangelight is a splendid one to behold
Re: Problem with Joystick axis problem

I ran into this problem when debugging another teams code, I believe they were using a Logitech joystick. The problem was as nickbrickmaster said, the joystick was not centered. We just re-plugged in the joystick and it worked as usual.
__________________


Reply With Quote
Reply


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 22: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