stuttering. For ease and to free up pins on the Roboard, a Lynxmotion SSC-32 Servo Controller was used to interface with the servos. Current sensing was performed with an analog sensor board built designed at RIT. A Xbox 360 controller, with wireless USB interfacing, was used to control the robot. The hexapod body is built with carbon fiber with foam core sheets, and Lexan. Creating a very light body was essential to the hexapod development because extra weight can strain the motors.
Figure 3: The final construction of the robot
IV.
P
ROPOSED
A
PPROACH
A.
Main Loop
The robot operates in a while loop that is dependent on the input from the Xbox 360 controller. The user inputs a direction vector with the joystick on the controller. The vector is interpreted as the direction that the center of the robot should travel in the x-y plane. The method is to use inverse kinematics and differential motion to convert the vector into differential angles for each to servo to move. These differential values are added to the current servo angles, converted to pulse width modulation (PWM) signals and sent to the motors. The movement of the legs is an iterative procedure that continuously updates with the current vector from the joystick. Each leg has a finite number of differential movements,
k
, before it reaches the ground (at value
k
=
k
max
) and the next leg in the gait sequence starts moving starting once again with
k
= 0. While the
x
and
y
of the leg positions are determined by the input vector, the
z
position is defined with a function that is based on the incremented
k
value. The change in the
z
-position of the leg is fed directly into the differential motion equations that are shown later and carried through with the input vector from the joystick. The
z
-position of the leg is controlled by a function that utilizes both the iteration of
k
and the current sensing.
B.
Kinematics
Inverse kinematics are used to determine the differential angles that the leg servos should move from one step to the next. First, a direction from the joystick is interpreted as a vector with step size,
v
. The height of the center of the robot should not change, so its value here is always zero. If the height of the center of the robot changes, that change in position is denoted
dz
and is input into the vector. The angle,
θ
, of the joystick from its straight forward position will be used to determine the
x
-
y
portion of the vector of the robot. The input vector, V is shown below.
=
� ∗
cos
∗
sin
(1) In order to convert the input vector to the leg frame, a frame transformation must be performed. The input vector,
V
, is put into to the position column of the center differential matrix,
c
Δ
(Appendix A, Eq. 3). Using the D-H Table of the robot, the transformation from the center of the robot to the leg frame,
c
T
F
, was found (Appendix A, Eq. 1). After finding
c
T
F
, the differential matrix is needed in order to get the change in position of the foot. The transformation below produces the foot frame differential matrix,
Δ
F
.
∆
=
−1
∗
c
Δ
∗
(2)
Next, the differential change in the position of the foot frame,
D
, is extracted from
Δ
L
. The Jacobian (
J
) (Appendix A, Eq. 2) of the
c
T
F
matrix must be calculated. To find the differential change in the motor angles,
D
θ
, the inverse of the Jacobian is pre-multiplied by
D
. The vector
D
θ
is the angular change that will be made in the current step.
=
�
1
2
3
=
−1
∗
(3) Finally, the differential change in motor position is added to the current servo position, converted to a pulse width modulation signal and sent via serial to the servo controller board.
C.
Z-Position Function
The
z
-position of the foot frame uses a separate function that depends on the increment,
k
, and the current sensing to place the foot at the correct height from the ground. The basic idea is to move the leg up and down independently of the
x
and
y
positions of the leg from the input vector. For each increment, the leg moves a small amount along a path that is defined by the user. The more increments that are used, the smoother the motion will be. The change in the
z
- position that is defined by the function is input directly into the
D
vector before it is multiplied by the inverse Jacobian matrix to obtain the servo angles. The
z
-function comprises of a simple if-then statement that determines whether the leg is interacting with an uneven surface. The structure of the statement will be to check that the current that was sensed from the last movement is within an expected range for that movement. If the detected current differs from the expected current by a