A small quadruped robot, inspired by boston dynamic Spot.
Leika is a smaller quadruped robot for the Spot-Micro community. Built on an ESP32 and powered by FreeRTOS, she can handle multiple tasks seamlessly - Like video and data streaming, solving kinematic and gait planning, controlling IO and much more. By focusing on practicality and simplicity in both hardware and software, it offer an accessible platform for learning, experimentation, and modest real-world applications.
- Live Preview: Instant feedback with real-time updates.
- Real-Time Data: Stream camera feeds, monitor sensors, and analyze data on the fly.
- Kinematic Precision: Full kinematic model for accurate movements.
- Dual joystick controller
- Robot mirroring visualization
- Highly customizable
- Self-Hosted: Complete autonomy, from code to execution.
The robots is implemented using a sense, plan, act control flow.
To enable complex movements, it's beneficial to be able to describe the robot state using a world reference frame, instead of using raw joint angles.
The robot's body pose in the world reference frame is represented as
Where
-
$x_b, y_b, z_b$ are cartesian coordinates of the robot's body center. -
$\phi, \theta,\psi$ are the roll, pitch and yaw angles, describing the body orientation.
The feet positions in the world reference frame are:
where
Solving the inverse kinematics yields target angles for the actuators.
The controller is a svelte app, which get embedded in the firmware of the robot. Which mean that new releases and OTA updates includes the latest controller.
The controller includes full control over robot settings like network and calibration, and a visualization.
You can find the current steps to get a fresh new doggo up and barking on /docs
You can find a description for the current esp32 firmware and controller here.
The motion controller is a finite state machine with state allowing for static and dynamic posing, 8-phase crawl and bezier based trot gait, and choreographed animation.
The controller input is interpret different between the modes. For the walking it it looks like this:
Controller Input | Mapped to Gait Step | Range |
---|---|---|
Left x joystick | Step x | -1 to 1 |
Left y joystick | Step z | -1 to 1 |
Right x joystick | Step angle | -1 to 1 |
Right y joystick | Body pitch angle | -1 to 1 |
Height slider | Body height | 0 to 1 |
Speed slider | Step velocity | 0 to 1 |
S1 slider | Step height | 0 to 1 |
Stop button | E stop command | 0 or 1 |
The 8-phase crawl gait works by lifting one leg at a time while shifting its body weight away from the leg.
As the name implies, the gait consist of 8 discrete phases, which represents which feet should be contact the ground or be in swing.
At each time step the phase time
Is derived from mike4192 spotMicro
The trot gait implements a phase time
The stance controller implements a sin curve to control the depth of steps.
The swing controller implements a bezier curve using 12 control points centered around the robot leg.
Rotation is calulated using the same curve
-
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
See the project backlog and open issues for full list of proposed and active features (and known issues).
This project takes great inspiration from the following resources:
- Spot Micro Quadruped Project - mike4192
- Kinematics
- ESP32SvelteKit template
- SpotMicro ESP32 - Maarten Weyn
- SpotMicroAi
- Spot Micro - Leika
- NightDriverStrip
If you like the project and want to follow it evolving concidering โจ-ing the project
- Spot Micro Quadruped Project - mike4192 - Great ROS based project
- SpotMicroAi - Group repository with simulations and runtimes
runeharlyk.dk ย ยทย GitHub @runeharlyk ย ยทย LinkedIn @Rune Harlyk