Output flange pos relative to world in RSI

  • Hi guys,

    I have RSI more or less working. I can get $POS_ACT which is great, but there doesn't seem to be a way to get the position of the flange or null frame relative to world/robroot? I am trying to make my RSI independent of the selected tool or base to make my life easier. I mean I could maybe calculate it from the axis angles and DH parameters, but surely there's an easier way?



  • AD
  • Thank you! I guess calculating the coordinate transform $BASE:$POS_ACT:INV_POS($TOOL) in the submit interpreter, saving the value in a SEN_PREA thing and reading it from RSI would be a good way to do it? Or would sps not be fast enough?

    Edited once, last by zitron ().

  • I originally wanted to use the TRAFO_ROBFRAME, but it has no option to transform from flange, only tool or TTS? Or are you suggesting something else?

  • That's why you might need TRAFO_USERFRAME. It should work similarly to the Geometric Operator in KRL (disclaimer: I haven't used it myself). But as long as you input the $TOOL dimensions (use SET_PUBLICPAR or a SEN_PREA), it ought to be possible to project backwards to the flange.

  • Oh.. OK. So I can set the TRAFO_USERFRAME object parameters using SET_PUBLICPAR. I'm guessing I would need to pass INV_POS($TOOL) since there is no way to invert TRAFO_USERFRAME. This is probably better since the sps is not real-time. I'll see if this works, thank you!

  • Just a update: IT WORKS :icon_smile:

    In the end all I needed to do was make a function that sends INV_POS($TOOL) XYZ to some $SEN_PREAs, and in RSI send the $SEN_PREAS to a ROBOFRAME that takes tool to robroot, which cancels out the inverse tool pos. I run this function every time the tool is changed, works great. Seems really convoluted just to get the flange pos, but whatever.

    A nice thing is I can also pass any point defined in the flange frame with INV_POS($TOOL):POSWhatever, and out of RSI I get the POSWhatever transformed into robroot frame.

    Thanks for your help. The stuff you can find in this forum is amazing, can't understand why the companies won't officially support this. If the forum goes down, I bet lots of shit will stop working all over the world!

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