Hi all,

Our programming team is very thin this year, and I’m usually a general fabrication mentor (using the teams account), so programming isn’t my strong suit, but probably the strongest out of all the other mentors.

I’m trying RobotBuilder to better ease the programming process for us. However, I’m having compilation issues.

Hopefully I’ve included all the files needed, but the error I’m receiving is this:

Exception in thread "main" java.lang.Error: Unresolved compilation problems: 
        The method startRobot(Supplier<T>) in the type RobotBase is not applicable for the arguments (Robot::new)
        The constructed object of type Robot is incompatible with the descriptor's return type: T
        at frc.robot.Main.main(

I think I understand the problem, but I am unsure how to solve it.

Many thanks,
Aaron (1.1 KB) (4.1 KB) (15.8 KB) (5.2 KB)

How are you attempting to compile code? RobotBuilder generates a project that can either be opened in VS Code, or built from the command line with ./gradlew build. is a wpilib class, so that shouldn’t be anywhere in your project locally, as gradle handles all dependencies.

Can you post the yaml file? It appears that RobotBuilder has generated incorrect code for the default autonomous command.

It looks like there’s an issue when the autonomous command is set to none. You can just delete this line in RobotContainer m_chooser.setDefaultOption("$command.getName()", new ${name.replace(' ', '')}( m_${name.substring(0,1).toLowerCase()}${name.substring(1).replace(' ', '')} ));

1 Like

Hopefully this will work

RobotBuilder saves the files in C:\Users\Team 3098\FRCProjects\Robot2022\src\main\java\frc\robot
I understood that should be in the wpilib library folder, but when I delete the file locally, the program won’t run due to said missing file.

I’m opening the file in VS Code, from the directory that RobotBuilder exported the file to. This is just a test code for me to understand the program and has no impact on our final product.

I see two issues.

One is the previously mentioned default command issue. This was fixed in WPILib 2022.2.1. After upgrading your WPILib installation, go to the Autonomous Command and explicitly click on None (even though it shows none, internally it has the old Autonomous Command Name).

Second is the the SmartDashboard export of RightGas and LeftGas commands. They have parameters defined, but no parameter presets, which are the parameters to pass when used with the SmartDashboard command. You can either define parameter presets or not export those commands to SmartDashboard. This isn’t unlike defining the parameters that were used for the buttons that enable it, except that you can have multiple parameters presets that will each generate a SmartDashboard button.

1 Like

When I export your yaml file, I get 4 files in the robot directory:,,, and, which is what I expected. Thad’s question is about, not (which isn’t anything that’s in either Robot Builder or WPILib).

I figured out what needed to be done. Essentially I needed to create a project in WPILib and export/copy-paste into that new project. I think I was just extracting the .java files and trying to use them as is.

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.