|
1 | | -# OpenCat |
| 1 | +# OpenCat — Open-Source Quadruped Robot Framework |
2 | 2 |
|
3 | | -OpenCat is the open-source Arduino and Raspberry Pi-based quadruped robotic pet framework developed by Petoi, the maker of futuristic programmable robotic pets. |
| 3 | +OpenCat is an open-source Arduino and Raspberry Pi-based framework for building and programming quadruped robots. Developed by [Petoi](https://www.petoi.com?utm_source=github&utm_medium=code&utm_campaign=github-opencat), the maker of futuristic programmable robotic pets, it powers both the Bittle robot dog and Nybble robot cat platforms. |
| 4 | + |
| 5 | +The framework handles the hard parts — gait coordination, servo control, IMU integration — so you can focus on what you're actually building on top of it. |
4 | 6 |
|
5 | 7 |  |
6 | 8 |
|
7 | 9 |  |
8 | 10 |
|
9 | | -Inspired by Boston Dynamics' Big Dog and Spot Mini, Dr. Rongzhong Li started the project in his dorm at Wake Forest University in 2016. After one year of R&D, he founded Petoi LLC and devoted all his resources to developing open source robots. |
10 | 11 |
|
11 | | -The goal is to foster collaboration in quadruped(four-legged) robotic research, education, and engineering development of agile and affordable quadruped robot pets, bring STEM concepts to the mass, and inspire newcomers (including many kids and adults) to join the robotic AI revolution to create more applications. |
| 12 | +--- |
| 13 | + |
| 14 | +## About the Project |
| 15 | + |
| 16 | +Inspired by Boston Dynamics' Spot, Dr. Rongzhong Li started OpenCat in his dorm at Wake Forest University in 2016. The goal was straightforward: make agile quadruped robots affordable and hackable enough for researchers, educators, and makers — not just well-funded labs. |
| 17 | + |
| 18 | +OpenCat is now deployed across two robot platforms and used in K-12 schools, university research labs, maker spaces, and independent projects worldwide. |
| 19 | + |
| 20 | +### Current Hardware |
| 21 | + |
| 22 | +- 🐶 [Bittle X — robot dog with voice control](https://www.petoi.com/products/petoi-robot-dog-bittle-x-voice-controlled?utm_source=github&utm_medium=code&utm_campaign=github-opencat) — current generation, BiBoard/ESP32 |
| 23 | +- 🐱 [Nybble Q — robot cat](https://www.petoi.com/products/petoi-nybble-q-robot-cat?utm_source=github&utm_medium=code&utm_campaign=github-opencat) — current generation |
| 24 | + |
| 25 | +The original [Bittle](https://www.petoi.com/collections/robots/products/petoi-bittle-robot-dog?utm_source=github&utm_medium=code&utm_campaign=github-opencat) and [Nybble](https://www.petoi.com/collections/robots/products/petoi-nybble-robot-cat?utm_source=github&utm_medium=code&utm_campaign=github-opencat) (NyBoard/ATmega328P) are discontinued but still fully supported by this codebase. This repo is the right place for NyBoard users; for ESP32/BiBoard see [OpenCatESP32](https://github.com/PetoiCamp/OpenCatESP32). |
12 | 26 |
|
13 | 27 |  |
14 | 28 |
|
15 | | -The project is [a complex quadruped robot system](https://www.petoi.com/pages/petoi-programmable-quadruped-robot-system) for anyone exploring quadruped robotics. We want to share our design and work with the community and bring down the hardware and software costs with mass production. OpenCat has been deployed on all Petoi's bionic palm-sized, realistic lifelike [cute robot cat Nybble](https://www.petoi.com/collections/robots/products/petoi-nybble-robot-cat?utm_source=github&utm_medium=code&utm_campaign=nybble) and |
16 | | -[high-performance robot dog Bittle](https://www.petoi.com/collections/robots/products/petoi-bittle-robot-dog?utm_source=github&utm_medium=code&utm_campaign=bittle). We now have established a production line and can ship these [affordable robotic kits and accessories](https://www.petoi.com/store?utm_source=github&utm_medium=code&utm_campaign=store) worldwide. |
| 29 | +--- |
| 30 | + |
| 31 | +## What the Framework Gives You |
| 32 | + |
| 33 | +- **Multi-language:** C/C++, Python, block-based coding |
| 34 | +- **Open hardware + software:** fork, modify, extend — no vendor lock-in |
| 35 | +- **Arduino + Raspberry Pi native:** works with the tools you already use |
| 36 | +- **Sensor integration:** cameras, touch, IMUs, ultrasonic, etc. — clip and go |
| 37 | +- **Sim-to-real:** experiment reinforcement learning models on an affordable robot |
| 38 | +- **ROS compatible:** SLAM, navigation, and perception pipelines documented by the community |
| 39 | + |
| 40 | +Whether you're teaching **robotics programming** for the first time or running a graduate-level AI experiment, the platform scales. |
17 | 41 |
|
18 | | -This project provides a base open source platform to create amazing programmable gaits, locomotion, and deployment of inverse kinematics quadruped robots and bring simulations to the real world via block-based coding/C/C++/Python programming languages. |
| 42 | +--- |
19 | 43 |
|
20 | | -Our users have deployed many robotics/AI/IoT applications: |
21 | | -- [robot dog with autonomous movement & object detection](https://www.petoi.com/blogs/blog/reid-graves-robotics-ai-applications-with-bittle-robot-dog-raspberry-pi) |
22 | | -- [Raspberry Pi robotics projects](https://www.petoi.com/blogs/blog/raspberry-pi-robotics-projects-with-petoi-open-source-quadruped-robots) |
23 | | -- [NVIDIA Issac simulations and reinforcement learning on our robots](https://www.youtube.com/playlist?list=PLHMFXft_rV6MWNGyofDzRhpatxZuUZMdg) |
24 | | -- [developed visual and lidar-based SLAM with ROS using Bittle and Raspberry Pi](https://www.youtube.com/watch?v=uXpQUIF_Jyk&list=PLHMFXft_rV6MWNGyofDzRhpatxZuUZMdg&index=6) |
25 | | -- [imitation learning using Tiny Machine Learning Models with Petoi Bittle and Raspberry Pi](https://www.learnwitharobot.com/p/imitation-learning-with-petoi-bittle) |
26 | | -- [IoT automation of a robot fleet with AWS to improve worker safety](https://www.petoi.com/blogs/blog/aws-iot-robot-fleet-demo-with-petoi-bittle) |
27 | | -- [3D-Printed Accessories](https://www.petoi.com/blogs/blog/petoi-bittle-bittle-x-robots-3d-printed-robot-accessories) |
28 | | -- build their own [DIY 3D-print robot pets](https://www.petoi.com/pages/3d-printed-robot-dog-robot-cat) powered by OpenCat |
| 44 | +## What the Community Has Built |
| 45 | + |
| 46 | +Users have shipped real **robotics projects** across AI, Raspberry Pi, and research — a few highlights: |
| 47 | + |
| 48 | +- [Autonomous movement & object detection](https://www.petoi.com/blogs/blog/reid-graves-robotics-ai-applications-with-bittle-robot-dog-raspberry-pi?utm_source=github&utm_medium=code&utm_campaign=github-opencat) |
| 49 | +- [Raspberry Pi robotics projects](https://www.petoi.com/blogs/blog/tagged/raspberry-pi?utm_source=github&utm_medium=code&utm_campaign=github-opencat) |
| 50 | +- [AI and computer vision applications](https://www.petoi.com/blogs/blog/tagged/showcase+ai?utm_source=github&utm_medium=code&utm_campaign=github-opencat) |
| 51 | +- [NVIDIA Isaac simulations and reinforcement learning](https://www.youtube.com/playlist?list=PLHMFXft_rV6MWNGyofDzRhpatxZuUZMdg) |
| 52 | +- [Visual and LiDAR-based SLAM with ROS](https://www.youtube.com/watch?v=uXpQUIF_Jyk&list=PLHMFXft_rV6MWNGyofDzRhpatxZuUZMdg&index=6) |
| 53 | +- [Imitation learning with Tiny ML models](https://www.learnwitharobot.com/p/imitation-learning-with-petoi-bittle) |
| 54 | +- [IoT robot fleet management with AWS](https://www.petoi.com/blogs/blog/aws-iot-robot-fleet-demo-with-petoi-bittle?utm_source=github&utm_medium=code&utm_campaign=github-opencat) |
| 55 | +- [3D-printed accessories and custom builds](https://www.petoi.com/blogs/blog/petoi-bittle-bittle-x-robots-3d-printed-robot-accessories?utm_source=github&utm_medium=code&utm_campaign=github-opencat) |
| 56 | +- [DIY 3D-printed robot pets on OpenCat](https://www.petoi.com/pages/3d-printed-robot-dog-robot-cat?utm_source=github&utm_medium=code&utm_campaign=github-opencat) |
| 57 | + |
| 58 | +Academic and research use cases: [Research Spotlight](https://www.petoi.com/pages/research-spotlight?utm_source=github&utm_medium=code&utm_campaign=github-opencat) |
29 | 59 |
|
30 | 60 |  |
31 | 61 |
|
32 | 62 |  |
33 | 63 |
|
34 | | -We've successfully crowdfunded these two mini robot kits and shipped thousands of units worldwide. |
| 64 | +--- |
| 65 | + |
| 66 | +## Hardware |
| 67 | + |
| 68 | +This repo targets the **NyBoard** — a customized Arduino board based on ATmega328P. It coordinates up to 12 [high-performance servos](https://www.petoi.com/products/quadruped-robot-dog-bittle-servo-set?utm_source=github&utm_medium=code&utm_campaign=github-opencat) for walking, running, jumping, and backflipping. |
35 | 69 |
|
36 | | -With our [customized Arduino-Uno board](https://www.petoi.com/products/nyboard-customized-arduino-board) and [high-performance servos](https://www.petoi.com/products/quadruped-robot-dog-bittle-servo-set) coordinating all instinctive and sophisticated movements(walking, running, jumping, backflipping), one can clip on [various sensors](https://www.petoi.com/products/petoi-sensor-pack) and [camera](https://www.petoi.com/products/intelligent-camera-module) to bring in perception and inject artificial intelligence capabilities by mounting a Raspberry Pi or other AI chips(such as Nvidia Jetson Nano) through wired/wireless connections. |
37 | | - |
38 | | -Please see [Petoi FAQs](https://www.petoi.com/pages/faq?utm_source=github&utm_medium=code&utm_campaign=faq) for more info. |
| 70 | +Extend with: |
| 71 | +- [Sensor pack](https://www.petoi.com/products/petoi-sensor-pack?utm_source=github&utm_medium=code&utm_campaign=github-opencat) |
| 72 | +- [Intelligent camera module](https://www.petoi.com/products/intelligent-camera-module?utm_source=github&utm_medium=code&utm_campaign=github-opencat) |
| 73 | +- Raspberry Pi, Nvidia Jetson Nano, or other AI co-processors via wired/wireless connections |
39 | 74 |
|
40 | | -Also, Check out [all of the OpenCat and Petoi robot user showcases](https://www.petoi.camp/forum/showcase). |
| 75 | +For ESP32/BiBoard (current-gen hardware), see [OpenCatESP32](https://github.com/PetoiCamp/OpenCatESP32). |
41 | 76 |
|
42 | | - |
| 77 | +--- |
43 | 78 |
|
44 | | -## Setup Process: |
| 79 | +## Setup |
45 | 80 |
|
46 | | -OpenCat software works on both Nybble and Bittle, controlled by NyBoard based on ATmega328P. More detailed documentation can be found at the [Petoi Doc Center](https://docs.petoi.com). |
| 81 | +Full documentation: [Petoi Doc Center](https://docs.petoi.com) |
| 82 | +The following steps give you a brief walk-through, but may miss detailed tips and illustrative pictures. |
47 | 83 |
|
48 | | -To configure the board: |
| 84 | +**1. Clone the repo** |
49 | 85 |
|
50 | | -1. Download the repo and unfold. Remove the **-main** (or any branch name) suffix of the folder. |
| 86 | +Remove the `-main` (or branch name) suffix from the folder after downloading. |
| 87 | + |
| 88 | +**2. Open `OpenCat.ino` — select your robot and board** |
51 | 89 |
|
52 | | -2. Open the file OpenCat.ino, select your robot and board version. |
53 | 90 | ```cpp |
54 | | -#define BITTLE //Petoi 9 DOF robot dog: 1x on head + 8x on leg |
55 | | -//#define NYBBLE //Petoi 11 DOF robot cat: 2x on head + 1x on tail + 8x on leg |
| 91 | +#define BITTLE // Petoi 9 DOF robot dog: 1x on head + 8x on leg |
| 92 | +//#define NYBBLE // Petoi 11 DOF robot cat: 2x on head + 1x on tail + 8x on leg |
56 | 93 |
|
57 | 94 | //#define NyBoard_V0_1 |
58 | 95 | //#define NyBoard_V0_2 |
59 | 96 | #define NyBoard_V1_0 |
60 | 97 | //#define NyBoard_V1_1 |
61 | 98 | ``` |
62 | 99 |
|
63 | | -3. Comment out ```#define MAIN_SKETCH``` so that it will turn the code to the board configuration mode. Upload and follow the serial prompts to proceed. |
| 100 | +**3. Enter configuration mode** |
| 101 | + |
| 102 | +Comment out `#define MAIN_SKETCH`, upload, follow serial prompts. |
| 103 | + |
64 | 104 | ```cpp |
65 | 105 | // #define MAIN_SKETCH |
66 | 106 | ``` |
67 | 107 |
|
68 | | -4. If you activate ```#define AUTO_INIT```, the program will automatically set up without prompts. It will not reset joint offsets but calibrate the IMU. It's just a convenient option for our production line. |
| 108 | +**4. (Optional) Auto-init** |
| 109 | + |
| 110 | +`#define AUTO_INIT` skips prompts and auto-calibrates IMU — handy for repeated flashing. |
69 | 111 |
|
70 | | -5. Plug the USB uploader to the NyBoard and install the driver if no USB port is found under Arduino -> Tools -> Port. |
| 112 | +**5. Upload** |
71 | 113 |
|
72 | | -6. Press the upload button (->) at the top-left corner in Arduino IDE. |
| 114 | +Plug USB uploader into NyBoard, install driver if needed, hit upload (→) in Arduino IDE. |
73 | 115 |
|
74 | | -7. Open the serial monitor of Arduino IDE. You can find the button either under Tools, or at the top-right corner of the IDE. |
| 116 | +**6. Serial Monitor** |
| 117 | + |
| 118 | +Set to **no line ending** and **115200 baud rate**. |
| 119 | + |
| 120 | +**7. Reset joint offsets** |
75 | 121 |
|
76 | | -Set the serial monitor as **no line ending** and **115200** baud rate. |
77 | | -The serial prompts: |
78 | 122 | ``` |
79 | 123 | Reset joint offsets? (Y/n) |
80 | 124 | Y |
81 | 125 | ``` |
82 | 126 |
|
83 | | -Input ‘Y’ and hit enter, if you want to reset all the joint offsets to 0. |
84 | | - |
85 | | -The program will do the reset, then update the constants and instinctive skills in the static memory. |
| 127 | +**8. IMU calibration** |
86 | 128 |
|
87 | | -8. IMU (Inertial Measurement Unit) calibration. |
88 | | - |
89 | | -The serial prompts: |
90 | 129 | ``` |
91 | 130 | Calibrate the IMU? (Y/n): |
92 | 131 | Y |
93 | 132 | ``` |
94 | | -Input ‘Y’ and hit enter, if you have never calibrated the IMU or want to redo calibration. |
95 | 133 |
|
96 | | -Put the robot flat on the table and don't touch it. The robot will long beep six times to give you enough time. Then it will read hundreds of sensor data and save the offsets. It will beep when the calibration finishes. |
| 134 | +Place the robot flat on a table. 6 long beeps → reads sensor data → saves offsets → beeps when done. Close Serial Monitor when `Ready!` appears. |
97 | 135 |
|
98 | | -When the serial monitor prints "Ready!", you can close the serial monitor to do the next step. |
| 136 | +**9. Switch to main sketch** |
99 | 137 |
|
100 | | -9. Uncomment ```#define MAIN_SKETCH``` to make it active. This time the code becomes the normal program for the major functionalities. Upload the code. |
101 | 138 | ```cpp |
102 | 139 | #define MAIN_SKETCH |
103 | 140 | ``` |
104 | | -When the serial monitor prints "Ready!", the robot is ready to take your next instructions. |
105 | 141 |
|
106 | | -10. If you have never calibrated the joints’ offsets or reset the offsets in Step2, you need to calibrate them. If you boot up the robot with one side up, it will enter the calibration state automatically for you to install the legs. Otherwise, it will enter the normal rest state |
| 142 | +Uncomment and re-upload. |
107 | 143 |
|
108 | | -11. You can use the serial monitor to calibrate it directly. Or you may plug in the Bluetooth dongle, and use the Petoi app (on Android/iOS) for a more user-friendly interface. The mobile app is available on: |
| 144 | +**10. Joint calibration** |
109 | 145 |
|
110 | | -* IOS: [App Store](https://apps.apple.com/us/app/petoi/id1581548095) |
111 | | -* Android: [Google Play](https://play.google.com/store/apps/details?id=com.petoi.petoiapp) |
| 146 | +Boot with one side up to enter calibration mode, or calibrate directly via Serial Monitor. |
112 | 147 |
|
113 | | -You can refer to the calibration section in the user manual (https://bittle.petoi.com/6-calibration) and Guide for the Petoi App(https://docs.petoi.com/app-guide). |
| 148 | +**11. Optional: Petoi app** |
114 | 149 |
|
115 | | -12. you can use the infrared remote or other applications (such as the Petoi App, Python, serial monitor ... etc.) to play with the robot (https://bittle.petoi.com/7-play-with-bittle). |
| 150 | +Plug in Bluetooth dongle for a friendlier calibration UI: |
| 151 | +- iOS: [App Store](https://apps.apple.com/us/app/petoi/id1581548095) |
| 152 | +- Android: [Google Play](https://play.google.com/store/apps/details?id=com.petoi.petoiapp) |
116 | 153 |
|
117 | | -For updates: |
118 | | -* star this repository to receive timely notifications on changes. |
119 | | -* visit www.petoi.com and [subscribe to our official newsletters](https://www.petoi.com/pages/subscribe-petoi-newsletter) for project announcements. We also host a forum at [petoi.camp](https://www.petoi.com/forum). |
120 | | -* follow us on [Twitter](https://twitter.com/petoicamp), [Instagram](https://www.instagram.com/petoicamp/), [Facebook](https://www.facebook.com/PetoiCamp/), [Linkedin](https://www.linkedin.com/company/33449768/admin/dashboard/), and [YouTube channel](https://www.youtube.com/c/rongzhongli) for fun videos and community activities. |
| 154 | +See the [calibration guide](https://bittle.petoi.com/6-calibration) and [app guide](https://docs.petoi.com/app-guide). |
121 | 155 |
|
122 | | - |
| 156 | +**12. Start building** |
| 157 | + |
| 158 | +Infrared remote, Petoi app, Python, or Serial Monitor. [Full play guide →](https://bittle.petoi.com/7-play-with-bittle) |
| 159 | + |
| 160 | +--- |
| 161 | + |
| 162 | +## Education |
| 163 | + |
| 164 | +OpenCat is used in K-12 robotics programs, community colleges, university labs, and maker spaces: |
123 | 165 |
|
124 | | -## Resources: |
125 | | -* [Advanced tutorials made by users](https://www.youtube.com/playlist?list=PLHMFXft_rV6MWNGyofDzRhpatxZuUZMdg) |
126 | | -* [Review, open-box, and demos by users](https://www.youtube.com/playlist?list=PLHMFXft_rV6PSS3Qu5yQ-0iPW-ohu1sM3) |
127 | | -* [OpenCat robot showcase by users](https://www.petoi.com/pages/petoi-open-source-extensions-user-demos-and-hacks) |
128 | | -* [OpenCat robot gallery](https://www.petoi.com/pages/robot-pet-gallery) |
| 166 | +- [Robotics education showcases](https://www.petoi.com/blogs/blog/tagged/showcase+education?utm_source=github&utm_medium=code&utm_campaign=github-opencat) |
| 167 | +- [STEM & robotics curriculum resources](https://www.petoi.com/pages/resources-curriculum-stem-coding-robot?utm_source=github&utm_medium=code&utm_campaign=github-opencat) |
| 168 | +- [Robotics competitions](https://www.petoi.com/blogs/blog/robot-competitions-with-petoi?utm_source=github&utm_medium=code&utm_campaign=github-opencat) |
| 169 | + |
| 170 | +--- |
| 171 | + |
| 172 | +## Community & Discussion |
| 173 | + |
| 174 | +- [r/OpenCat](https://www.reddit.com/r/OpenCat/) — firmware code, framework hacking, extending and porting OpenCat |
| 175 | +- [r/Petoi](https://www.reddit.com/r/Petoi/) — hardware Q&A, builds, quadruped coding, curriculum, 3D-printed parts, general discussion |
| 176 | + |
| 177 | +--- |
| 178 | + |
| 179 | +## Resources |
| 180 | + |
| 181 | +- [Advanced tutorials by the community](https://www.youtube.com/playlist?list=PLHMFXft_rV6MWNGyofDzRhpatxZuUZMdg) |
| 182 | +- [User showcases and hacks](https://www.petoi.com/pages/petoi-open-source-extensions-user-demos-and-hacks?utm_source=github&utm_medium=code&utm_campaign=github-opencat) |
| 183 | +- [Research spotlight](https://www.petoi.com/pages/research-spotlight?utm_source=github&utm_medium=code&utm_campaign=github-opencat) |
| 184 | +- [Robot gallery](https://www.petoi.com/pages/robot-pet-gallery?utm_source=github&utm_medium=code&utm_campaign=github-opencat) |
| 185 | +- [FAQ](https://www.petoi.com/pages/faq?utm_source=github&utm_medium=code&utm_campaign=github-opencat) |
| 186 | + |
| 187 | +Follow the project: [YouTube](https://www.youtube.com/@petoicamp) · [Twitter](https://twitter.com/petoicamp) · [Instagram](https://www.instagram.com/petoicamp/) · [Facebook](https://www.facebook.com/PetoiCamp/) · [LinkedIn](https://www.linkedin.com/company/33449768/admin/dashboard/) |
| 188 | + |
| 189 | + |
129 | 190 |
|
130 | | -OpenCat robots have been used in robotics education for K12 schools and colleges to teach students about STEM, coding, and robotics: |
131 | | -- [robotics education showcases](https://www.petoi.com/blogs/blog/tagged/showcase+education) |
132 | | -- [STEM & Robotics Curriculum & Resources for Teaching Coding & Robotics](https://www.petoi.com/pages/resources-curriculum-stem-coding-robot) |
133 | | -- [Robotics competitions](https://www.petoi.com/blogs/blog/robot-competitions-with-petoi) |
134 | | -- [Petoi robotics contest](https://www.petoi.com/blogs/blog/petoi-spring-2024-robotics-contest-winners) |
| 191 | +--- |
135 | 192 |
|
136 | | -The [old repository for OpenCat](https://github.com/PetoiCamp/OpenCat-Old) is too redundant with large image logs and is obsolete with no further updates. |
| 193 | +*The [legacy OpenCat repository](https://github.com/PetoiCamp/OpenCat-Old) is archived and no longer maintained.* |
0 commit comments