Open jkleiber opened 1 year ago
How do you make the step from "command written in TOML" to "actual autonomous code"? Or would the auto just look like some kind of:
public Auto() {
ArrayList<Command> commandList = new ArrayList<>();
for command in commands:
if command.type == SetShooterCommand:
commandList.append(new SetShooterCommand(*command.args)
elif command.type == DriveForwardCommand:
commandList.append(new DriveForwardCommand(*command.args)
super(commandList);
}
?
Yeah, so it would probably be something like what you're describing. The TOML side would pass in command type, parameters, and time. Then we'd need to schedule these commands in AutonomousPeriodic based on time elapsed in auto
Summary In preparation for the 2023 season, we should up our autonomous game. The biggest improvement we can make is by not using hard-coded autonomous C++ files, but rather load dynamically from a script.
In the past I've seen this done via CSV or JSON, but I'd like to try this in TOML using arrays of tables.
Work to Do
Verification