%
% Notation header for the hexaped model with
% compliant legs.
%
% Created by Uluc Saranli, 11.12.1998
%

% The state of the rigid body
        \def    \bodyr  { {\bf r_b} } % The position of the body
        \def    \bodyR  { {\bf R_b} } % The body rotation matrix

        \def    \bodyrd { {\bf \dot{r}_b} } % Body translational velocity
        \def    \bodyRd { {\bf \dot{R}_b} }

        \def    \bodyw { {\bf w_b} } % Body angular velocity
        \def    \bodywd { {\bf \dot{w}_b} }

        \def    \bodyrdd { {\bf \ddot{r}_b} }
        \def    \bodyRdd { {\bf \ddot{R}_b} }

% Reference frames
        \def    \bodyFrame { \cal B } % The name of the body frame
        \def    \worldFrame { \cal W } % The name of the world frame


% Definitions for individual legs
        \def    \legAttach { {\bf a_i} } % The attachment point for the ith leg.
        \def    \legTheta  { \theta_i }
        \def    \legPhi  { \phi_i }
        \def    \legRho  { \rho_i }
        \def    \Theta  { \theta }
        \def    \Phi  { \phi }
        \def    \Rho  { \rho }
        \def    \sprk  { k_{r_i} }
        \def    \sprd  { d_{r_i} }
        \def    \bendk  { k_{\theta_i} }
        \def    \bendd  { d_{\theta_i} }
        \def    \sprexp { K }

        \def    \legState { {\bf v_i} }
        \def    \legStateCart { {\bf \overline{v}_i} }
        \def    \legVel { {\bf \dot{v}_i} }
        \def    \legVelCart { {\bf \dot{\overline{v}}_i} }
        \def    \legAccel { {\bf \ddot{v}_i} }
        \def    \legAccelCart { {\bf \ddot{\overline{v}}_i} }

        \def    \legStateVect { [\legTheta, \legPhi, \legRho]^T }
        \def    \legX { v_{x_i} }
        \def    \legY { v_{y_i} }
        \def    \legZ { v_{z_i} }
        \def    \legStateVectCart { [ \legX, \legY, \legZ ]^T }
        \def    \legVelVect { [ \dot{\legTheta}, \dot{\legPhi}, \dot{\legRho}]^T }
        \def    \legVX { \dot{v}_{x_i} }
        \def    \legVY { \dot{v}_{y_i} }
        \def    \legVZ { \dot{v}_{z_i} }
        \def    \legVelVectCart { [ \legVX, \legVY, \legVZ ]^T }
        \def    \legAccelVect { [ \ddot{\legTheta}, \ddot{\legPhi}, \ddot{\legRho}]^T }
        \def    \legAX { \ddot{v}_{x_i} }
        \def    \legAY { \ddot{v}_{y_i} }
        \def    \legAZ { \ddot{v}_{z_i} }
        \def    \legAccelVectCart { [ \legAX, \legAY, \legAZ ]^T }

        \def    \toePos { {\bf f_i} }
        \def    \toeX { f_{x_i} }
        \def    \toeY { f_{y_i} }
        \def    \toeZ { f_{z_i} }
        \def    \toeVel { {\bf \dot{f}_i} }
        \def    \toeAccel { {\bf \ddot{f}_i} }
        \def    \toePosZ { {\bf f_{i_z}} }

        \def    \legForce { {\bf F_i} }
        \def    \legTorque { {\bf \tau_i} }

        \def    \legRadialForce { F_{r_i} }
        \def    \legBendTorque { \tau_{\legTheta} }
        \def    \legHipTorque { \tau_{\legPhi} }

        \def    \legFlag { leg_i }

        \def    \legRestRho { \rho_{0_i} }
        \def    \legRestTheta { \theta_{0_i} }
        \def    \legToucdownRho { \rho_{t_i} }
        \def    \legLiftoffRho { \rho_{l_i} }

        \def    \legSprings { [ k_{\legTheta}, k_{\legRho} ] }
        \def    \legDampings { [ d_{\legTheta}, d_{\legRho} ] }

        \def    \armatureCurrent { i_{a_i} }
        \def    \armatureVoltage { v_{a_i} }
        \def    \torqueConstant { K_{\tau} }
        \def    \speedConstant { K_w }
        \def    \armatureResistance { r_a }
        \def    \gearRatio { k_g }
% Force and Torque definitions
        \def    \totForce { {\bf F_T} }
        \def    \totTorque { {\bf \tau_T} }

% System parameters
        \def    \inertiaW { {\bf M} }
        \def    \inertiaB { {\bf M_0} }
        \def    \bodyMass { m_b }
        \def    \toeMass { m_t }
        \def    \gravity { g }

% Controller parameters
        \def    \cycleTime { t_c }
        \def    \sweepAngle { \phi_s }

% Implementation specific definitions
    \def    \lumpedState { {\bf x} }
    \def    \lumpedStateVect { [\bodyR, \bodyw, \bodyr, \bodyrd, \toePos, \toeVel] }
    \def    \terrainHeight  { h_t }
    \def    \terrainNormal { n_t }

% Hexapod controller parameters
        \def    \cycleTime { t_c }
        \def    \sweepAngle { \phi_s }
        \def    \legOffset { \phi_o }
        \def    \flightTime { t_f }
        \def    \stanceTime { t_s }
        \def    \dutyFactor { \eta }
        \def    \sweepAngleDiff { \Delta\sweepAngle }
        \def    \legOffsetDiff { \Delta\legOffset }
        \def    \flightTimeDiff { \Delta\flightTime }
        \def    \stanceTimeDiff { \Delta\stanceTime }
        \def    \dutyFactorDiff { \Delta\dutyFactor }
        \def    \control { {\bf u} }
        \def    \controlVect { [\cycleTime, \stanceTime, \sweepAngle, \legOffset] }
