Пример #1
0
    /**
     * Calculates the needed output torques based on forces input and updates each initialized
     * actuator respectively
     *
     * @param	 forces forces that need to be generated
     * @returns   torques that need to be outputted to the physical device
     */
    public float[] Set_device_torques(float[] forces)
    {
        mechanism.TorqueCalculation(forces);
        float[] torques = mechanism.Get_torque();

        for (int i = 0; i < actuatorsActive; i++)
        {
            motors[i].Torque = torques[i];
        }

        return(torques);
    }