AutodeskRoboticsLab / Mimic

An open-source Maya plugin for controlling Industrial Robots. Written in Python 3.
https://www.mimicformaya.com/
172 stars 39 forks source link

Add Universal Robots non-time-based and time-based post processors #44

Open aatb-ch opened 9 months ago

aatb-ch commented 9 months ago

This PR adds support for Universal Robots post processors in Mimic, in 2 versions:

This branch depends on #43 to work properly, so #43 should be reviewed and merged first to master.

The exported script files can be imported on the Teachpendant of the robot in a Script Code node. On CB-series robots, the maximum line number before getting unstable is a few thousand lines, on e-series more like 10-15k lines. This allows multiple minutes of time-based animation to run smoothly.

I am still testing and validating the output scripts on real robots so it's not 100% ready but as soon as I'm done testing I'll enable merging.

aatb-ch commented 9 months ago

So I could test further generated code today and can confirm that it works really well for non-linear non-time-based and time-based export, as well digital outputs work fine.

Linear export is good regarding position but seems off for rotation so I'm exploring that part, might be the rotation matrix which is copied from ABB right now to convert the pose.

Also when using "Sample keyframe only" it works fine for motion but digital output is not taken into account.

aatb-ch commented 9 months ago

so i'm getting really close to having it done, just figuring out the proper rotation matrix for UR and should be good to go, working nicely for non-linear stuff, i've made changes to the "sample keyframes only" logic so that it will grab any frame where target_CTRL or tool_CTRL have any attribute keyed, this means if you're quickly animating without mimic gui and setting keyframes directly with shortcuts and only on specific translate/rotate attributes it will still pick up the frames.