RoboDK Forum
Import tool orientation around z-axis form CAM-Software- Printable Version

+- RoboDK Forum (//m.sinclairbody.com/forum)
+-- Forum: RoboDK (EN) (//m.sinclairbody.com/forum/Forum-RoboDK-EN)
abo血型+——论坛:一般问题ut RoboDK (//m.sinclairbody.com/forum/Forum-General-questions-about-RoboDK)
+--- Thread: Import tool orientation around z-axis form CAM-Software (/Thread-Import-tool-orientation-around-z-axis-form-CAM-Software)



Import tool orientation around z-axis form CAM-Software-AgentMuellermilch-08-30-2021

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


RE: Import tool orientation around z-axis form CAM-Software-Jeremy-08-30-2021

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


RE: Import tool orientation around z-axis form CAM-Software-AgentMuellermilch-08-31-2021

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.


RE: Import tool orientation around z-axis form CAM-Software-Jeremy-08-31-2021

Still possible, but with more work.

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

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

Jeremy


RE: Import tool orientation around z-axis form CAM-Software-AgentMuellermilch-09-01-2021

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


RE: Import tool orientation around z-axis form CAM-Software-Jeremy-09-07-2021

Take a look at this macro.
It's a step in the right direction.

Jeremy


RE: Import tool orientation around z-axis form CAM-Software-AgentMuellermilch-09-10-2021

(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


RE: Import tool orientation around z-axis form CAM-Software-Albert-09-10-2021

The script you mentioned is part of our examples in the documentation, available here:
//m.sinclairbody.com/doc/en/PythonAPI/examples.html#csv-file-to-program-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:
//m.sinclairbody.com/doc/en/PythonAPI/robodk.html#robodk.point_Zaxis_2_pose
This will give you a pose, then, you can rotate around Z given your additional parameter.


RE: Import tool orientation around z-axis form CAM-Software-AgentMuellermilch-09-14-2021

Thank you for your fast support.