Robots in Architecture Forum

KUKA|prc - parametric robot control for Grasshopper => Support => Topic started by: Jesakp on October 17, 2022, 12:11:29 PM

Title: Wrong orientation of robot
Post by: Jesakp on October 17, 2022, 12:11:29 PM
Hello Johannes,

I have created a simulation for the Kuka robot to follow a simple path, and in the simulation, all seems to go well. However, when running the src file on the physical robot the orientation of the robot arm is wrong. It seems as though it uses the z-axis as the tool axis instead. I have had a look at your previous post https://forum.robotsinarchitecture.org/index.php/topic,115.0.html (https://forum.robotsinarchitecture.org/index.php/topic,115.0.html) and my custom tool has been placed correctly(I have attached two pictures, one of the simulation and the other of the real world for further clarification). Might there be something that I am overlooking? and if so could you please offer any possible solutions to this?
Title: Re: Wrong orientation of robot
Post by: Johannes @ Robots in Architecture on October 17, 2022, 04:07:35 PM
Hello,

When you set up the values for the Custom Tool component, did you choose the same values as on the robot, or choose values that seemed to look right?
My guess is that your tool was calibrated with another tool axis in mind - KUKA|prc has got a slightly strange standard there that can be confusing, we are aware of that...
From looking at your screenshot I would expect the tool to be something like 0,0,300,0,-90,0 in KUKA|prc

But no matter what tool axis is used, if you enter the same values on the physical and simulated robot, the movement should be identical. The tool axis only defines how the Grasshopper plane is interpreted, it does not change the internal robot logic and you do not need to "change a toolaxis" in the code or so.

I would recommend:
Check if the values are identical.
If not, choose a set of values and go with that one - you will then either have to change the physical robot's ABC values via "Numeric Input" on the smartPad, or alternatively you need to setup your planes in Grasshopper differently. Most likely Deconstruct Plan followed by a Construct Plane where you use Z for X and Y for Y should do the trick.

Please let me know if that solves it. If you are really getting a different simulation with identical XYZABC values for tool and base, please send me the file!

Best,
Johannes
Title: Re: Wrong orientation of robot
Post by: Jesakp on October 17, 2022, 05:11:35 PM
The problem has been solved. I had to match the ABC's of the custom tool and the robot, and also adjust the plane angle of the plane of my path in grasshopper.

Thanks! :)
Title: Re: Wrong orientation of robot
Post by: Johannes @ Robots in Architecture on October 17, 2022, 06:04:08 PM
Awesome, thanks for the update! If you aren't using the gripper for another software, I'd change the values there instead. But either approach is equally good and correct.
One more comment: Your gripper mesh seems very high-detail, I'd recommend to mesh it, join the mesh and then use ReduceMesh to get it down to 5000 vertices or so. That will improve performance a lot.

Best,
Johannes