17 |
18 | > Note. Total 6 Legs are required.
19 |
20 | ## Body Assemble
21 |
22 | TBD
--------------------------------------------------------------------------------
/software/pathTool/src/path/shiftleft.py:
--------------------------------------------------------------------------------
1 |
2 | from collections import deque
3 |
4 | from lib import semicircle_generator
5 | from lib import path_rotate_z
6 |
7 | g_steps = 20
8 | g_radius = 25
9 |
10 | def path_generator():
11 | assert (g_steps % 4) == 0
12 | halfsteps = int(g_steps/2)
13 |
14 | path = semicircle_generator(g_radius, g_steps)
15 | path = path_rotate_z(path, 90) # shift 90 degree to make the path "left" shift
16 |
17 | mir_path = deque(path)
18 | mir_path.rotate(halfsteps)
19 |
20 | return [path, mir_path, path, mir_path, path, mir_path, ], "shift", 20, (0, halfsteps)
21 |
--------------------------------------------------------------------------------
/software/pathTool/src/path/shiftright.py:
--------------------------------------------------------------------------------
1 |
2 | from collections import deque
3 |
4 | from lib import semicircle_generator
5 | from lib import path_rotate_z
6 |
7 | g_steps = 20
8 | g_radius = 25
9 |
10 | def path_generator():
11 | assert (g_steps % 4) == 0
12 | halfsteps = int(g_steps/2)
13 |
14 | path = semicircle_generator(g_radius, g_steps)
15 | path = path_rotate_z(path, 270) # shift 270 degree to make the path "right" shift
16 |
17 | mir_path = deque(path)
18 | mir_path.rotate(halfsteps)
19 |
20 | return [path, mir_path, path, mir_path, path, mir_path, ], "shift", 20, (0, halfsteps)
21 |
--------------------------------------------------------------------------------
/software/pathTool/src/path/rotatez.py:
--------------------------------------------------------------------------------
1 |
2 | from collections import deque
3 | import math
4 |
5 | from lib import get_rotate_x_matrix, get_rotate_y_matrix
6 |
7 | g_steps = 20
8 |
9 | z_lift = 4.5
10 | xy_radius = 1
11 |
12 | def path_generator():
13 |
14 | pi = math.acos(-1)
15 |
16 | result = []
17 | step_angle = 2*pi / g_steps
18 | for i in range(g_steps):
19 | x = xy_radius * math.cos(i*step_angle)
20 | y = xy_radius * math.sin(i*step_angle)
21 |
22 | m = get_rotate_y_matrix(math.atan2(x, z_lift)*180/pi) * get_rotate_x_matrix(math.atan2(y, z_lift)*180/pi)
23 | result.append(m)
24 |
25 | return result, "matrix", 50, range(g_steps)
--------------------------------------------------------------------------------
/software/hexapod7697/src/hexapod/config.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | namespace hexapod {
4 |
5 | namespace config {
6 | // all below definition use unit: mm
7 | const float kLegMountLeftRightX = 29.87;
8 | const float kLegMountOtherX = 22.41;
9 | const float kLegMountOtherY = 55.41;
10 |
11 | const float kLegRootToJoint1 = 20.75;
12 | const float kLegJoint1ToJoint2 = 28.0;
13 | const float kLegJoint2ToJoint3 = 42.6;
14 | const float kLegJoint3ToTip = 89.07;
15 |
16 |
17 | // timing setting. unit: ms
18 | const int movementInterval = 5;
19 | const int movementSwitchDuration = 150;
20 | }
21 |
22 | }
--------------------------------------------------------------------------------
/software/hexapod7697/src/hexapod/debug.h:
--------------------------------------------------------------------------------
1 | #pragma once
2 |
3 | #include