Petoi's popular open source quadruped robotic pet framework OpenCat has been upgraded to 2.0 as the main branch with major updates to the Arduino codes in the GitHub repository. You will notice major performance and stability improvement running OpenCat 2.0 on your Petoi four-legged robot dog Bittle and robot cat Nybble.
Open source robot dog Bittle running on OpenCat 2.0
We redesigned the code structure to make the workflow easier to understand and modify:
- Improved the smoothness of motion and the speed of balance adaption.
- Fixed many bugs in the original workflow. For example, the robot no longer skips commands randomly.
- Combine WriteInstinct.ino and OpenCat.ino into a single OpenCat.ino. Use the #define MAIN_SKETCH macro to switch between .
- Python API Updates and Demos
- Token commands
- Designed a new token "K" to send a whole skill array from the Python serial master through the serial port in real-time, then the skill array will be run it locally on the robot.
- A new token "T" to call the last stored "K" skill.
- Optimized the token command workflow: confirm the command is run successfully by printing the token as the response
Add random actions mode for the robot to make it more life-like. Use the token ‘z’ to toggle the feature.
Accelerate the IMU calibration and balancing by using a new MPU6050 function to avoid using the interrupt pin.
- Developed a formalized servo class inherited from the AdafruitPWM servo library. Make it easier to change the parameters of 3rd party servos.
- Add angle limits to avoid most cases of self-collision.
- Put the skill-related functions into the Skill Class. Combine reused code blocks into single functions.
- Make more use of the EEPROM and PRGMEM memory to save resources for flash and SRAM.
- Mirror rightward gaits from the leftward gaits, to save static memory.
- Allow both “newline” and “no-line ending” for the serial monitor.