1. Home
    1. Dashboard
    2. Search
  2. Forum
    1. Unresolved Threads
    2. Members
      1. Recent Activities
      2. Users Online
      3. Team Members
      4. Search Members
      5. Trophys
  3. Articles
  4. Blog
  5. Videos
  6. Jobs
  7. Shop
    1. Orders
  • Login or register
  • Search
This Thread
  • Everywhere
  • This Thread
  • This Forum
  • Articles
  • Pages
  • Forum
  • Blog Articles
  • Products
  • More Options
  1. Robotforum - Support and discussion community for industrial robots and cobots
  2. Forum
  3. Industrial Robot Support and Discussion Center
  4. Fanuc Robot Forum
Your browser does not support videos RoboDK Software for simulation and programming
Visit our Mainsponsor
IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Sponsored Ads

Touch sensing routine to compute rotation

  • jorgefernandes
  • March 25, 2024 at 12:19 PM
  • Thread is Unresolved
  • jorgefernandes
    Trophies
    1
    Posts
    11
    • March 25, 2024 at 12:19 PM
    • #1

    Hello everyone,

    I hope you're all doing well.

    I'm currently developing a touch-sensing routine for computing the rotation or deviation of a part around the z-axis. Specifically, I'm aiming to implement skip conditions to enhance the accuracy of this routine.

    Here's what I've done so far: I've created a routine that involves touching the part at two predefined points along the y-axis. After obtaining these touch points, I compare them with previously calibrated points.

    From this data, I'm able to calculate the deviation angle of the part. My next step is to utilize a transformation matrix around the z-axis along with this angle to determine the new positions of the previously recorded points.

    However, I'm encountering some challenges in implementing this process effectively. I would greatly appreciate your guidance if anyone has experience or insights into similar touch-sensing routines or transformation matrices.

    I want to apply this computation to an original point:

    Code
    new_x = x * cos(angle) - y * sin(angle)
    new_y = x * sin(angle) + y * cos(angle)
    new_z = z

    But with this approach, I realize that I'll need to modify all the points individually in order to apply the rotation. Is there a way to streamline this process, perhaps by employing a method similar to the one used with offsets to create a rotation offset (pr) that can be applied to all the points I intend to rotate?

    Any assistance or insights you can offer would be immensely helpful.

    Thank you for your time and consideration.

    Have a great day!

  • 95devils March 25, 2024 at 12:21 PM

    Approved the thread.
  • hoitzing
    Reactions Received
    24
    Trophies
    1
    Posts
    128
    • March 25, 2024 at 1:19 PM
    • #2

    When you say rotation about the Z-axis, do you mean the TCP's Z-axis, or around a pre-defined userframe's Z-axis?

    Either way, it sounds like using (tool or regular) offsets, or altering a tool/user frame directly would be what you need.

  • jorgefernandes
    Trophies
    1
    Posts
    11
    • March 25, 2024 at 2:02 PM
    • #3
    Quote from hoitzing

    When you say rotation about the Z-axis, do you mean the TCP's Z-axis, or around a pre-defined userframe's Z-axis?

    Either way, it sounds like using (tool or regular) offsets, or altering a tool/user frame directly would be what you need.

    I am saying rotation around the Z of the world userframe.

    How should I implement your suggestion?

  • hoitzing
    Reactions Received
    24
    Trophies
    1
    Posts
    128
    • March 25, 2024 at 2:49 PM
    • #4

    You have to add the OFFSET PR option as a motion modification for every position that needs to be adjusted so a series of motion commands will look like:

    Code
    PR[n]=LPOS-LPOS
    PR[n,6]=Z_rot_deg
    L P[i] 100mm/sec FINE Offset,PR[n]
    L P[j] 500mm/sec CNT10 Offset,PR[n]
    J P[k] 10% CNT50 Offset,PR[n] 

    (where of course you can change the joint/linear, speed, CNT or add other options if you need those)

    This extra option basically tells the robot that it should move to the position that is taught, but add the offset you define in PR[n]. Since your rotation is about the fixed world frame, you choose the OFFSET,PR modification, and not the TOOL_OFFSET which is used for the TCP tool frame (not a fixed frame).

    The offset is added for the user frame in which the position is defined (so in your case UF:0 = world). This makes it pretty easy to compute the offset values in PR[n]. Since you only want a rotation about the world frame's Z-axis, you first create a position full of zeros (PR[n]=LPOS-LPOS), and you only add a value for index 6 which represents rotation about Z-axis.

    ==============

    Some extra background info: like I said it's also possible to adjust a user frame based on the rotation you want. Say initially your positions are taught in UF[a] (a=0 in your case for world), you could copy UF[a] into UF[b], then rotate UF[b] in opposite direction that your offset needs to be, and then if you interpret all your positions (which are originally taught in UF[a]) as if they're in UF[b], it automatically will offset the robot by the desired offset. However this isn't really useful when you're not using PR for the motion instructions, as manually changing TP program positions from UF[a] to UF[b] is at least as annoying as adding a simple OFFSET,PR motion option. Additionally, I'd refrain from using this method as it can obscure what you're really trying to do, which is offsetting your taught positions.

  • jorgefernandes
    Trophies
    1
    Posts
    11
    • March 25, 2024 at 3:11 PM
    • #5
    Quote from hoitzing

    Thanks a lot for your help. I appreciate it.

    I started by trying something like you have suggested but this did not work. This only rotates the TCP of the robot around Z, but in reality, since my part is rotated, the x,y, and z positions also change.

    I saw this in the Fanuc manual:

    Screenshot-2024-03-25-140126.png

    I want to be able to do something similar, but using skip conditions, to be able to configure the routine to my needs.

    I already computed the angle of deviation of the part, but I do not know how to implement it as PR, because to transform a point, I have to use a transformation matrix (or the code I posted in the first post) and I can't put that into a PR.

  • hoitzing
    Reactions Received
    24
    Trophies
    1
    Posts
    128
    • March 26, 2024 at 8:32 AM
    • #6
    Quote from jorgefernandes

    This only rotates the TCP of the robot around Z, but in reality, since my part is rotated, the x,y, and z positions also change.

    Ah so this means you will need to add a translation that the robot will to be offset. Once you have the X, Y, and Z offset coordinates simply set the respective elements in the offset register (PR[n] in my post above) and the robot will have an additional cartesian offset (as long as the PR is in cartesian representation).

    If you're struggling with the computation of these XYZ offsets, search for the computation of the intersection of two (3D) lines on the internet and I'm sure you'll find a suitable method.

  • jorgefernandes
    Trophies
    1
    Posts
    11
    • March 27, 2024 at 11:46 AM
    • #7
    Quote from hoitzing

    Thanks for your suggestions.

    Have a nice day. :smiling_face:

Advertising from our partners

IRBCAM
Robotics Channel
Robotics Training
Advertise in robotics
Advertise in Robotics
Advertise in Robotics

Job Postings

  • Anyware Robotics is hiring!

    yzhou377 February 23, 2025 at 4:54 AM
  • How to see your Job Posting (search or recruit) here in Robot-Forum.com

    Werner Hampel November 18, 2021 at 3:44 PM
Your browser does not support videos RoboDK Software for simulation and programming

Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Thread Tag Cloud

  • abb
  • Backup
  • calibration
  • Communication
  • CRX
  • DCS
  • dx100
  • dx200
  • error
  • Ethernet
  • Ethernet IP
  • external axis
  • Fanuc
  • help
  • hmi
  • I/O
  • irc5
  • IRVIsion
  • karel
  • kawasaki
  • KRC2
  • KRC4
  • KRC 4
  • KRL
  • KUKA
  • motoman
  • Offset
  • PLC
  • PROFINET
  • Program
  • Programming
  • RAPID
  • robodk
  • roboguide
  • robot
  • robotstudio
  • RSI
  • safety
  • Siemens
  • simulation
  • SPEED
  • staubli
  • tcp
  • TCP/IP
  • teach pendant
  • vision
  • Welding
  • workvisual
  • yaskawa
  • YRC1000

Tags

  • Touch Sensing
  1. Privacy Policy
  2. Legal Notice
Powered by WoltLab Suite™
As a registered Member:
* You will see no Google advertising
* You can translate posts into your local language
* You can ask questions or help the community with your knowledge
* You can thank the authors for their help
* You can receive notifications of replies or new topics on request
* We do not sell your data - we promise

JOIN OUR GREAT ROBOTICS COMMUNITY.
Don’t have an account yet? Register yourself now and be a part of our community!
Register Yourself Lost Password
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on Google Play
Robotforum - Support and discussion community for industrial robots and cobots in the WSC-Connect App on the App Store
Download