Make sure the controller is on port 0 and the joystick is on port 1 in the driver station.
If you aren't getting comms, try restarting everything; we've also noticed that connecting to the robot using USB and disconnecting after a while makes stuff work.
Make sure you have the latest version of the robot code from this Github repository.
Problem: Exception is thrown when trying to create Autonomous command objects.
Explanation: Since the drivetrain is not a subsystem, it is instantiated in roboInit(). The RobotDrive object is not static because it is referenced within instance methods so when the same ports are called again to create a new RobotDrive object in autonomous commands, it throws an exception.
Solution:
Modify the autonomous command constructor so it takes a RobotDrive parameter
When constructing a new autonomous command, make actual parameter as the RobotDrive object in Robot.java
Problem: CameraServer.getInstance().startAutomaticCapture() sets up a perfectly fine output but manually setting up the CvSink and CvSource returns nothing.
Possible Solution:
Read the source code for startAutomaticCapture() and build the servers from there.
Problem: Whenever grabImage() is called, a NullPointerException is called.
Possible Explanation: Scheduler works in a way where as command are added in last. Thus, the grabImage() is called before the SetUpCamera command is even ran.
Possible Solution:
Move setup code from SetUpCamera command to the constructor of the Camera subsystem
Delete SetUpCamera command
Ensure the program does not try to grab an image before sources are set up
Problem: gyro.calibrate() is called twice: during autonomousInit() and teleopInit()
Explanation: During manual testing, there are no FMS so it is not possible to call both autonomousInit() and teleopPeriodic() in one session. Thus gyro.calibrate() is called during teleopInit() to make the gyro work during teleop.
Solution:
Delete the gyro.calibrate() line from teleopInit()