Triwheel Bot

I recently built my first drivetrain with three omni directional wheels. At first, I expected the programming to be confusing. My dad even told me that I would probably need to use trigonometry to make everything work correctly. I had no idea what that “trigonometry” was about and because of that, I imagined I would be dealing with lots of difficult equations and complex calculations.

However, once I started working on the code, I discovered that the solution was much more logical and simple than I had expected. I was able to break the problem into smaller pieces and think about what each wheel needed to do. By using straightforward logic and carefully testing the robot’s movements, I gradually built a program that controlled the drivetrain effectively:

motor_1.spin(FORWARD)
motor_2.spin(FORWARD)
motor_3.spin(FORWARD)
while True:
    axis_a = controller.axisA.position()
    axis_b = controller.axisB.position()
    axis_c = controller.axisC.position()
    axis_d = controller.axisD.position()
    motor_1.set_velocity(axis_b + axis_a - axis_c, PERCENT)
    motor_2.set_velocity(axis_b + axis_a + axis_d + axis_c * 0.5, PERCENT)
    motor_3.set_velocity(axis_b + axis_a - axis_d + axis_c * 0.5, PERCENT)
    wait(20, MSEC)

This experience surprised me. I thought the hardest part would be doing complicated math, but it turned out that thinking through the problem step by step was more important. It felt a lot like solving a puzzle. Once I understood what I wanted the robot to do, soon it all started to make sense. Building this drivetrain showed me that sometimes things that seem really difficult at first can end up being much simpler than you expect as you break the problem down and approach it step by step.