Making a Good FTC Control System

For most of the 2010s, FTC has had a series of really subpar control systems, and it wasn’t until around 2017 that we finally got a reliable, compact control system with Rev.

In the hope future control systems don’t end up on this trajectory, I decided it was worthwhile investigating what goes into a good control system for FTC and what common pitfalls exist.

As such, I’ve been working on this slide deck off and on looking into what goes into building an appropriate control system for FTC: Making a good FTC Control System - Google Slides

I’m curious to hear what CD’s thoughts are :slight_smile:

20 Likes

Thanks for posting! I really enjoyed the analysis you completed in your presentation. I hope one day a FMS can return for FTC!

2 Likes

Q: Why not use an external USB Wi-Fi radio?

A: There’s a couple reasons.


Reliability

External USB sticks are more likely to be vulnerable to ESD, and being exposed means they can get damaged. (I’m not entirely sure if there are many USB dongles out there that would even bother with TVS diodes, since USB dongles aren’t really made for FTC.) It’s also just another critical connection point that has to be maintained at all costs. Even in FRC we occasionally see radios get munched in matches.

Keeping the radio on the inside of a robot controller has in the past 8 or so seasons of use proven that it’s much harder to kill a radio if it’s not exposed with its own power and signal lines. And remember, an external radio connection can constitute a major and particularly vulnerable point of failure.

One of the best things that’s happened in the past 5 years for reliability is the death of the USB OTG cable connecting an Android phone to an Expansion Hub (instead being all integrated with the Control Hub), as that was a vulnerable “spinal cord” for robots.

And the theoretical signalling benefits are not particularly large, especially when your drivers are within 20 feet or so and has near-constant line of sight.

Ease of use and compactness

External USB radios are another thing to keep track of and easy to lose. It’s another thing that requires documentation for teams to know how to install properly and even then many teams still won’t do it right.

Additionally, they will probably take up more space than the integrated answer, especially if you’re asking for COTS dongles that aren’t completely terrible. Once again, space is at a premium in FTC.

But what if a better technology shows up?

Fortunately for various regulatory reasons a control system with integrated Wi-Fi will likely still have the actual radio either be some sort of whole-package USB or M.2 internally anyway, so putting the radio in the controller doesn’t rule out upgrades down the line.

Overall, it’s just better.

If done right (and Rev has proven it can be done right), an integrated radio will just win out on every single front. And unlike the Samantha days (where the Wi-Fi was external), we don’t really think about the radio too much these days anymore.

1 Like

Q: Does CAN/RS485 have a place in FTC?

A: I’d rather not have either, frankly. But they can have their place if done carefully.

The whole premise of having a whole “bus” implies a distributed topology

…and distributed topologies just don’t fit FTC.


(Just as a reminder of what Modern Robotics was like.)


In FRC, we generally use CAN in a distributed topology. The roboRIO does application logic, the PDP/PDH does power distribution, the Pneumatic Hub handles pneumatics, and your various motor controllers and sensors also connect on bus.

Having this is necessary in FRC, as a single brick can’t really work at the scale the program runs at. A single Kraken has like 5-6x more power output than an entire FTC control system. The electronics are also proportionally much smaller than the mechanisms, so space utilization isn’t super critical.

However, FTC is not FRC. Space matters. Power budgets are smaller. As argued throughout my presentation, having a single centralized brick fits the program’s needs way better than a series of distributed controllers.

Requring the use of a CAN or RS485 bus with external modules for motor and servo control is just more space and wiring that has to be fit in for functionality that you most likely can fit onboard.

And CAN is not the easiest thing in the world to wire either. You have to worry about things like termination and connection points and often not having good feedback other than “it doesn’t work in this state.” Many FRC teams already struggle with CAN, and they have the luxury of generally much less dense robots (and generally more mentor/program support) than FTC teams do.

This is not even to mention the latency implications. Even FRC teams like 971 have used PWM rather than CAN in the past to command motors for latency reasons.

You can make CAN and RS485 have good latency properties with intelligent design but it does take some thought and proper design work on your protocol.

Requiring CAN raises the cost and complexity of sensors and other devices.

As someone who works on CAN devices to sell to FRC teams, I can tell you straight up that needing CAN for your sensors will raise their cost and development time. That’s because now you need a microcontroller to read the actual sensor’s interface (be it SPI, I2C, PWM, or something else) and then transmit it in a certain protocol you (and the control system vendor) designed via CAN or RS485 hardware.

It makes the sensor bigger and a magnitude more complicated than just a breakout board of a single sensor chip with some TVS diodes, because now you need firmware and have to worry about frame periods and vendor drivers and all sorts of other stuff.

CAN and RS485 are gateways to vendor lock-in and raise barriers to entry

If you’re from FRC you’re probably thinking of a certain avian-themed vendor’s $300 CAN-FD bus, but we can see this elsewhere too.

In FTC, we currently use RS485 to connect the Control Hub to the Expansion Hub, but that’s the only legal application currently. The actual RS485 protocol isn’t even documented, either.
So it would be a bit hard for someone to design something to function on that RS485 bus if they were not Rev.

In FRC, even with the Rio CAN bus, you need to ask for a vendor ID (unless you want to lie). And even then, few vendors actually publish how their CAN protocols work.

In comparison, if I wanted to sell a non-CAN mag encoder for FTC or FRC, I just need to pick a magnetic encoder IC, stick it on a quadrature or analog breakout with a case, and I’m done.
No firmware, no worrying about protocols, frame periods, vendordeps, or OTA updates, nothing.


The relatively open nature of FTC’s parts rules is its one major and enduring feature over Vex. It’s a big reason why we put up with advancement prospects that make the current regional situation look pretty and historical apathy from the rest of the FIRST community, because there’s just nothing like it that you can do in the same resource tier. I would hate to see that die, personally.

5 Likes

Q: Why is FTC so obsessed with deadwheel odometry? Top FRC teams don’t need to, why would they?

A: Well, to answer that we need to explain a few things.

Preface: What’s a deadwheel odometry?

When motion planned autos was first popularized by Gluten Free’s 3-year run of dominance in 2018, 2019, and 2020, they also popularized using these small unpowered omni-wheel pods, usually on a springed suspension, connected to quadrature encoders.

Three of them on a drivebase (or two with an IMU) is sufficient to calculate displacement on the x, y, and rotation axes, as each omni wheel will only spin when the robot is moving in the axis of measurement while remaining stationary when the robot is moving perpendicular to it.
Knowing your displacement is important for robot localization — that is, knowing where your robot is on the field.

And knowing where you are on the field fast is important when you’re moving fast in order to make sure you’re moving to the correct spot fast.

Using the quadrature interface is fast on current FTC control systems, and this sort of integrating localization benefits from higher update rates as to reduce overall drift, as error can and will still accumulates as the robot drives.

And while other localization methods do pop up now and then, none have really displaced the role that deadwheel odometry plays in FTC.


But wait, in FRC we just use drivetrain encoders for this! Why do FTC teams bother? Well, for starters…

Traction: (or rather, the lack thereof)

In FRC, you get carpet, and you also get nitrile tread that might as well be welded to it. Your wheels don’t really slip even when you gun your motors at full blast. Thus, you have generally don’t really deal with slip error.

Like, this is why top teams love nitrile so much over Colsons, even if they obliterate way faster than Colsons. Not slipping is great for making that 3-piece auto repeatable.


In FTC, you play on a foam tile field.
image

Your drive wheels are also limited in how grippy they can be, as if they are too grippy they fail the field destruction test and are not allowed to be used.

Foam also has inconsistent coefficients of friction (the center of the tile has more CoF than the seams), and this isn’t even getting into the various materials that can be under foam fields at different venues — most competitions are held in places like school gyms with hard floors, but occasionally you’ll have events in libraries or Championships that have carpet underneath the mats.

On top of this, practically everyone in FTC uses mecanum. And mecanum isn’t known for being the most tractile drivetrain.

To summarize “why mecanum” in one sentence: Mecanum is to FTC what swerve is to FRC, and swerve is to FTC what diffy swerve is to FRC (at least before the 4 motor limit).

We even have a similar dynamic to the issues in this thread where starter kits encourage teams to build 2 motor 2+2 tank drivetrains whereas everyone competitive uses mecanum instead. At least mecanum only needs about 10 lines of code and doesn’t need sensor feedback to drive.


Overall, this means that your drivebase will almost certainly slip if you gun it at full acceleration.
You can try to motion profile to avoid this but you’ll likely come out slower than gunning it.
Traction is the main reason why springloaded omni pods have consistently won over drivetrain encoders. They just straight up perform better because they compensate for limitations inherent to FTC.


But…couldn’t you just use AprilTags/distance sensors/etc? You can, but they’re more game specific.

Usability from game to game and speed

Deadwheel odometry is a perennially reusable solution from season to season, provided there’s no terrain.
And there usually isn’t much terrain nowadays because it hurts lower end teams. (Just ask any team that was a rookie in 2016, FTC or FRC).

Distance sensors and vision targets are much more fickle and dependent on game setup.
For example, time-of-flight sensors (e.g. the Rev one) can’t really see the polycarbonate field perimeters, so you’d need to rely on the existence of hard-plastic targets you can point at for distance.
Ultrasonic sensors don’t suffer from this as much but they’ll usually update at like 25 Hz which is just too slow for anything other than correcting drift at the end of paths.

Vision is of more interest in recent times, but it’s a really hard problem in FTC.
There’s this old 254 Championships presentation that near the beginning talks about what makes good or bad vision targets.
And the same principles still hold true for FTC too. Consider the average match looks something like this:

As you might see, it’s a bit hard to find vision targets. Maybe the preloaded cones on the field would work?

We do get those odd pictures taped to the walls that you’re supposed to use with PTC’s Vuforia, but they’re not exactly good at being vision targets and as you might predict, nobody used them.
It wasn’t until the current season at time of writing (Centerstage) that we finally got 36h11 AprilTags as fiducials instead.

AprilTags are not a cure-all though. You’re still constrained by how fast the the Control Hub can read them (about as well as Limelight 2/RPi 3), so they’re still limited to being a drift corrector when moving slow enough.


Meanwhile, deadwheel odometry is able to update at 200 Hz, gives you a global position on the field, and if done right won’t drift enough to matter by the end of your 30 second autonomous.
At best, distance sensors and AprilTags augment these existing solutions, rather than replace them.

And the performance difference between them and drivetrain encoders is significant enough in FTC that if you can use deadwheels, theres no real reason not to.

2 Likes

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