tubetranscript.io

Brogan M. Pratt · Transcript · · Updated

The 5 Levels of FTC Localization (From Encoders to AprilTags) – Transcript

Video by Brogan M. Pratt · Watch the original on YouTube

Summary

AI-generated from the transcript. Verify details against the source video.

  • The simplest way to figure out localization in FTC robotics is to use encoders on your wheels.
  • Dead wheel odometry uses a rotary encoder attached to a little wheel to help prevent wheel slippage issues.
  • Teams use April tags as an absolute positioning method with pre-made maps to calculate robot locations.

Key moments

  1. Intro
  2. Method 1
  3. Method 2
  4. Method 3
  5. Method 4
  6. Method 5
Video thumbnail: The 5 Levels of FTC Localization (From Encoders to AprilTags)
Source video on YouTube · Transcript generated automatically and may contain errors.

Use this video with Pro

Reading, copying and transcript downloads are free. Create saved AI results for this video with a signed-in Pro account ($9/month).

Transcript

Search ignores accents. All transcript text stays visible.

One of the most important questions for your robot to answer is where am I? This is a dead wheel odometry pod and effectively and it's a fundamental concept for FTC robotics and it's the idea of localization and by the end of today you'll understand some of the most common methods that you can use to be able to localize or figure out where your robot is inside of the field. I'm Coach Pratt and I've been teaching robotics design for over a decade now and I've coached FTC teams to national championship wins. Today I'm going to

step you through the most common methods for localization of a robot to be able to answer that question. Where are you that used inside the FTC? So in FTC robotics, the simplest way to figure out some localization is to use simply use encoders on your wheels. So inside the back of all these motors and typically under this cap here is an encoder. And the encoder, most of them use Hall effect encoders at this point. And a hall effect is effectively a little magnet. So you have a disc in the middle. It's got a magnet attached. You

have another sensor on the other side. And as that shaft rotates, you can keep track of just how many times this has spun. And typically, it's not just one full rotation. It's 28 clicks per rotation or 50 clicks per rotation or 40 clicks per rotation. CPR, you'll be able to find that on your motor data. But that's the simplest way.

And then how can I actually apply that to a robot? Well, if I were to connect to that motor import on something like a tank drive chassis here, as I rotate these wheels, if I know the circumference of my wheel and I know the encoder resolution here, I can figure out just how many centimeters I have dried forward using a little bit of math. And wheel encoders work great on something like a tank drive chassis. You're going to have not

too much slip. You have a lot of high traction. And that really does make things a lot easier to simpl simplify that. The problem with simply using a wheel encoder is that you're going to get a little bit of wheel slip. So sometimes what will happen is your robot will be sitting in place and it'll spin and it will think that it has moved despite your drive wheels not actually moving. Like if you're running up against another robot or you end up hitting something or you hit something on a wall and then it tries to push into that, it's still going to think it's moving forward despite it not actually

moving forward. Wheel spin is particularly bad on holomic drives like wheel spins here. So it's quite easy because mechanum drives are designed to slip. Using just wheel encoders on a mechanum drive is typically not going to be very accurate. You're going to have to use something that we'd like to call sensor fusion in robotics which basically means you're going to put multiple sensors together to be able to get yourself some more accurate results.

And on this one, you're going to use an IMU or an inertial measurement unit to be able to do a little bit sensor fusion. So, if you just have the wheel encoders on your motors as something like a holomic mechanum drive, adding in an IMU, go build a pinpoint computer has an IMU builtin and your control hub has an IMU built in. But what an IMU does is it has a gyroscope and an accelerometer to be

able to tell what point or what heading is my robot facing in. So you can start it up. If you say this is forward, as you rotate, you'll be able to know what direction it is that you're facing. So that is a great way of adding in a little bit more reliability to your system, but it doesn't really stop the problem of wheel slippage. To get around that, what teams in the FTC community have come up with is the concept of dead wheel odometry. And this is a dead wheel

odometry pod. And effectively, what you do is you take a little wheel here and you attach this to an encoder. This is a rotary encoder. Again, it's Hall effect. And as it spins, you can keep track of just how many times it's rotated around. So, as this wheel rotates, we can see that that sensor is rotating, keeping track of just how many ticks. This is the same thing. It's in the back of our motors from earlier.

And typically with dead wheels, you attach one on your Y axis and one on your X- axis to be able to keep track of X direction movement and Y direction movement. So this would be called a two pod or two odometry pod setup. So now instead of using encoders from your wheels where you're going to have a lot more slippage, you can see that as I'm slipping here, my dead wheels would not be moving. But using

some dead wheel encoder odometry that can help us stop us from having that wheel slippage and worry too much about that. The problem with just using a two wheel setup is that it doesn't tell you if you've rotated or not. So typically that's where your IMU can come into play. So either using a go does pinpoint or using the IMU on your control hub, you can have one dead wheel to keep

track of your X movement, one dead wheel to keep track of your Y movement, and then your IMU could help keep track of rotation. If you don't have access to a relatively accurate imu, you can also have an additional odometry pod that you can slap on and you can put on another X-axis here. So that now you can keep track of rotation just by looking at how far each individual ones are running it.

And then your Y still keeps track of your Y-axis movement. So you can have three wheel dead wheel odometry is another method for using odometry. Another last thing you typically see with pods is you see them set up on springs. And the reason we set them up on springs because those those field tiles are a little bit squishy. And having a little bit of compliance to be able to make sure that these things are always forced onto the ground can really help because sometimes you might find

that you get run into something and your robot kicks off a bit. And of course, if you kick off, your dead wheel is no longer touching the floor. You're no longer going to have accurate measurements. Now, on top of mechanical designs for keeping track of where you are in space, there's also visual designs. And at FTC, we typically use something called April tags for that.

And an April tag is kind of like a fancy QR code, or I guess it's technically a less fancy QR code because you only have an 8 by8 square. So you have a lot less data packed into one of these. So how an April tag works is you have known locations and known sizes for where April tags are around the field. And if you know what size the April tag is and you know where exactly it is on the field, you can upload that pre-made map into your robot's processor. And then it

can use some camera vision like a Limelight 3A, a Husky lens, or a standard webcam, and it can calculate how big is that object inside of my camera's field of vision. And if I know how big it is, and I know what skew it is, I know how far away I am, and I know what angle I am in relative to this. And if I know how large that is inside my camera and I know how big my camera is, I can calculate how far away I am. And then you can use that as another method

of localization. And often times what teams will do is they'll use those April tags. They'll use the dead wheel adometry and then when a camera comes into vision of an April tag, they'll do a quick calculation and they'll throw in, okay, I know exactly where I am on the field based on this April tag. and they'll update the errors that may have been occurring on top of those odometry pods for their localization method. So the most accurate robots using localization typically have one, two, or

even three methods to use some sensor fusion, likely some deadwheometry, using some IMUs, and also using a camera localization method to be able to take a look at those April tags and calculate where they are inside of space. The nice thing about April tags is they are absolute positioning as opposed to relative positioning. With dead wheel encoders, you can only really know where you are relative to where you started.

You can know you've moved 20 paces forward. You can know you've moved three steps to the left relative to the position point. But with an April tag, because you can upload a pre-made map of the FTC field, you can know exactly where you are on side of the field location. So, it's a bit more complex to get set up, but it is also a bit more accurate and a bit more reliable when it comes up to figuring out where you are.

If you're looking for more resources, you can consider joining the community down below. I'll have CAD and other code snippets you can take access to. If you're looking for more tutorials on how you actually do localization, you can take a look at my channel down below. I've got tutorials on using April tags with various different camera systems. And I'll have more tutorials coming up on using localization patterns, things like roadrunner and pedagopathing coming up in the future. If you got any questions, let me know in the comments. And as always, best of luck out there in this next robotic season.

Frequently asked questions

The simplest way to figure out localization is to use encoders on your wheels.

Dead wheel odometry helps stop robots from having issues with wheel slippage by using a separate rotary encoder wheel.

April tags provide absolute positioning because teams can upload a pre-made map of the FTC field to calculate exact locations.