This is my first year doing FRC and I've been given the task of programming. I don't have a lot of experience, but I've managed to put together a program in RobotBuilder. So far the only subsystem I've written functional stuff for has been the LaunchingWheel. I'm working on getting the chassis working now, but I've hit a big road block. Following this tutorial (http://wpilib.screenstepslive.com/s/3120/m/7882/l/85166-driving-the-robot-with-tank-drive-and-joysticks) I've managed to put together a code that builds, but it doesn't do anything. I think the problem has something to do with the chassis.cpp because I don't really understand much of what I did in it. If anyone could offer any help, it would be greatly appreciated.
You’re doing really well so far! Just keep asking here if you get stuck.
I’ve managed to put together a code that builds, but it doesn’t do anything.
For teleop driving, you need to set the default command on your Chasis subsystem. This command runs when no other command wants to do something with the chassis drivetrain. DriveWithJoystick will work fine as the default Chasis command. Set that in robot builder and regenerate C++ code. (Make sure you have the 2nd mid-season C++ update)
The file Subsystems/Chasis.cpp won’t compile after you add the default command because C++ doesn’t know where to find the definition of DriveWithJoystick.
To fix that, near the top of Chasis.cpp, after all the other #include commands, add this:
#include "../Commands/DriveWithJoystick.h"
Now it should compile and you can control the motors with the right joystick’s X and Y axes.
Put your code directly into github without zipping it up first. This lets you track changes on individual files. Here’s one of our robot tests so you have an example of how it will look in github: https://github.com/FRC3322/ShooterFeederTest