Odometry Code?

Hello,

I am relatively new to C++ and want to know how to create odometry for my robot for next year. I know what it is and how the concept works, however, I do not know how to implement it into a vex v5 pro project. Is there a tutorial that covers this specifically, or a step-by-step guide that explains it?

1 Like

While I’m sure that there are resources showing you exactly how to create this code, it will be a much better learning experience for you to create it on your own. Here is a video that really helps explain the concept:
REX 1727B - Robot Position Tracking - Vex Nothing But Net - YouTube

Once you fully understand the concept, try to derive the math equations required to make odometry, then implement it in code. Following a guide that shows you how to make the whole thing will teach you close to nothing.

4 Likes

The pilons guide is the closest to step to step you’re going to get. The dawgma article while for pure pursuit contains a simplified version of odometry (with the formula) in the beginning. Like @Electrobotz said, a complete step by step tutorial will teach you close to nothing.
Articles

2 Likes

This is an extremely underrated video that explains the concept pretty clearly. You can use this along with the other linked resources to start an implementation. Intro to Odometry, Part 1 - YouTube

I’d also suggest doing some searches around GitHub if you’re looking for references. People publicly post their programs there, and they’re very valuable for learning from.

2 Likes

Also: I made this guide a while back, although its an extremely basic implementation that doesn’t take into account sideways motion. This only works on tank drives and might drift over time (especially if you only use omni-wheels):

1 Like

Use PROS and use Okapi! There are built-in odometry libraries in Okapi that make it much easier to program and use.

1 Like

You can do this, but you should keep in mind that Okapi is both abandoned and doesnt support a lot of modern odometry setups (such as using an IMU). It’s also notoriously a pain to setup properly for a lot of people.

2 Likes

Im using vex code at the moment. But Is there a Odometry library in Pros?

There are libraries for both PROS and VEXcode

1 Like

Here’s a template that has odometry Introducing JAR-Template: A Vexcode Pro Library featuring Custom PID and Odometry

1 Like

lemlib for PROS
it has pure pursuit as well

1 Like

oh wow, i had no idea Okapi wasn’t updated anymore, and in my experience it was easy to set up but if there’s anything better then what would you suggest?

Where do I find the library for vex code?

IDK about a vex code library but tbh it’s summer, I recommend just learning about it and creating your own code, for me I created Odom with about 20 lines of code including the initializing of the Odom variables and such. Personally, I think the Pilons document is great however I think they also overcomplicate it. If you’re fine with it I don’t mind teaching you myself how to do Odom

1 Like
2 Likes