Yes! I see what you mean. Good idea indeed...
Next week let's test it and report...
Have a nice w/e!
EDIT 21-11-2016. Yes, confirmed! Just tested. Your idea is fine.
handGuiding motion works perfectly with the Async variant too.
Yes! I see what you mean. Good idea indeed...
Next week let's test it and report...
Have a nice w/e!
EDIT 21-11-2016. Yes, confirmed! Just tested. Your idea is fine.
handGuiding motion works perfectly with the Async variant too.
No. I am not sure why you are trying to use the moveAsynch, since there is no reference about in the docs. In my understanding, handGuiding() should be a "blocking" statement, with activation and de-activation controlled only by means of the X11 switch and the ESM mechanism. Regarding the handGuiding implementation, based on the release notes provided by Kuka in the readme docs, things improved significantly from the version 1.7 to the version 1.11 (and it is more or less obvious to me that the feature is subject to further modifications in the next versions...). For the SunriseOS version 1.7, the manual states this (it is fundamental to import the library as static
For the SunriseOS version 1.11, the segment of code of my previous post should work as is:
This is the single change depending on the OS version in the code snipplet above, imho...
Cheers,
gv
Yes sure...
This segment of code (coming from the Kuka-Germany Support team) needs just minimum adaptations. Together with the reading of the posts from Alex in this thread should be exaustive and self explaining...
Cheers,
gv
package application;
import static com.kuka.roboticsAPI.motionModel.HRCMotions.*;
import com.kuka.roboticsAPI.applicationModel.RoboticsAPIApplication;
import com.kuka.roboticsAPI.applicationModel.tasks.RoboticsAPITask;
import com.kuka.roboticsAPI.controllerModel.Controller;
import com.kuka.roboticsAPI.deviceModel.LBR;
import com.kuka.roboticsAPI.requestModel.GetAlphaAngleRequest;
/**
* Implementation of a robot application.
*
* The application provides a RoboticsAPITask#initialize() and a RoboticsAPITask#run() method, which
* will be called successively in the application lifecycle. The application will terminate automatically after the
* RoboticsAPITask#run() method has finished or after stopping the task. The RoboticsAPITask#dispose()
* method will be called, even if an exception is thrown during initialization or run.
*
* It is imperative to call super.dispose() when overriding the RoboticsAPITask#dispose()
* method.
*
* @see #initialize()
* @see #run()
* @see #dispose()
*/
public class Handguiding extends RoboticsAPIApplication
{
private Controller kuka;
private LBR lbr;
@Override
public void initialize()
{
kuka = getController("KUKA_Sunrise_Cabinet_1");
lbr = (LBR) getDevice(kuka, "LBR_iiwa_14_R820_1");
}
@Override
public void run()
{
lbr.setESMState("2");
getLogger().info("Now HandGuiding");
lbr.move(handGuiding());
lbr.setESMState("1");
getLogger().info("Now ESM1");
}
/**
* Auto-generated method stub. Do not modify the contents of this method.
*/
public static void main(String[] args)
{
Handguiding app = new Handguiding();
app.runApplication();
}
@Override
public void dispose()
{
lbr.setESMState("1");
super.dispose();
}
}
Display More
Thanks, kr16_2, I fully understand what you mean. I used the positionHold in other applications and I am 100% happy with it. In that case everything is clear and the position holding is easily controlled by mean of some conditions. Unfortunately it seems that the handGuiding() method does not accept any conditions, based on what I see...
It's a totally new domain to explore, for me, so far...
I really need some hints to get out from the handGuiding()...
Maybe it is necessary to configure the CIB_5 input of the X11 interface as an enabling button in WorkVisual?
It seems redundant, since apparently the mechanism of the ESM states is working OK (I mean that I can hand guide the iiwa), but I have no ideas on how to resume the application, once it is looping inside of the handGuiding() operations... Grrr...
EDIT. OK!!!! Problem solved! Fiuuuu... Apparently, this flag makes everyting working (IN AUTOMATC mode):
StationSetup.cat --> Configuration --> Handguiding Support --> Enable Handguiding in automatic mode --> false
It is totally counter-intuitive, but it works!!!
In the manual it is written, infact, to set it this way, but the statement was apparently so silly that I was almost sure it was a typo...
Well, I am finally happy about handGuiding with X11...
Thanks to everybody (especially to Alex)!!!
Ha... I see...
This behaviur seems logical indeed. The handGuiding() activation, configured by using EMS states monitoring, implies a safety violation, so the application should be manually resumed after the restoring of the safety conditions...
Ok. Alex, thanks again, then... No other issues from my side...
EDIT - I have spoken too early... It seems that the effect of pressing the run button, in my setup, is not resuming the application: I am still unable to reach the program statement after the handGuiding()... Grrr...
I have a background thread where I can change the ESM state and make other actions, if needed, but I don't know how to stop the running handGuiding activity...
Cheers,
gv
Hi Alex! Thanks a lot for your contributions.
Today we made relevant progresses and I was able to hand guide my LBR iiwa:
1. the wirings of my X11 port, as showed in my previous post, are OK. I mean the contacts of the safety switch used to enable the handGuiding() motion should be normally opened. When the contact close, the robot can be hand guided. It is necessary (for some unknown reason) to "click" twice on the enabling switch, but this is not an issue;
2. Also the mechanism and the configuration of the event driven states is OK, as showed in my previous post;
3. All of my troubles derived (hem... currently derive) by the fact that when I run the application (using it in AUTOMATIC mode only - it's OK for me to live with this limitation) I can reach this statement:
but not this one:
I mean, when I enter the handGuiding() function, the opening and closing of the CIB_5 contacts allow just to stop and to restart the hand guiding. But I found no way to get out of the handGuiding() motion!!!
I thought the solution for this issue could have been to use a breakWhen condition in the robot motion, depending on the logical level of the CIB_5 input, but this is not feasible! Not supported by the handGuiding method!
Any ideas?
napol1. Hem... I think you have reported earlier on the same behaviour in your rig... May I ask how did you manage to solve the issue?
Cheers,
gv
Quote
Could you post the test program you are using in code?
Yes. See it in 1st the attachment. Please note that:
1. No errors, no warnings in the java code;
2. The isse is not at the programming level; it is at an higher level (safety configuration?);
3. I mean I can not even reach the condition to launch the program, since in mode T1, in the smart PAD, the rectangle panel with "Motion enabling" is grayed out and the motion is disabled, So, I can not jog the robot, I can not launch the applications, etc.
4. I can get again the control of the iiwa, if I remove the ESM states 1 and 2. But without the new ESM states I can not use the HG mode...
Quote
Also, what errors are you getting once the handGuiding motion is called?
The related deepening is in the point 3 above. I hope I described it with sufficient detail; again I can not arrive at the point of calling the handGuiding motion... I can not even launch the application...
Quote
Could you also post a picture or describe the pin allocation you have on your X11 port?
Yes. Sure... See it in the 2nd attachment.
Quote
You may just have to trigger the handGuiding switch a few times with pauses in between until the play button illuminates on the smartPAD. The switch I use is very finicky, and it tends to require a few presses before a signal will be transmitted.
That was a very good suggestion. Thanks. I tried it repeatedly this morning. The play button does not illuminate in the smartPAD...
kr16_2. Thanks. I hope the 2nd attachment, with the wirings of my X11 port, clarifies what I meant... I just wanted to say that also one external safety button is wired to the X11 connector, in addition to the HG enabling switches...
napol1. Exactement.
EDIT 15-11-2016. Idea... Hem, well, may I ask if the contacts of the CIB5 input channels should be normally closed or normally open? I mean, the intended behaviour, when the Hand Guiding push button is pressed is that the contacts to become opened or closed? Currently they are normally opened (see attachment on the X11 port). Tomorrow morning I will change the configuration and report...
Ok. I am in a corner...
After one day of testing, in the attempt to make my LBR iiwa working in HandGuiding mode, I have no other cues... Really I am very convinced I am very close to get it working, and I am quite sure my issues depend on some ill configuregured option in my safety conf, but I have no idea so far about what to do to get it working...
Today I added and configured also one external safety push button in my rig. Channel 1 of the X11 interface... It works, but it is not making any difference...
Basically what happens is as follow: if I remove the last two ESM states (see attached pictures), the LBR iiwa works OK, and the motion jogging is enabled in the smart PAD. Obviously, in this condition, without these two new states, as soon at the java code call the handGuiding motion, a stopping error is produced.
As soon as I introduce even the first one of the two ESM states in the safety configuration, whatever motion is disabled in the smart PAD... No way to jog in T1, no way to run the program in AUTO.
I hope what I tried to describe is sufficiently clear; I would be really grateful if some more experienced user can assist in the nailing of the problem.
Attached pictures show my safety conf...
Yes, thanks Alexander!
Infact I agree... I bumped this thread instead of the other on the LBR iiwa Hand Guiding after the full reading (hem... two or three times ) of the other one. I posted here just because of the very specific issue I got (robot motion disabled and totally greyed out in the Smart Pad). After thinking and thinking I am in favour of this explaination: we do not have a main safety push button in our laboratory rig! It has been always sufficient, until now, to have the safety emergency stop function implemented by means of the Smart PAD safety button. But after enabling the Hand Guiding in the sw installation packages of the station configuration, and after introducing new ESMs, it seems that an external safety push button is mandatory. At least this is my conclusion after reading the whole safety section of the Sunrise Workbench documentation. In the next week I will do some further testing and report (maybe in the right thread!).
Yes, also, the ESMs are well configured and the sw is 100% OK. I am pretty sure I am very - very close to see my LBR moving in Hand Guiding mode, but until today I did not succeed...
Cheers,
gv
EDIT 14/11/2016. Bad news... Continuing the related reporting of the issue in the LBR iiwa HandGuiding thread...
Hi Alexander, apparently it seems we have here exactely the same issue. In the attempt to use HandGuiding with our LBR iiwa 820-14, with a media flange pneumatic I/O and a custom made 2 way enabling switch connected to the channel 5 of the X11 connector in the cabinet, as soon as we introduce a new ESM, the robot motion becomes disabled...
What did you do to create a new ESM, for hand guiding the LBR iiwa, but avoiding to get disabled the robot motion?
Thanks in advance!
Cheers,
gv