Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5

Etract joint values from Post Temp file

#1
Dear All,

RoboDK will generate a temp file and input it into the postprocessor to generate codes. The temp file I posted as follows.
Code:
# RoboDK Python Intermediate file to generate robot programs.
# Program name: Path2
# This file requires the post processor:
#   Autonox_NC
# to generate your robot program.
# This is a temporary file and you can delete it once you have generated your program.
#
# Post processor documentation: https://robodk.com/doc/en/PythonAPI/postprocessor.html

import sys
import os
import robodk
sys.path.append(os.path.abspath(r"""D:/Programs/RoboDK/Posts/""")) # temporarily add path to POSTS folder

from Autonox_NC import *

try:
  from robodk.robomath import PosePP as p
except:
  # This will be removed in future versions of RoboDK
  from robodk import PosePP as p


print('Total instructions: 11')
r = RobotPost(r"""Autonox_NC""",r"""autonox articc6-2267-30kg (AT_00006-SE01)""",6, axes_type=['R','R','R','R','R','R'], native_name=r"""""", ip_com=r"""127.0.0.1""", api_port=20500, prog_ptr=1593285040880, robot_ptr=1593078268096)

r.ProgStart(r"""Path2""")
r.RunMessage(r"""Program generated by RoboDK v5.8.0 for autonox articc6-2267-30kg (AT_00006-SE01) on 20/06/2025 11:26:15""",True)
r.RunMessage(r"""Using nominal kinematics.""",True)
r.setZoneData(1.000)
r.setSpeed(1000.000)
r.setFrame(p(0,-1000,100,0,0,0),3,r"""Frame 3""")
r.setTool(p(110,0,255,0,90,0),-1,r"""Bohrer""")
r.RunMessage(r"""Show Bohrer""",True)
r.MoveJ(None,[-113.362,4.32188,122.237,90.7399,111.048,-97.1965],None)
r.MoveL(p(-48.0852,-83.2859,41.5625,173.413,12.921,152.688),[-113.081,4.73996,127.053,88.9142,110.814,-102.8],[0,0,0])
r.setSpeed(50.000)
r.MoveL(p(-40.3285,-87.306,41.5625,174.315,10.7025,151.806),[-112.481,4.55834,126.303,87.2426,109.648,-101.561],[0,0,0])
r.MoveL(p(-27.3602,-92.1963,41.5625,176.019,7.14937,150.787),[-111.447,4.25156,125.125,84.4046,108.008,-99.9518],[0,0,0])
r.MoveL(p(-13.8236,-95.1716,41.5625,177.953,3.57776,150.194),[-110.332,3.88234,124.018,81.4124,106.584,-98.7727],[0,0,0])
r.MoveL(p(0,-96.1703,41.5625,-180,0,150),[-109.161,3.40138,123.041,78.3378,105.31,-98.015],[0,0,0])
r.MoveL(p(8.72754,-95.7735,41.5625,-178.703,-2.25441,150.077),[-108.406,3.01826,122.517,76.3873,104.553,-97.7504],[0,0,0])
r.MoveL(p(22.4035,-93.5244,41.5625,-176.714,-5.82927,150.52),[-107.197,2.24762,121.871,73.3136,103.37,-97.6625],[0,0,0])
r.MoveL(p(35.6142,-89.3329,41.5625,-174.911,-9.39133,151.377),[-106.002,1.23645,121.494,70.3198,102.148,-97.9745],[0,0,0])
r.MoveL(p(48.0852,-83.2859,41.5625,-173.413,-12.921,152.688),[-104.85,-0.0578172,121.43,67.4696,100.821,-98.6774],[0,0,0])
r.setSpeed(1000.000)
r.MoveL(p(73.0852,-126.587,128.165,-173.413,-12.921,152.688),[-103.236,-0.0627435,116.644,69.2238,101.276,-93.6097],[0,0,0])
r.ProgFinish(r"""Path2""")
r.ProgSave(r"""C:/Users/garri/Documents/RoboDK/Programs/""",r"""Path2""",False,r"""D:/Programs/RoboDK/Other/VSCodium/VSCodium.exe""")
My question is, is it possible to extract the joint angles from the temp file? For example, this line

 r.MoveL(p(-48.0852,-83.2859,41.5625,173.413,12.921,152.688),[-113.081,4.73996,127.053,88.9142,110.814,-102.8],[0,0,0])

I want to get the values  [-113.081,4.73996,127.053,88.9142,110.814,-102.8] for further calculation in Postprocessor. Is it possible?

Thanks in advance for the help. I really appreciate it.
#2
I recommend you to look at the CSV post processor which will export all parameters in a comma separated values file. It allows you to export the joint values the same way you find them in the pre-processed files. This will also include the target pose and other instruction-specific parameters.
#3
(06-22-2025, 05:06 PM)Albert Wrote: I recommend you to look at the CSV post processor which will export all parameters in a comma separated values file. It allows you to export the joint values the same way you find them in the pre-processed files. This will also include the target pose and other instruction-specific parameters.

Hi Albert,

Deeply thanks for the information, hope you have a nice week!
#4
Thank you for your feedback!
  




Users browsing this thread:
1 Guest(s)