What is OkapiLib and Should I Use It?

Well, first of all, have you looked at the documentation, specifically the tutorials?
They explain everything about OkapiLib.
If you haven’t seen them yet, you really should do so before asking on the forum (and taking someone’s time to do your research for you :grinning:).

Assuming you have seen the tutorials, API documentation, and examples, let me summarize it for you:

OkapiLib is a library of helper classes that make it easier to program a VEX robot. It does many different things, but the theme is that it lets you easily implement complex things and raise the programming bar.
Okapi contains PID controllers, math facilities, filters (such as moving average or kalman filter), device abstractions, and perhaps the most useful, chassis utilities.
There are a few chassis utilities:

  • Chassis model abstractions - implementations of controls for chassis such as skid-steer, x-drive, etc. It essentially allows you to not worry about the individual motor control and instead control the chassis directly.
    Example commands are chassis.arcade(forward, turn), chassis.forward(power), etc, which all move the chassis forward regardless of actual motor implementation.
  • Chassis PID controllers - building on the chassis models, a chassis controller allows you to move the robot autonomously. It does all the distance math for you, you simply need to give it chassis dimentions. Example commands are chassis.moveDistance(4_ft) or chassis.turnAngle(90_deg).
  • Chassis 2D motion profiling - this uses pathfinder, which generates a sequence of wheel velocities for the robot to drive from one position to another.

Another useful thing OkapiLib has is the Units API. They essentially let you abstract actual units like inches, and instead work with a “length” unit.
Here is an example:

QLength length = 5_cm;
length = length + (2 * feet);
double lengthInMeters = length.convert(meter);

Another common use of the Units API is for angles (QAngle angle = 90_deg;).

OkapiLib can do much more, but those are the core features. It is completely open source, so you can see exactly how it works and learn from it.

Btw, OkapiLib (Okapi) is named after the animal. There is no reason to capitalize the name.