|
|
|
![]() |
|
|||||||
|
||||||||
![]() |
|
|
Thread Tools | Rate Thread | Display Modes |
|
|
|
#1
|
||||
|
||||
|
Re: How to Program Mecanum
Okay that didn't work either. Nothing works. The program uploads - the DS doesn't through any errors - it shows all green lights - but nothing happens with the Joysticks - I can press anything on the XBox controller and nothing happens. I can still make the robot move using ,my preassigned values in autonomous.
Here is the upload for Eclipse: Code:
Buildfile: C:\Users\Kristen\Documents\GitHub\Copy of Copy of Getting Started\build.xml
Trying to override old definition of task classloader
clean:
[delete] Deleting directory C:\Users\Kristen\Documents\GitHub\Copy of Copy of Getting Started\build
[delete] Deleting directory C:\Users\Kristen\Documents\GitHub\Copy of Copy of Getting Started\dist
compile:
[mkdir] Created dir: C:\Users\Kristen\Documents\GitHub\Copy of Copy of Getting Started\build
[echo] [athena-compile] Compiling src with classpath=C:\Users\Kristen/wpilib/java/current/lib/WPILib.jar:C:\Users\Kristen/wpilib/java/current/lib/NetworkTables.jar to build
[javac] Compiling 8 source files to C:\Users\Kristen\Documents\GitHub\Copy of Copy of Getting Started\build
jar:
[echo] [athena-jar] Making jar dist/FRCUserProgram.jar.
[mkdir] Created dir: C:\Users\Kristen\Documents\GitHub\Copy of Copy of Getting Started\dist
[mkdir] Created dir: C:\Users\Kristen\Documents\GitHub\Copy of Copy of Getting Started\build\jars
[echo] [athena-jar] Copying jars from C:\Users\Kristen/wpilib/java/current/lib/WPILib.jar:C:\Users\Kristen/wpilib/java/current/lib/NetworkTables.jar to build/jars.
[copy] Copying 2 files to C:\Users\Kristen\Documents\GitHub\Copy of Copy of Getting Started\build\jars
[jar] Building jar: C:\Users\Kristen\Documents\GitHub\Copy of Copy of Getting Started\dist\FRCUserProgram.jar
get-target-ip:
[echo] Trying Target: roboRIO-4623.local
[echo] roboRIO found via mDNS
dependencies:
[echo] roboRIO image version validated
[echo] Checking for JRE. If this fails install the JRE using these instructions: https://wpilib.screenstepslive.com/s/4485/m/13503/l/288822-installing-java-8-on-the-roborio-using-the-frc-roborio-java-installer-java-only
[sshexec] Connecting to roboRIO-4623.local:22
[sshexec] cmd : test -d /usr/local/frc/JRE
deploy:
[echo] [athena-deploy] Copying code over.
[scp] Connecting to roboRIO-4623.local:22
[scp] done.
[scp] Connecting to roboRIO-4623.local:22
[scp] done.
[echo] [athena-deploy] Starting program.
[sshexec] Connecting to roboRIO-4623.local:22
[sshexec] cmd : . /etc/profile.d/natinst-path.sh; /usr/local/frc/bin/frcKillRobot.sh -t -r;
[sshexec] stopped process in pidfile '/var/run/natinst/FRC_UserProgram.pid' (pid 4205)
BUILD SUCCESSFUL
Total time: 13 seconds
https://github.com/MrSTUDofCODE/NewM...team4623/robot Also we have another person programming in labview - so I went into the web interface and checked disable RT startup - which should have switched it back to JAVA PLEASE help - THANKS! Last edited by LFRobotics : 05-02-2015 at 11:23. |
|
#2
|
|||
|
|||
|
Re: How to Program Mecanum
I think you need to add Scheduler.run() in TeleopPerodic()
Edit: Never go off memory-- it should be Code:
public void teleopPeriodic() {
Scheduler.getInstance().run();
}
Last edited by cstelter : 05-02-2015 at 12:07. |
|
#3
|
|||
|
|||
|
Re: How to Program Mecanum
Building on last post--
When you push teleop mode on Drive station, IterativeRobot will call teleopInit() and then call teleopPeriodic() every 20ms. Similarly when you press Autonomous from drive station, it calls autonomousInit() and then autonomousPeriodic() every 20ms after that. Your autonomousPeriodic() directly calls your drivetrain so you are making that call every 20ms in autonomous. This is why this mode works for you. Note, you should *never* call any subsytem functionality from anything but a command. You are only asking for trouble. Your autonomousPeriodic() *should* be: Code:
public void autonomousPeriodic() {
Scheduler.getInstance().run();
}
Code:
public class Robot extends IterativeRobot {
Command autonomousCommand;
...
Code:
public void autonomousInit() {
// schedule the autonomous command (example)
if (autonomousCommand == null) {
autonomousCommand=new leftStraffe();
}
autonomousCommand.start();
}
|
|
#4
|
|||
|
|||
|
Re: How to Program Mecanum
Just one more thing I'm compelled to point out....
FRC is the hardest fun you'll ever have. If it always worked the first time you might have fun, but it wouldn't be hard and you probably would learn less. Quote:
Don't be discouraged. You're living the FRC dream my friend. You're facing challenges looking for answers. This is my life too-- I'm a 25 year professional software engineer. I've had these moments too. But the true joy will come in learning, and building on what you have learned. Every time I get stuck in my job, I'm on stackoverflow or google searching for a solution to my particular problem. But I would not have gotten as far as I have by concluding 'Nothing Works'. Don't go there. You *will* get through this. |
|
#5
|
|||
|
|||
|
Re: How to Program Mecanum
Hello. How far have you trouble shot. Is the radio working both ways? Has the robot done any commands? Can you hard wire it to run? Fresh battery? My 3 cents. Thank You Thomas (just give me a crabcake) McCubbin
|
![]() |
| Thread Tools | |
| Display Modes | Rate This Thread |
|
|