allwpilib
allwpilib copied to clipboard
[documentation] Remove RobotContainer from templates
Removing from templates is waiting on https://github.com/wpilibsuite/allwpilib/pull/7054
/format
/format
We need to discuss whether removal of RobotContainer makes sense, especially that we're on the cusp of starting development on adding FTC support for 2027. FTC has something similar to RobotContainer in their current templates; I believe this because they need to keep hardware instantiated through all opmodes (which each look like variants of Robot.java). I don't want to remove it just to add it back in. So I believe we should wait on this and plan on having conversations regarding what we want the template approach to be across programs and style variations before diving into implementation changes.
We need to discuss whether removal of RobotContainer makes sense, especially that we're on the cusp of starting development on adding FTC support for 2027. FTC has something similar to RobotContainer in their current templates; I believe this because they need to keep hardware instantiated through all opmodes (which each look like variants of Robot.java). I don't want to remove it just to add it back in. So I believe we should wait on this and plan on having conversations regarding what we want the template approach to be across programs and style variations before diving into implementation changes.
The current reason that I among others were interested in removing RobotContainer is because it doesn't add anything. You can achieve a completely functionally identical system by just instantiating things within Robot. I don't understand how FTC would change that for us; if you instantiate things in the constructor (or statically if you so desire) then you have the ability to keep them around for the lifetime of the class, RobotContainer doesn't add anything.
https://discord.com/channels/176186766946992128/368993897495527424/1282509678647181335
It doesn't appear to me based off this conversation that this change will be affected by FTC at all
/format
FTC's hardware map serves to map names (Strings) to hardware objects for team code.
In FTC you tell the robot which devices you have in which ports, and give them a name using a config file, which is then made available via the hardware map.
The hardware map is considered generally outdated, and existed more to accommodate the previous modern robotics control system, rather than the rev control system.
It is also possible to not use the hardware map at all.
I would hope to see the hardware map removed with the new control system, and this change has 0 connection to it.
Should this target the main branch or the 2027 branch?
So, in all likelyhood, the way a lot of this stuff works will likely be changing. There probably isn't a great need to keep this PR up to date, as its likely things will go a lot further in terms of changes.