I understand that the current value can be obtained from the motor, but how should the torque be calculated? Since torque varies with angular velocity and angular acceleration, calculating it solely from the current seems difficult. How should this be done?
You can also try to fit a linear function to your particular actuator using the graphs that ROBOTIS provides for each particular actuator from the e-manual. See this link