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

Setting Optimize Turn Table through the API

#1
Dear RoboDK team, 

I have a KR 6-axis with additional 2-axis (turntable). 

I import points for my active tool from a CSV file (cartesian x,y,z) for purpose of machining through a Python API. 

I have realized importing step-curves give benefits of curve normals, which allow the robot as well as the turn table to automatically optimize some of the movements and orientations if the turn-table optimization is selected (ticked) in the curve follow project. 

Is there a way I could activate that in my case? can I set automatically optimize the turn table through the PythonAPI.

Is this the right command? 

MachiningUpdate["TurntableActive"] = 1
robot.setParam("Machining", MachiningUpdate)


Does selecting turntable optimize in the curve follow project also utilizes and optimizes other degrees of freedom of the table, or is it just a turn (yaw)? or also roll and pitch?

Do you have any other suggestions or recommendations as well?

Thanks,
Pradnil Kamble
#2
Did you look at this example:
https://robodk.com/doc/en/PythonAPI/exam...n-settings

Jeremy
Find useful information about RoboDK and its features by visiting our Online Documentation and by watching tutorials on our Youtube Channel


#3
I understood we could set limits, reference and weights to the axes.

But usually in a curve follow project, when we push tick the turntable optimize as shown in the figure below, the turntable is optimized automatically based on the parameters the user defined, the above link defines those parameters.

But how do I puch tick turntable optimize without having a curve follow project or just through a API? 

Or maybe I am not getting it right? could you please elaborate? 

Thank you,
Pradnil


Attached Files Image(s)
   
#4
Hi Pradnil,

Take a look at this example here: https://robodk.com/doc/en/PythonAPI/exam...g-settings
You can access these using a JASON string.
Look for the last few elements of the "MachiningSettings" bloc.

Jeremy
Find useful information about RoboDK and its features by visiting our Online Documentation and by watching tutorials on our Youtube Channel


#5
Hi Jeremy, 

Thank you for your response earlier. I am again in a need to get this right. I followed the Axis Optimization example (Example 6.25.) and seems like nothing changed. However, the status that was printed was "Ok".

To elaborate for clarity. I am employing Python API to move to points (xyzabc) that I fetch from a text file. For the overall movement I iterate through all the points (i.e. len of the txt file). 

Now there are two goals

1. Some points can also be reached with a different oreintation (other than abc embedded in text file) which would be slightly more optimal, for that I wish to employ Axis Optimization at each point. This can also help to automatically optimize the external axis (example a turn-tilt table).

2.  Moving along the points within the txt file while continuously optimizing the future path w.r.t to collision checks

With this post I wish to solve the 1. goal however, if you have any suggestions on the 2. please do write. 

Here is an example code that didn't work. It didnt work as the robot straightaway followed the points within the text file without any automatic optimization of internal or external axis. 

Code:
ToUpdate = {}
ToUpdate["Active"] = 1
json_str = json.dumps(ToUpdate)


for i in range(textfile_len):
...
pose_matrix = KUKA_2_Pose([x, y, z, a , b, c]) # xyzabc are fetched from text file [i]
robot.MoveL(pose_matrix)
stat = robot.setParam("OptimAxes", json_str) # <-- this should activate automatic axis optimization?
print (stat) # --> "Ok"
...
Also I cant check the Axis Optimization checker box within Robot parameters with manual mouse click. Even after Unlock advanced options is checked the Axis Optimization seems unavailable (attached).

Thank you for reading through and helping! I look forward!  

Best regards,
Pradnil


Attached Files Thumbnail(s)
   
#6
Can you share your RoboDK project? (RDK file)

You probably need to synchronize your robot with the external axis: in RoboDK select Utilities-Synchronize External Axes.
  




Users browsing this thread:
1 Guest(s)