Hello! I cannot find any possible way to use
command.
Looks like this interface is implemented but it doesnt have any constructor such as
.
Documentation does not even mention circRel command! I have found it just by trying.
Hello! I cannot find any possible way to use
command.
Looks like this interface is implemented but it doesnt have any constructor such as
.
Documentation does not even mention circRel command! I have found it just by trying.
If you want to use it, you will have to create a CircRel object, then move based off of it. You can use
then use the getters from the new frame to input in the circRel object. Then run a
Wow! Amazing!
How did you find methond
? I do not see it in manual. Which sources do you use?
Could you please provide a simple but complete example of using circRel? I cannot apply your advice in my code.
Firstly,
seems not working for me. What is
here? The only way I made it to compile is
But the constructor
you suggest just doesnt exists. It takes only IMotion object inside.
Hovewer, I have managed to compile the code in such a way that:
Frame f = lbr.getFlange().copyWithRedundancy();
f.setX(50); f.setY(50);
ITransformation trans = f.getTransformationFromParent();
lbr.move(circRel(trans));
But it doesn't work too.
Wow, my bad. That's what happens when you try to give advice after being awake for 66 straight hours and forget to do your research... sorry about the incorrect and unclear statements. Let me try to explain this better:
Firstly, the "copyWithRedundancy()" (typo) command that I explained is a way to copy a frame you have stored in your application data into your code while including transformation information of that frame. In my example, "/Frame" is just the URL of the frame we are trying to copy in application data. If you have a frame named "Frame", that command will make a frame out of it. I use the Javadoc Browser for all of my sources. If you don't already use the Browser, it includes way more information and commands than the manual, and you can learn a lot from it.
This is how it is supposed to work (your way worked since robot.getFlange() is also a frame: the origin point of the flange):
Frame f = getApplicationData().getFrame("/NAME_OF_FRAME").copyWithRedundancy(); // will copy frame including relevant transformation information
You could also just use
I like the prior implementation because you get more information.
For RelativeCIRC motions, my explanation was completely wrong. There are a lot of missing parameters when you construct it the way you construct other types of basic motions, such as linRel or circ. I was under the assumption that it would be constructed similar to the other relative motions, however it is quite a bit different. According to the browser, RelativeCIRC might not be in it's final state and could change in the future. There is only one constructor for it, and it is difficult to understand the application for a RelativeCIRC motion. If you look at the constructor for the sibling class RelativeSPL, there is no way to create a motion from it. I attempted to run this code:
// set up motion
robot.move(ptp(getApplicationData().getFrame("/Calibration")));
Frame f = robot.getCurrentCartesianPosition(robot.getFlange());
f.setX(f.getX()+10);
f.setY(f.getY()+10);
ITransformation trans = f.getTransformationFromParent();
RelativeCIRC motion = new RelativeCIRC(trans);
// see if the motion has any parameters (all return false)
getLogger().info(
"Behavior aux point " + motion.hasBehaviorAuxPoint() +
"\nBehavior target point " + motion.hasBehaviorTargetPoint() +
"\nOrientation system " + motion.hasOrientationReferenceSystem() +
"\nCirc angle " + motion.hasCircAngle() +
"\n");
// set all motion parameters
robot.move(circRel(trans)
.setCircAngle(Math.toRadians(90))
.setBehaviorAuxPoint(CircAuxPointBehavior.Ignore)
.setBehaviorTargetPoint(CircEndPointBehavior.Interpolate)
.setOrientationReferenceSystem(OrientationReferenceSystem.Base)
);
Display More
Even after setting all necessary parameters to valid values, the robot returned the same spline error you were getting. As I said, I probably should have done a bit more research before responding to this question - I didn't expect it to be this involved. I wish I had a better answer for you, but unfortunately I don't. I might ask KUKA about this one, since their inclusion of this command seems a bit confusing, and maybe there is an appropriate way to implement it.
Oh! Thank you a lot for thorough answer!
By the way, two ways I figured out to create some kind of circRel() are
1. User function which uses linear approximation for circles (not sure about speed, but should work nice)
2. User function which converts relative coordinates of circRel to absolute coordinates and calls Circ motion.
I am on the way of implementation of the 1st method. It seems easier for me, though could be not perfect circle.
I use the Javadoc Browser for all of my sources.
By the way, which verstion of RoboticsAPI do you have? Mine is 1.13.0.14.
Sometimes I use Intellij Idea and to go inside a class declaration. It helps a lot.
I am running RoboticsAPI V1.15.0.7 at my lab. I am also on Sunrise Workbench V1.9.1.7.
This is a link to a post explaining how I get to the Javadocs browser (you're probably using the same technique):
https://www.robot-forum.com/robotforum/kuk…93456/#msg93456
I would be interested to see if you are able to get that implementation to work!