Go to Post (i would watch out for those jag's if i were you) - Scott Bahl [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

 
Reply
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 23-01-2013, 19:09
AutoBotAM AutoBotAM is offline
Registered User
AKA: Christian Reese
FRC #2077 (Laser Robotics (Laserbots))
Team Role: Programmer
 
Join Date: Mar 2012
Rookie Year: 2010
Location: Wisconsin
Posts: 34
AutoBotAM is an unknown quantity at this point
Can't get info from Joysticks

I have a rather strange problem similar to this: http://www.chiefdelphi.com/forums/sh...d.php?t=103097

So far I have tried getX() and getRawAxis(), and they all return 0, even when I'm using the joystick. I have tried two gamepads and one Joystick, which has worked previously, but currently am unable to get any input in the code. I have been updating all of our software, and I imaged our new cRIO to the latest one. I have been testing this alongside some SmartDashboard code (which seems to work fine). The strange thing is that the driver station seems to identify my controllers just fine, and it flashes blue whenever I press a button. Maybe its something I need to configure in driver station, or the Netbeans project? Has anyone else been having trouble getting input from the joysticks? I will try a few more things on our next robotics meeting, but I'd appreciate any thoughts you guys have on this. Thanks!
__________________
"Mecanum drivetrains, like every other, have advantages and disadvantages, but some of the disadvantages being discussed here are overstated and/or misinformation." -buchanan
Reply With Quote
  #2   Spotlight this post!  
Unread 24-01-2013, 15:42
AutoBotAM AutoBotAM is offline
Registered User
AKA: Christian Reese
FRC #2077 (Laser Robotics (Laserbots))
Team Role: Programmer
 
Join Date: Mar 2012
Rookie Year: 2010
Location: Wisconsin
Posts: 34
AutoBotAM is an unknown quantity at this point
Re: Can't get info from Joysticks

Here's some extra info about my problem. Here's the output from driver station:
Code:
WARNING <Code> 44008 occurred at FRC_NetworkCommunications <radioLostEvents>  0.000 <radioSeenEvents>

WARNING <Code> 44007 occurred at FRC_NetworkCommunications <secondsSinceReboot> 3.435

WARNING <Code> 44008 occurred at FRC_NetworkCommunications <radioLostEvents>  290.037 <radioSeenEvents>

WARNING <Code> 44007 occurred at FRC_NetworkCommunications <secondsSinceReboot> 292.570

Modified Network Configuration: Set 
I/O unit not detected or not installed correctly.
Here's all of the code I'm using for this test:
Code:
package edu.wpi.first.wpilibj.robottest1;


import edu.wpi.first.wpilibj.Joystick;
import edu.wpi.first.wpilibj.SimpleRobot;

public class RobotTest1 extends SimpleRobot 
{
    public void autonomous() 
    {        
        Joystick joy = new Joystick(1);

        while(isAutonomous() && !isDisabled())
        {
            System.out.println(joy.getX());
        }
    }
}
The output constantly says 0.0, whilst I'm frantically moving the joystick around... Yet this was all working fine last year. Once again, the driver station appears to identify my joystick on the setup page, as it flashes blue when I press the buttons. Windows game controller properties sees the axis movements fine.

Here's the differences I identify from last year:
- Netbeans FRC plugin updates
- Driver station update
- SmartDashboard update
- USB-splitter plugged in, but I have tried both the splitter and a direct USB connection
- New, imaged cRIO 2013
- Installed FRC Utilities and Labview package 2013

One thing I just noticed is that I believe I haven't installed an even newer driver station update from 01-05-2013. (But that may have been included in the Labview DVD install... But I'll download it anyway).

I will post back later when I get more info. Please share your thoughts, thanks.

EDIT: Ahh wait... could it be because I'm doing this in autonomous mode? Are the controller connections blocked in autonomous? I'm going to feel really stupid if that's all it was xD
__________________
"Mecanum drivetrains, like every other, have advantages and disadvantages, but some of the disadvantages being discussed here are overstated and/or misinformation." -buchanan

Last edited by AutoBotAM : 24-01-2013 at 15:46.
Reply With Quote
  #3   Spotlight this post!  
Unread 24-01-2013, 15:59
Mark McLeod's Avatar
Mark McLeod Mark McLeod is offline
Just Itinerant
AKA: Hey dad...Father...MARK
FRC #0358 (Robotic Eagles)
Team Role: Engineer
 
Join Date: Mar 2003
Rookie Year: 2002
Location: Hauppauge, Long Island, NY
Posts: 8,817
Mark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond reputeMark McLeod has a reputation beyond repute
Re: Can't get info from Joysticks

Driver controls are indeed blocked during autonomous mode.
They retain their last values before the mode changes.
__________________
"Rationality is our distinguishing characteristic - it's what sets us apart from the beasts." - Aristotle
Reply With Quote
  #4   Spotlight this post!  
Unread 24-01-2013, 16:59
AutoBotAM AutoBotAM is offline
Registered User
AKA: Christian Reese
FRC #2077 (Laser Robotics (Laserbots))
Team Role: Programmer
 
Join Date: Mar 2012
Rookie Year: 2010
Location: Wisconsin
Posts: 34
AutoBotAM is an unknown quantity at this point
Re: Can't get info from Joysticks

Thanks, I'm glad that its as simple as that.

For anyone else reading this, do unit testing in teleop mode! Autonomous blocks joystick controls!
__________________
"Mecanum drivetrains, like every other, have advantages and disadvantages, but some of the disadvantages being discussed here are overstated and/or misinformation." -buchanan
Reply With Quote
  #5   Spotlight this post!  
Unread 01-02-2013, 12:22
Carl Carl is offline
Carl
FRC #4717 (The Outlaws)
Team Role: Programmer
 
Join Date: Feb 2013
Rookie Year: 2013
Location: Lubbock
Posts: 4
Carl is an unknown quantity at this point
Re: Can't get info from Joysticks

We are having the same problem, except that we are in teleop mode right now. Any help?
Reply With Quote
  #6   Spotlight this post!  
Unread 12-02-2013, 19:34
AutoBotAM AutoBotAM is offline
Registered User
AKA: Christian Reese
FRC #2077 (Laser Robotics (Laserbots))
Team Role: Programmer
 
Join Date: Mar 2012
Rookie Year: 2010
Location: Wisconsin
Posts: 34
AutoBotAM is an unknown quantity at this point
Re: Can't get info from Joysticks

Quote:
Originally Posted by Carl View Post
We are having the same problem, except that we are in teleop mode right now. Any help?
Make sure Driver station can see when you press the buttons on the joysticks, and that they are green instead of grey. Make sure you can see the controller axes/buttons in Windows. Try connecting to the cRIO via ethernet and deploy the code and see what happens. Can you post your code, and anything the Driver Station log says?
__________________
"Mecanum drivetrains, like every other, have advantages and disadvantages, but some of the disadvantages being discussed here are overstated and/or misinformation." -buchanan
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 11:46.

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