While the world’s biggest tech companies are pouring billions into taking the driver out of a four-wheeled car, AI engineer Peng Zhihui decided to solve a much trickier problem: taking the rider off a two-wheeled bicycle. The result is the XUAN-Bike, a shockingly capable autonomous bicycle that balances itself perfectly, navigates complex environments, and avoids obstacles. And in a move that can only be described as a massive flex, he open-sourced the entire project.
The bike is a marvel of complex systems integration. Its brain is a custom control board powered by Huawei’s Ascend 310 AI processor. For vision, it uses a combination of an RGBD depth camera and traditional sensors like an accelerometer and gyroscope. But the real magic is in the balance system. Instead of just relying on steering adjustments, the bike uses a metal momentum wheel mounted under the seat that spins at high speed, providing the gyroscopic force needed to keep the bike upright even from a dead stop. You can see the unnervingly smooth results in action on Bilibili.

The entire system is controlled by a neural network running on Huawei’s MindSpore framework, a deep learning architecture. This allows the bike not just to balance, but to perceive its surroundings, identify obstacles, and plot a course. According to the project documentation, the bike’s control model is based on LQR/MPC and a custom reinforcement learning algorithm. For those interested in building their own physics-defying machine, Peng has made all the hardware schematics, model files, and source code available on the project’s GitHub repository.
Why is this important?
This isn’t just an impossibly cool weekend project; it’s a masterclass in modern robotics and control theory. The XUAN-Bike demonstrates that with the right combination of accessible AI hardware and sophisticated software, a single individual can develop autonomous systems that rival the complexity of corporate R&D labs. By open-sourcing the project, Peng has provided an invaluable resource for students, researchers, and hobbyists, demystifying advanced concepts in dynamic stability and autonomous navigation. It’s a powerful reminder that groundbreaking innovation doesn’t always come from a boardroom—sometimes it comes from a garage and a deep-seated desire to make a bicycle do the impossible.
