Modi1987 / KST-Kuka-Sunrise-Toolbox

A ToolBox for controlling KUKA iiwa robot from matlab:
https://youtu.be/eh5s8PTe5VM
MIT License
164 stars 70 forks source link

Errors during running the KST realTimeImpedence demo #8

Open TianXu1991 opened 4 years ago

TianXu1991 commented 4 years ago

Hi, Dr. Safeea, I’m Tian. After dealing with the previous problems, we run the demos in the KST, which are really wonderful! However, not every demo can be run successfully, such as the ‘KSTclass_Tutorial_realTimeImpedencePlotTorqueFeedBack.m’. Our tool mass is 2.3 kg, the COM is [-8,0,65] mm. The parameters are found in our gripper manual. Firstly, we use these parameters, but some errors appear in the SmartPad and the matlab, which said 'java.lang.IllegalStateException:Load Mass Validation Failed axisTauExtMsr[1] of LBRExtTorque@LBR_iiwa_14_R820_1 is 12.171958888630373 should be less than 10'. The errors are shown below. I have also tried to modify and use different tool parameters in the matlab code, but it does not work. Besides, I also search the solution in Google and Github, but I find no solution to this. In addition, about the KST gamepad demos, we can run them successfully, and we can use the left handle of gamepad to select different axis of iiwa, but we cannot move the joints by using the right handle of gamepad. We really don’t know why. We will appreciate your help very much if you can help us analyze these problems! Especially the impedence control demo! I’m really sorry to disturb you so much and looking forward to your reply. Best regards, Tian Xu. 微信图片_20190919170230

微信图片_20190919170224

Modi1987 commented 4 years ago

Dear Tian:

For the impedance mode issue:

From inside the class SmartServoWithImpedence.java, go to the line if (!ServoMotion.validateForImpedanceMode(_lbr)) And change it to if (!ServoMotion.validateForImpedanceMode(_toolAttachedToLBR)) If it works, tell me so I push the changes into the repository.

For the joyetick issue:

Probably this issue is due to the assignement of the joystick inputs. Conesqeuntly, run the following script from an inside (.m) file in Matlab, close all;clear;clc; instrreset; ID=1; joy=vrjoystick(ID); %% Loop for reading the jpystick while true joyStatus=read(joy); disp(joyStatus); pause(0.1); end At the same time push the jpystick handles then show me the output

Regards

TianXu1991 commented 4 years ago

Hi, Dr. Safeea, For the impedance mode issue: I have changed the code in the SmartServoWithImpedence.java, but unfortunately, the same error still exists. Our tool load data are 3kg and [7.9,7.1,144.4] mm in the Smartpad. The errors message are shown here. Will the frame of the tool affect the impedence validation? I just guess that. 微信图片_20190920104911 微信图片_20190920105520

微信截图_20190920105651

For the joyetick issue: I have run the script that you give, and the output are shown here. 微信图片_20190920105924 微信图片_20190920110228 Thank you for your reply and help all the time very much! Best regards, Tian Xu.

Modi1987 commented 4 years ago

Hi Tian,

Regarding the impedance:

I expeirmented with 3.8 Kg weight at the EEF, and the program worked fine as shown in the video. Probably the problem is due to some safety configuration (Torque Limit). Check torque limits in the "SafetyConfiguration.sconf" file.

Regarding the joystick:

The script "KST_gampade_jointsPosControl.m", utilizes the joyStatus(3) to move the joint at Line 99. From the photo you sent, I notice that the value of joyStatus(3) is almost zero (am not sure whether you are pressing the joystick, or whether matlab is not getting a proper reading from the joyStick). Since the readings are almost zero, probably this is the reason why the robot is not moving. Note that, in the script "KST_gampade_jointsPosControl.m", for the robot to move there shall be a reading at joyStatus(3) simultaneously the reading at joyStatus(2) shall be less than 0.02.

Cheers!