I am starting to work on the LBR iiwa R820 and I want to monitor the robot state (obtain position,torques values ... etc) through a client PC (connected to robot controller via KLI).
To do so used the Java FRI SDK given by Kuka, and used their own example application. The example itself works fine, but when I try to monitor the state, things get messy, and I constantly get the "NullPointerException" error message whenever I try to use LBRState.getMeasuredTorque() method. Which tells me that something needs initialization ? but in the documentation they don't say anything about initialization !
Maybe I just made a newbie mistake and the solution is obvious, but I'm stuck here for a few days now and I have a deadline closing in so any help from you would be so much appreciated !
Here is the part of code that I added to the LBRTorqueSineOverlayApp example application :
LBRState state = new LBRState();
double MsrTorques = new double[LBRState.NUMBER_OF_JOINTS];
MsrTorques = state.getMeasuredTorque();
And this is the error message :
Exception in thread "main" java.lang.NullPointerException
Thank you for your help,