Hi everyone,
as i leanred i have to accept some overshooting/positioning tolerance by using servoj() based movement.
To prevent kind of integrating these errors happening by lining up several script blocks i would like to ‘reset’ them by aligning the tool to the z-axis of the actual feature. Like it’s done with polyscope ‘align’-button, by a script.
Is there a way doing it via script?
Is my method using scripts to assemble a sequence of movements bad- is there a better way?
I had the same problem but now I was able to figure it out.
You need to get the actual tool pose to your feature, you can do this with pose_trans(pose_inv(feature),get target_tcp_pose())
After that you convert your Rotation vectors to RPY, after that you set Rx=180 and Ry=0 and than convert it back to rotation vector and use it in a variable waypoint.