Author Topic: Wrong orientation of robot  (Read 179 times)

Jesakp

  • Forum User
  • *
  • Posts: 4
    • View Profile
Wrong orientation of robot
« 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 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?

Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 1361
    • View Profile
    • Robots in Architecture
Re: Wrong orientation of robot
« Reply #1 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

Jesakp

  • Forum User
  • *
  • Posts: 4
    • View Profile
Re: Wrong orientation of robot
« Reply #2 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! :)
« Last Edit: October 17, 2022, 05:17:36 PM by Jesakp »

Johannes @ Robots in Architecture

  • Lead Developer
  • Administrator
  • Forum User
  • *****
  • Posts: 1361
    • View Profile
    • Robots in Architecture
Re: Wrong orientation of robot
« Reply #3 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