Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Import tool orientation around z-axis form CAM-Software
#1
Hello,
 
it was possible for me to feed roboDK with the machining Data of my CAM software.
I imported the curve with x, y, z, i, j, k and it works.
But I want to add a tool Orientation for every single point of the imported curve.
For our tasks it would be usefull to feed roboDK with a list of x, y, z, i, j, k, rotation_around_z.
 
Is there a way to do this or a workaround?
Thanks in advance.
 
Best Regards
Alex


Attached Files
.rdk   210830.rdk (Size: 630.59 KB / Downloads: 37)
#2
Yes and No,

You can't import rot around Z from an NC file.

You can control the rotation around Z using the Robot Machining Project.

What find of orientation are you looking for?

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


#3
Thank you Jeremy for your fast reply.
I looked up the options in Robot Machining Project.
If I understand it correctly, it's only possible to enter a constant rot(z) or to choose special options like follow path.
Follow path rot(z) can be ok sometimes,
but in my case I am searching for a possibillity to have full control over rot(z) individually for every single curve element.
#4
Still possible, but with more work.

Look for the Excel sheet and video 13-C
https://drive.google.com/drive/folders/1...CCTdy-p7GW

If it works for you I could have a Python macro to help you do it a bit faster.

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,

I tried it out. This works. Thank you.
I Just have to change the degree value of the third rotation (Yellow colored box).
A Python Macro would be nice:
Deleting the double commands and automaticly fill in the Degree-Value provided from txt-list or CSV-List.
Even if I am not customer, because my company has to decide which robot software to pick, maybe it helps other users as well.

Best Regards
Alex
#6
Take a look at this macro. 
It's a step in the right direction. 

Jeremy


Attached Files
.py   Modify_Target_Orientation.py (Size: 1.17 KB / Downloads: 9)
Find useful information about RoboDK and its features by visiting our Online Documentation and by watching tutorials on our Youtube Channel


#7
(09-07-2021, 07:04 PM)Jeremy Wrote: Take a look at this macro. 
It's a step in the right direction. 

Jeremy

Hey Jeremy,

Thank you for your effort.

Your macro prints out the following (and more):

Quote:Comau NS 12-1.85
T MoveJ 1
[[ -0.230, 0.958, -0.171 ],
 [ 0.769, 0.286, 0.572 ],
 [ 0.597, 0.000, -0.803 ]]

[[ -0.230, 0.958, -0.171 ],
 [ 0.769, 0.286, 0.572 ],
 [ 0.597, 0.000, -0.803 ]]

Pose(0.000, 0.000, 0.000,  0.000, 0.000, 0.000):
[[ 1, 0, 0, 0 ],
 [ 0, 1, 0, 0 ],
 [ 0, 0, 1, 0 ],
 [ 0, 0, 0, 1 ]]

Pose(-582.173, 4.540, 930.260,  -144.542, -9.822, -103.470):
[[ -0.230, 0.958, -0.171, -582.173 ],
 [ 0.769, 0.286, 0.572, 4.540 ],
 [ 0.597, 0.000, -0.803, 930.260 ],
 [ 0, 0, 0, 1 ]]

If I understand it correct, I have to fill my data in the new_pose array right?

I also found an existing script in RoboDK with the name "ImportCSV_XYZWPR.py". I changed it a little bit and it seems to work. 

Blessings.
Alex
#8
The script you mentioned is part of our examples in the documentation, available here:
https://robodk.com/doc/en/PythonAPI/exam...ram-xyzwpr

It requires importing the full pose given Euler angles or UVW rotation vector (not ijk vector, which is the tool Z axis and not a full pose constrain).

On the other hand, if you have ijk vector (tool Z axis) you can use the function point_Zaxis_2_pose:
https://robodk.com/doc/en/PythonAPI/robo...xis_2_pose
This will give you a pose, then, you can rotate around Z given your additional parameter.
#9
Thank you for your fast support.
  




Users browsing this thread:
1 Guest(s)