/*
 * File:   eompuma.h
 *
 * This file provides interface eompuma.cpp.
 */

/*
 * modification history
 *----------------------
 *
 * 06/24/98: K.C. Chang: created.
 */

#ifndef _eompuma_h
#define _eompuma_h

#include "matrix/PrVector3.h"
#include "matrix/PrVector6.h"
#include "matrix/PrMatrix3.h"
#include "matrix/PrMatrix6.h"

extern "C"
{

/*
 * Function: pumaInitSymbolic
 * Usage:    pumaInitSymbolic()
 *
 * initializes internal values for the symbolic eom
 * NOTE: this should be called once in every tick
 */
void eomInit(PrVector6 &q);

/*
 * Function: pumaGetOSIMSymbolic
 * Usage:    pumaGetOSIMSymbolic()
 *
 * returns the operational space inertia matrix
 * Lambda = (J Ainv Jt)inv
 */
void eomGetOSIM(PrMatrix6 &J,PrMatrix6 &A,PrMatrix6 &Lambda);

/*
 * Function: pumaGetWristFrameSymbolic
 * Usage:    pumaGetWristFrameSymbolic()
 *
 * returns the wrist frame in frame {0} 
 */
void eomGetWristFrame(PrMatrix3 &R,PrVector3 &P);

/*
 * Function: pumaGetJacobianSymbolic
 * Usage:    pumaGetJacobianSymbolic()
 *
 * returns the jacobian of the origin of the wrist frame in frame {0} 
 */
void eomGetJacobian(PrMatrix6 &J);

void eomGetJacobianDot( PrMatrix6 &Jdot, const PrVector6& dq );

/*
 * Function: pumaGetGravitySymbolic
 * Usage:    pumaGetGravitySymbolic()
 *
 * returns the gravity vector
 */
void eomGetGravity(PrVector6 &G);

/*
 * Function: pumaGetJSIMSymbolic
 * Usage:    pumaGetJSIMSymbolic()
 *
 * returns the joint space inertia matrix
 */
void eomGetJSIM(PrMatrix6 &M); 

}

#endif // eompuma.h
