A small quadruped robot, inspired by boston dynamic Spot.
Key Features • Overview • Getting started • Credits • License
- Live preview - Make changes, See changes
- Real time data sync
- Camera live stream
- Dual joystick controller
- Dark/Light mode
- Full screen mode
- Immersive, distraction free.
- Self hosted, self included
This repository contains the complete source code for a Spot Micro quadruped robot. Execution of the software takes place on a ESP32 cam, which runs various number of FreeRTos task for seamless robotic operations. By focusing on practicality and simplicity in both hardware and software, it offer an accessible platform for learning, experimentation, and modest real-world applications.
- ESP32 cam - Brain
- OV2640 160° - Camera
- PCA9685 - Servo board
- 12x 20kg(or higher) servo motors
- MPU6050 - Inertial measurement unit
- GY-271 - Magnetometer
- SZBK07 - 20A DC-DC Buck Converter
- LM2596 or XL4015 - DC-DC Stepdown Module
- 2x HC-SR04 - Ultrasonic Distance Sensor
- 0.96" SD1306 - OLED diplay
- ACS712 - Current sensor
- ADS1115 - 16 bit analog to digital converter
- Power button w/ led
- 4x 18650 Li-ion battery in 2P2S configuration
- Couple of resistors (10K, 47.7k, 33K)
- 4x Servo extension cables
The robots is 3D printed and is a combination of different Spot Micro designs, with some minor modification on top. The original design is developed by KDY0523.
The 3D prints is assembled with some additional component:
- 84x M2x8 screws + M2 nuts
- 92x M3x8 screws + M3 nuts
- 64x M3x20 screws + M3 nuts
- 12x 625ZZ ball bearings
The software make use of a range of different libraries to enhance the functionality. Up to date list can be seen in platformio.ini file. The libraries includes:
- Esp32SvelteKit
- PsychicHttp
- ArduinoJson
- Adafruit SSD1306
- Adafruit GFX Library
- Adafruit BusIO
- Adafruit PWM Servo Driver Library
- Adafruit ADS1X15
- Adafruit HMC5883 Unified
- Adafruit Unified Sensor
- UrlEncode
- MPU6050 light
- SPI
The software utilizes a couple of FreeRTos task
Task | Description | Priority | Core |
---|---|---|---|
Idle0 task | Burns cpu time to track cpu usage for core 0 | 0 | 0 |
Idle1 task | Burns cpu time to track cpu usage for core 1 | 0 | 1 |
Spot service task | Handle synchronous services | 2 | 0 |
To dis-/enable the major feature I use defines. Define them in either featureflags.h or in platformio.ini's build_flags.
Feature | Description | Default |
---|---|---|
FT_BATTERY | Whether or not to use battery | 0 |
FT_NTP | Whether or not to use time server | 1 |
FT_SECURITY | Whether or not to use login system | 0 |
FT_MQTT | Whether or not to use MQTT | 0 |
FT_SLEEP | Whether or not include sleep management | 0 |
FT_UPLOAD_FIRMWARE | Whether or not to use OAT | 0 |
FT_DOWNLOAD_FIRMWARE | Whether or not to use github for firmware updates | 0 |
FT_ANALYTICS | Whether or not to use analytics service | 1 |
The controller is a SvelteKit app, which main focus is to calibrate and control the robot.
It is made to be included and hosted by the robot. Therefore there is placed a lot of thought behind the functionality and dependencies.
For the development dependencies I choose the following
Dependencies | Description |
---|---|
SvelteKit | SvelteKit is an application framework built on top of Svelte, enhancing it with features like routing, server-side rendering, and static site generation. It streamlines the development process by integrating server-side capabilities with Svelte's client-side benefits. Furthermore it make the development process fast and enjoyable. |
Vite | Vite is a frontend tool that is used for building fast and optimized web applications. Is serves code local during development and bundles assets for production |
Typescript | TypeScript's integration of static typing enhances code reliability and maintainability. |
Tailwind CSS | Tailwind CSS accelerates web development with its utility-first approach, ensuring rapid styling and consistent design. |
For the app functionality I choose the following:
Dependencies | Description |
---|---|
Three | Easy to use, lightweight, cross-browser, general purpose 3D library. |
Urdf-loader | Utilities for loading URDF files into THREE.js and a Web Component that loads and renders the model. |
Xacro-parser | Javascript parser and loader for processing the ROS Xacro file format. |
NippleJS | A vanilla virtual joystick for touch capable interfaces. |
Uzip | Simple, tiny and fast ZIP library. |
ChartJS | Simple and flexible charting library. |
The kinematic for the robot is from this kinematics paper
-
Clone and open the new project
git clone https://github.com/runeharlyk/SpotMicroESP32-Leika
-
Install dependencies with preferable package manager (npm, pnpm, yarn)
cd app pnpm install
-
Configure device settings
- Update
factory_settings.ini
with relevant settings
- Update
-
Upload filesystem image using platformIO
-
Upload firmware using platformIO
-
Run the app
cd app pnpm run dev
See the open issues for a full list of proposed features (and known issues).
This project takes great inspiration from the following resources:
- Spot Micro Quadruped Project - mike4192
- Kinematics
- ESP32SvelteKit template
- SpotMicroAi
- Spot Micro - Leika
- NightDriverStrip
- Spot Micro Quadruped Project - mike4192 - Great ROS based project
- SpotMicroAi - Group repository with simulations and runtimes
runeharlyk.dk · GitHub @runeharlyk · LinkedIn @Rune Harlyk