The robot uses a pentapedal gait that is hard-wired into the code. This demonstration does not take advantage of CustomGait, (which is a topic for future work.) The gait is defined by a series of cubic splines through joint space. Each segment is associated a desired position, force and stiffness curve. For this demonstration, desired forces are set to zero (desired velocities are hard-code to zero.) Also, the control law exists in joint-space and the force sensor uses its own local frame. (another topic for future work is to transform everything into the robot frame.)
The higher-level algorithm above the PD control loop is as follows:
x_command = (Fs - Fd) / k + Xd xdot_command = 0When we subsitute this control law into the PD control we get:
torque = (Kp / k)(Fs - Fd) + Kp(Xd - X) - Kd( Xdot ) Kf = Kp / kSo, we can think of the stiffness as a ratio between force and position terms. (Sidenote: if Kp goes to zero but Kf remains finite, then the control law becomes a pure-force control law.)
Key: Fs = Force Sensor Signal Fd = Desired Force k = Desired Stiffness Xd = Desired Position X = Actual Position Xdot = Actual Velocity Kp = Propitional Gain Kd = Derivative Gain Kf = Force Gain
-- SalomonTrujillo - 15 Sep 2005