//==============================================================================
bool cMyCustomDevice::getGripperAngleRad(double& a_angle)
{
    ////////////////////////////////////////////////////////////////////////////
    /*
        STEP 9:
        Here you may implement code which reads the position angle of your
        gripper. The result must be returned in radian.

        If the operation fails return an error code such as C_ERROR for instance.
    */
    ////////////////////////////////////////////////////////////////////////////

    bool result = C_SUCCESS;

    // *** INSERT YOUR CODE HERE, MODIFY CODE BELLOW ACCORDINGLY ***

    // return gripper angle in radian
    a_angle = 0.0;  // a_angle = getGripperAngleInRadianFromMyDevice();

    // estimate gripper velocity
    estimateGripperVelocity(a_angle);

    // exit
    return (result);
}
//===========================================================================
int cHydraDevice::getGripperAngleRad(double& a_angle)
{

    /************************************************************************
        STEP 8:
        Here you may implement code which reads the position angle of your
        gripper. The result must be returned in radian.

        If the operation fails return an error code such as -1 for instance.

    *************************************************************************/
    int error = 0;

    // *** INSERT YOUR CODE HERE, MODIFY CODE BELLOW ACCORDINGLY ***

    // return gripper angle
    sixenseAllControllerData acd;
    sixenseGetAllNewestData( &acd );
    a_angle = acd.controllers[a_deviceNumber].trigger * 3.141592 / 4;

//    std::cout << "hydragrip " << a_angle << std::endl;



    // estimate gripper velocity
    estimateGripperVelocity(a_angle);

    // exit
    return (error);
}
//===========================================================================
int cMyCustomDevice::getGripperAngleRad(double& a_angle)
{
    // temp variables
    int error = 0;

    /************************************************************************
        STEP 8:
        Here you may implement code which reads the position angle of your
        gripper. The result must be returned in radian.

        If the operation fails return an error code.

    *************************************************************************/

    // *** INSERT YOUR CODE HERE, MODIFY CODE BELLOW ACCORDINGLY ***

    // return gripper angle
    a_angle = 0.0;

    // estimate gripper velocity
    estimateGripperVelocity(a_angle);

    // exit
    return (error);
}