Log in

View Full Version : operatorControl() not being called


jalozinski
31-01-2014, 18:58
For some reason operatorControl() is not being called. robotInit() is, but not operatorControl(). So as a secondary problem it was continuously saying "Output not updated enough", which through research I came to realize was a functionality of MotorSafety, which can be disabled with drive.setSafetyEnabled(false). Unfortunately that didn't work because it was in operatorControl() and operatorControl() was not being called when we switched to Teleoperated.

Code: http://pastebin.com/6BzKXXVA

Unfortunately the stack trace isn't available to me right now.

Joe Ross
31-01-2014, 19:04
I suspect that your code is crashing, prior to operatorControl, which is the cause of the motor safety messages. Please provide the entire netbeans output, there should be a stack trace in there.

jalozinski
01-02-2014, 16:25
ant -f C:\\Users\\Developer\\Desktop\\Axiom deploy run
clean:
Deleting directory C:\Users\Developer\Desktop\Axiom\build
Created dir: C:\Users\Developer\Desktop\Axiom\build
Created dir: C:\Users\Developer\Desktop\Axiom\build\classes
[crio-compile] ./src, C:/Users/Developer/sunspotfrcsdk\lib\wpilibj.jar;C:/Users/Developer/sunspotfrcsdk\lib\networktables-crio.jar, C:/Users/Developer/sunspotfrcsdk\lib\squawk.jar -> ./build/classes
Compiling 1 source file to C:\Users\Developer\Desktop\Axiom\build\classes
compile:
preverify:
Created dir: C:\Users\Developer\Desktop\Axiom\build\preverify
Created dir: C:\Users\Developer\Desktop\Axiom\build\preverify.r aw.util
[crio-preverify] ./build/classes, , C:/Users/Developer/sunspotfrcsdk\lib\wpilibj.jar;C:/Users/Developer/sunspotfrcsdk\lib\networktables-crio.jar, C:/Users/Developer/sunspotfrcsdk\lib\squawk.jar -> ./build/preverify
Expanding: C:\Users\Developer\sunspotfrcsdk\lib\wpilibj.jar into C:\Users\Developer\Desktop\Axiom\build\preverify
Expanding: C:\Users\Developer\sunspotfrcsdk\lib\networktables-crio.jar into C:\Users\Developer\Desktop\Axiom\build\preverify
jar:
[crio-jar] ./build/preverify, ./resources -> ./build/app.jar
Building jar: C:\Users\Developer\Desktop\Axiom\build\app.jar
suite:
Created dir: C:\Users\Developer\Desktop\Axiom\build\suite
[crio-suite] ./build/app.jar -> ./build/suite/image
CompilerOracle: exclude com/sun/squawk/Method.getParameterTypes
CompilerOracle: exclude com/sun/squawk/SymbolParser.getSignatureTypeAt
CompilerOracle: exclude com/sun/squawk/SymbolParser.stripMethods
[translating suite image [closed: false, parent: squawk] ...]
### Excluding compile: com.sun.squawk.Method::getParameterTypes
### Excluding compile: com.sun.squawk.SymbolParser::getSignatureTypeAt
[Including resource: META-INF/MANIFEST.MF]
[Including resource: META-INF/maven/edu.wpi.first.wpilib.networktables.java/NetworkTablesAzalea/pom.properties]
[Including resource: META-INF/maven/edu.wpi.first.wpilib.networktables.java/NetworkTablesAzalea/pom.xml]
Romizer processed 391 classes and generated 4 files.
Expanding: C:\Users\Developer\Desktop\Axiom\build\app.jar into C:\Users\Developer\Desktop\Axiom\build\suite
Moving 1 file to C:\Users\Developer\Desktop\Axiom\build\suite
Moving 1 file to C:\Users\Developer\Desktop\Axiom\build\suite
Moving 1 file to C:\Users\Developer\Desktop\Axiom\build\suite
Deleting: C:\Users\Developer\Desktop\Axiom\image.suite.api
deploy:
[crio-configure] Configuration files not included in this version of the sdk
[crio-configure] Checking that crio is configured for Java
Host OS: Windows 7 6.1, 6.1
Host JVM: Java HotSpot(TM) Client VM 24.45-b08
Target IP: 10.47.87.2
Network interfaces on host:
11a/b/g Wireless LAN Mini PCI Express Adapter: address: 10.47.87.9 netmask: 255.255.255.254
WARNING: Host is not on same subnet as robot. May not be able to complete all communication with robot.
Connecting FTP @10.47.87.2
[crio-deploy] ./build/suite/image.suite -> 10.47.87.2
Sending local file image.suite
run:
[cRIO] . Output[OTA Server] ********* REBOOTING cRIO *********
[cRIO]
[cRIO] not updated often enough.
Waiting for cRIO to reboot (1s)
Waiting for cRIO to reboot (2s)
Waiting for cRIO to reboot (3s)
Waiting for cRIO to reboot (4s)
Waiting for cRIO to reboot (5s)
Waiting for cRIO to reboot (6s)
Waiting for cRIO to reboot (7s)
Waiting for cRIO to reboot (8s)
Waiting for cRIO to reboot (9s)
Waiting for cRIO to reboot (10s)
Waiting for cRIO to reboot (11s)
Waiting for cRIO to reboot (12s)
Waiting for cRIO to reboot (13s)
[cRIO]
[cRIO] -> * Loading debug.o: debug
[cRIO] Debugging is up, target server mounted at /tsfs
[cRIO]
[cRIO]
[cRIO] VxWorks
[cRIO]
[cRIO] Copyright 1984-2006 Wind River Systems, Inc.
[cRIO]
[cRIO] CPU: cRIO-FRC II
[cRIO] Runtime Name: VxWorks
[cRIO] Runtime Version: 6.3
[cRIO] BSP version: 1.0/0
[cRIO] Created: May 23 2013, 16:00:09
[cRIO] ED&R Policy Mode: Deployed
[cRIO] WDB Comm Type: WDB_COMM_END
[cRIO] WDB: Ready.
[cRIO]
[cRIO] * Loading nisysrpc.out: nisysrpc
[cRIO] * Loading NiRioRpc.out: NiRioRpc
[cRIO] * Loading nivissvc.out: nivissvc
[cRIO] task 0x1855110 (Service Locator Thread 5) deleted: errno=0 (0) status=0 (0)
[cRIO] NI-RIO Server 13.0 started successfully.
[cRIO] task 0x17a7ba0 (NiRioRpc) deleted: errno=0 (0) status=0 (0)
[cRIO] * Loading nivision.out: nivision
[cRIO] * Loading visa32.out: visa32
[cRIO] task 0x18ebe50 (VISA Jungo Init Thread) deleted: errno=196709 (0x30065) status=-1073807360 (0xbfff0000)
[cRIO] * Loading niserial.out: niserial
[cRIO] * Loading NiFpgaLv.out: NiFpgaLv
[cRIO] task 0x18f0300 (Service Locator Thread 6) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x18f0300 (Service Locator Thread 7) deleted: errno=0 (0) status=0 (0)
[cRIO] task 0x18f0300 (Service Locator Thread 8) deleted: errno=0 (0) status=0 (0)
[cRIO] * Loading FRC_FPGA_ChipObject.out: FRC_FPGA_ChipObject
[cRIO] task 0x163b4f0 (nisysapi-mDns) deleted: errno=0 (0) status=0 (0)
[cRIO] * Loading FRC_NetworkCommunication.out: FRC_NetworkCommunication
[cRIO] FRC_NetworkCommunication version: p4-1.4.0a18
[cRIO] FPGA Hardware GUID: 0x1394F6DC1FEB42EC6910E5767ED1D22C
[cRIO] FPGA Software GUID: 0x1394F6DC1FEB42EC6910E5767ED1D22C
[cRIO] FPGA Hardware Version: 2012
[cRIO] FPGA Software Version: 2012
[cRIO] FPGA Hardware Revision: 1.6.4
[cRIO] FPGA Software Revision: 1.6.4
[cRIO] * Loading FRC_JavaVM.out: FRC_JavaVM
[cRIO]
[cRIO]
[cRIO] [OTA Server] Version: 2012 FRC, Jan 5 2012, 17:20:48
[cRIO]
[cRIO]
[cRIO] Welcome to LabVIEW Real-Time 13.0
[cRIO] task 0x178fe88 (sysapi-rpc) deleted: errno=0 (0) status=0 (0)
[cRIO]
[cRIO] [Squawk VM] Version: 2011 FRC, Nov 5 2011, 14:34:13
[cRIO] FPGA Hardware GUID: 0x1394f6dc1feb42ec6910e5767ed1d22c
[cRIO] FPGA Software GUID: 0xa14c11bde4bb64aef6a86fc52a294cd9
[cRIO] Initiating
[cRIO] JavaCameraLib was compiled from SVN revision 2962
[cRIO] Default disabled() method running, consider providing your own
[cRIO] Robot Drive... Output not updated often enough.
[cRIO] Robot Drive... Output not updated often enough.
[cRIO] Robot Drive... Output not updated often enough.
[cRIO] Robot Drive... Output not updated often enough.
[cRIO] Robot Drive... Output not updated often enough.
[cRIO] Robot Drive... Output not updated often enough.
[cRIO] Robot Drive... Output not updated often enough.
[cRIO] Robot Drive... Output not updated often enough.
[cRIO] Robot Drive... Output not updated often enough.


Here you go

Joe Ross
01-02-2014, 17:00
Are you enabling the robot on the driver station?

jalozinski
03-02-2014, 09:18
Yes.

BradAMiller
03-02-2014, 14:54
One problem is that you are allocating a bunch of PWMs to the same channel (0).

// Motor constants
int FRONT_LEFT_MOTOR_PWM = 1;
int REAR_LEFT_MOTOR_PWM = 2;
int FRONT_RIGHT_MOTOR_PWM = 3;
int REAR_RIGHT_MOTOR_PWM = 4;
int LAUNCH_PWM;
int RIGHT_WINCH_PWM;
int LEFT_WINCH_PWM;
int LINE_ACTUATOR_PWM;

// Motor controller configurations
Jaguar frontLeft = new Jaguar(FRONT_LEFT_MOTOR_PWM);
Jaguar rearLeft = new Jaguar(REAR_LEFT_MOTOR_PWM);
Jaguar frontRight = new Jaguar(FRONT_RIGHT_MOTOR_PWM);
Jaguar rearRight = new Jaguar(REAR_RIGHT_MOTOR_PWM);
Jaguar launch = new Jaguar(LAUNCH_PWM);
Jaguar rightWinch = new Jaguar(RIGHT_WINCH_PWM);
Jaguar leftWinch = new Jaguar(LEFT_WINCH_PWM);

The RIGHT_WINCH_PWM, LEFT_WINCH_PWM and LINE_ACTUATOR_PWM are all going to be 0 because they are unassigned. When you create new Jaguar objects with 0 as the port number, the code will break. I'm not sure why we aren't seeing output complaining about the "Requested PWM channel number is out of range".

You might want to assign them unique values and try again.

Brad

jalozinski
03-02-2014, 18:03
Tried commenting them out nothing changed.

Another programmer on the team discovered that the movement code worked fine on its own, but once the Camera code was added the motors fail to run, even in teleop.

jalozinski
05-02-2014, 14:19
Bump. The situation has not changed. I've tried placing the camera code in a different class, nothing changed. My mentor believes that the camera is sending too much data for the cRio to handle, but even when recording at 1 FPS the situation has not changed.

jalozinski
09-02-2014, 16:31
Well we've figured it out. Apparently your while loops should run at 10Hz to stay synced with the cRio. Locking.

crap how do i lock this aaaaaa