While the world’s tech titans are haemorrhaging billions trying to nudge driverless cars into the mainstream, AI engineer Peng Zhihui has turned his attention to a far more precarious challenge: ditching the rider from a two-wheeled bicycle. The result is the XUAN-Bike, a staggeringly capable autonomous machine that balances itself with uncanny precision, weaves through complex environments, and dodges obstacles with ease. And in what can only be described as a world-class flex, he’s open-sourced the entire thing.
The bike is a masterclass in bespoke systems integration. Its “brain” is a custom control board powered by Huawei’s Ascend 310 AI processor. For vision, it employs a sophisticated setup combining an RGBD depth camera with the usual suspects—accelerometers and gyroscopes. But the real wizardry lies in the balancing act. Rather than just twitching the handlebars, the bike utilises a high-speed metal momentum wheel tucked under the seat. This provides the gyroscopic force required to keep the frame perfectly upright, even when at a total standstill. You can witness the unnervingly smooth results for yourself on Bilibili.

The entire operation is orchestrated by a neural network running on Huawei’s MindSpore deep learning framework. This allows the bike to do more than just stay upright; it actually perceives its surroundings, identifies hazards, and plots its own path. According to the project documentation, the control model is a blend of LQR/MPC and a custom reinforcement learning algorithm. For those brave enough to build their own gravity-defying kit, Peng has released all the hardware schematics, model files, and source code on the project’s GitHub repository.
Why does this matter?
This isn’t just a brilliant bit of weekend tinkering; it’s a tour de force of modern robotics and control theory. The XUAN-Bike proves that with the right mix of accessible AI hardware and clever software, a lone developer can build autonomous systems that rival the output of massive corporate R&D labs. By throwing the gates open and open-sourcing the project, Peng has handed an incredible resource to students and hobbyists, stripping the mystery away from advanced dynamic stability. It’s a sharp reminder that genuine innovation doesn’t always require a boardroom and a bottomless budget—sometimes all you need is a garage and a stubborn refusal to let a bike fall over.
