I have done all the updates needed and downloaded the default code into the CRIO of our bench top test, but the joysticks still don’t control the motor. We enable the teleoperator part of the Driver Station but even though it says there is a code on the CRIO the motors still don’t move, we even tried doing thing autonomously. Does anyone know how to properly deploy the java code?
Did you create a project and Deploy that project via the green button?
if so and it looks and it seems to be deploying check if you created multiple projects in Netbeans
We had a problem that if you deploy one project and then try to redeploy another project it just acts like it is deploying the code whereas it keeps the old code as the startup code.
So this might occur if you deployed 2 robot main classes or deployed one project and then later tried to deploy another different project.
We had to reformat and redeploy code and then it called the correct robotMain class on startup.
Or I might be completely wrong, just my theory.
Reboot the cRIO, deploy the code again, then check to see if it’s deploying the code. You’ll know when it echos a statement in the console that teleop has started, and/or the “Robot Code” light on the driver station lights up.
Are the joysticks changing the LED indicator on the Jaguar? (Red or green instead of orange when pushing the joysticks).
Can you post your teleop code?
On your output on the Classmate, is anything showing up in terms of the PWM values (Located on the upper half of the dashboard). Perhaps your PWM/CAN wiring is incorrect, and the values are being sent out but the motor controllers are not seeing them.
Thank you for the advice we have tried some of your theories and it is still not working. We know that the program is being deployed because we are told it the program is built successfully but…
We are using a benchtop test so we only have Victors and no Jaguars. The Victors light up and blink orange, usually if the motors are working correctly the stop flashing.
I know that we’re not deploying two projects at once because I make sure to stop the previous project before deploying or running a new one.
As for the classmate I have to get back to you on the PWM but the it knows there is a robot code in the CRIO and in know that the joysticks are there.
Thank you again for the suggestions. I am open to more advice.
Our programming team is also having a hard time with the initial example in the Java getting started document. Our first error was a version mismatch as we had an old cRIO image. The next step was to figure out how the RobotDrive works. The Javadoc does a good job explaining the classes and constructors.
Here are a few points of interest: public RobotDrive(int leftMotorChannel, int rightMotorChannel, double sensitivity)Constructor for RobotDrive with 2 motors specified with channel numbers. Set up parameters for a two wheel drive system where the left and right motor pwm channels are specified in the call. This call assumes Jaguars for controlling the motors."
“Specification of an IO Port consists of a slot number followed by a channel number. If the port is on the lowest numbered slot/module, the slot parameter can be left out.”
For the Getting Started Example, I assume that the example will have to be modified for a Victor controller or if you a higher slot number than 4 on the cRIO. I am not sure how to modify the the RobotDrive for a Victor yet.
Finally, I believe our current issue is that our project was not selected as the main project and as a result, a println from another program displayed in the output.
Interesting, I never thought about that. We’ve recently had some issues pop up, and I’m wondering if that’ll solve some, if not, all, of our problems.