Oct 2023 Tweet
Browser-based simulator for Petoi Bittle robot dog
The next iteration of my experiments with robot simulation is a demo of a simulator for Petoi Bittle, a neat palm-sized robot dog. Its size and price make it great for democratizing robotics research and education.
Thanks to Rongzhong Li of Petoi for inspiring this demo and providing the data for creating the robot model.
There are 2 robot modes in the demo below, the control model on the left and the simulation model on the right. The control model can be interactively manipulated, and it sets the pose of the simulation model, which is a proper physics/dynamics model.
- Procedural generation of stepping and walking motion (described in the previous post) can be toggled with the “walk” button
- Use WASD keys on the keyboard or on the screen for moving the robot.
- Press the “T” key to switch between moving and rotating the control points.
The performance of the Rapier physics engine is really impressive, but making a realistic simulation with it is challenging. I wasn't yet able to set up joint motors to support the robot model upright when it’s standing or walking. It can be a problem with the settings of the motors, or an inherent issue of the implementation.
For now, to go around this limitation and make a usable demo, I had to reduce simulated world’s gravity and robot’s weight. In the next version I’ll have to either find a fix for Rapier joints, or move to a different physics engine like Physx.