📃 Adds more docs
This commit is contained in:
+28
-24
@@ -2,39 +2,43 @@
|
||||
|
||||
Spot is comprised of a 3D printed body, some hardware and list of electronic components.
|
||||
|
||||
## Body
|
||||
## Hardware
|
||||
|
||||
Spot 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.
|
||||
|
||||
* [robjk reinforced shoulder remix](https://www.thingiverse.com/thing:4937631)
|
||||
* [Kooba SpotMicroESP32 remix](https://www.thingiverse.com/thing:4559827)
|
||||
* [KDY0532 original design](https://www.thingiverse.com/thing:3445283)
|
||||
- [robjk reinforced shoulder remix](https://www.thingiverse.com/thing:4937631)
|
||||
- [Kooba SpotMicroESP32 remix](https://www.thingiverse.com/thing:4559827)
|
||||
- [KDY0532 original design](https://www.thingiverse.com/thing:3445283)
|
||||
|
||||
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
|
||||
- 84x M2x8 screws + M2 nuts
|
||||
- 92x M3x8 screws + M3 nuts
|
||||
- 64x M3x20 screws + M3 nuts
|
||||
- 12x 625ZZ ball bearings
|
||||
|
||||
## Electronics
|
||||
|
||||
These are the electronics i used for mine and can easily be switched up to suit your Spot's needs.
|
||||
|
||||
* 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
|
||||
| Component | Specification | Required | Recommendation |
|
||||
| ------------------------- | ----------------------------- | -------- | ------------------------------------------------------------------------------------------------------- |
|
||||
| ESP32 | Brain | Yes | ESP32-S3 (N8R8) with a camera. |
|
||||
| OV2640 or OV5640 | Camera | No | 120-160° |
|
||||
| PCA9685 | Servo board | Yes | Add thicker solder traces |
|
||||
| 12x Servo motors | Actuators | Yes | 20kg-35kg with high speed. If they are rated for your battery voltage you can skip the step down module |
|
||||
| MPU6050 | Inertial measuring unit (IMU) | No | GY-87 or MPU-9250 include magnetometer |
|
||||
| HMC5883 | Magnetometer | No | GY-87 or MPU-9250 include magnetometer |
|
||||
| Power switch | Main power switch | Yes | |
|
||||
| Power button w/ led | Mode switch controller | No | |
|
||||
| 2x HC-SR04 | Ultrasonic Distance Sensor | No | |
|
||||
| LM2596 or XL4015 | DC-DC Stepdown Module | Yes | Should be set a 5V for the ESP32 and peripherals |
|
||||
| 0.96" SD1306 | OLED display | No | |
|
||||
| SZBK07 | 20A DC-DC Buck Converter | No | Stepdown to servo voltage. If you select servos rated for you battery voltage, you don't need this. |
|
||||
| 7.6-8.4V Battery | Battery | No | Im using 4x 18650 in 2s2p configuration, but other people have 2s LiPos. |
|
||||
| 4x Servo extension cables | Servo extension cables | Yes | You can either buy them or make them with a couple or headers and some cable. |
|
||||
|
||||
I recommend getting a ESP32-S3 with a camera, allowing for more computation and imaging capabilities.
|
||||
|
||||
It means a more responsive robot as its faster doing sensor fusion, calculating kinematic and gait planning, and networking.
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
# 🦾 Kinematics
|
||||
|
||||
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
|
||||
|
||||
$$T_{body}=\left[x_b,y_b,z_b,\phi, \theta,\psi\right]$$
|
||||
|
||||
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:
|
||||
|
||||
$$P_{feet}=\left\{(x_{f_i},y_{f_i},z_{f_i})|i=1,2,3,4\right\}$$
|
||||
|
||||
where $x_{f_i}, y_{f_i}, z_{f_i}$ are cartesian coordinates for each foot $i$.
|
||||
|
||||
Solving the inverse kinematics yields target angles for the actuators.
|
||||
|
||||
<!-- Write about the calculation, rotation matrix and trig -->
|
||||
|
||||
<!-- L1, L2, L3, L4, L, W -->
|
||||
|
||||
<!-- $$
|
||||
R_{body} =
|
||||
\begin{bmatrix}
|
||||
\cos\psi\cos\theta & \cos\psi\sin\theta\sin\phi - \sin\psi\cos\phi & \cos\psi\sin\theta\cos\phi + \sin\psi\sin\phi \\
|
||||
\sin\psi\cos\theta & \sin\psi\sin\theta\sin\phi + \cos\psi\cos\phi & \sin\psi\sin\theta\cos\phi - \cos\psi\sin\phi \\
|
||||
-\sin\theta & \cos\theta\sin\phi & \cos\theta\cos\phi
|
||||
\end{bmatrix}
|
||||
$$ -->
|
||||
@@ -0,0 +1,50 @@
|
||||
# 🏁 Motion state controller
|
||||
|
||||
The motion controller is a finite state machine with state allowing for static and dynamic posing, 8-phase crawl and bezier bases trot gait, and choreographed animation.
|
||||
|
||||
## Controller Input Mapping
|
||||
|
||||
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 |
|
||||
|
||||
<!-- ### Static and dynamic posing -->
|
||||
|
||||
## Walking gait
|
||||
|
||||
General about walking gait
|
||||
|
||||
Time step
|
||||
|
||||
Phase condition
|
||||
|
||||
Stance and swing controller
|
||||
|
||||
## 8-phase crawl gait
|
||||
|
||||
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 $t\in [0,1]$ is updated. When $t\geq 1$ the phase index is updated and phase time is reset.
|
||||
|
||||
Is derived from [mike4192 spotMicro](https://github.com/mike4192/spotMicro)
|
||||
|
||||
## Trot gait (12 point bezier curve)
|
||||
|
||||
The trot gait implements a phase time $t\in[0,1]$, but instead of using contact phases we define a swing/stance ratio of phase time offset for each leg.
|
||||
|
||||
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
|
||||
Reference in New Issue
Block a user