Robot doesn't turn correctly in user frame

  • I am trying to make my robot detect a user frame and rotate about the Y-Axis in a certain number of degrees.

    I am using PR to populate the value of the 5th position and apply these changes to the point in my tp program.

    The problem I am facing is that if the frame is created at 45 degree from world it will rotate correctly. However, if the frame is created at 0 degrees, it rotates about the X-axis instead. when checking how the user frame looks, they both looks correct.

    Any ideas please ?

  • Place your Ad here!
  • 95devils

    Approved the thread.
  • So here is the code below, I define a frame and set it in UF:1, and then I am trying to rotate about Y and Z. However, I am getting rotation about X and Z instead, if I change the orientation of the frame I get rotation about Y and Z.

    The rotation is supposed to take place at the TCP point, which is recorded in P[1]

  • Here are a couple of articles that explain what is causing your robot to behave the way that it is.

    How is Orientation in Space Represented with Euler Angles? | Mecademic Robotics
    Learn how orientation in space is represented with Euler angles and understand their importance in defining tool reference frames.

    Understanding Gimbal Lock and how to prevent it

    As you noticed, creating the UFrame at a 45° offset to world gives you the behavior you want. I have no idea what your process or part geometry is, but if it's possible to define your UFrame that way that would be the easiest solution.

  • Definitely sounds like Gimbal lock. A quick fix is to use a tool offset for your rotation.

    Only use the regular offset for x,y,z frame offsets.

    Always use tool offset for w,p,r offsets.

    If you follow that rule then you shouldn't experience Gimbal lock.

    You can apply both a frame and tool offset onto a single motion instruction if needed.

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account
Sign up for a new account in our community. It's easy!
Register a new account
Sign in
Already have an account? Sign in here.
Sign in Now

Advertising from our partners