RoboDK Forum
请求添加相对移动可打印版本

+- RoboDK Forum (//m.sinclairbody.com/forum)
+-- Forum: RoboDK (EN) (//m.sinclairbody.com/forum/Forum-RoboDK-EN)
+--- Forum: Request new features (//m.sinclairbody.com/forum/Forum-Request-new-features)
+--- Thread: REQUEST TO ADD RELATIVE MOVE (/Thread-REQUEST-TO-ADD-RELATIVE-MOVE)



请求添加相对移动-sig.johnnson-01-12-2023

I would like to request that the "apply relative move" button be exposed to the Python API. Please see screenshot in attachment.

Thanks!


RE: REQUEST TO ADD RELATIVE MOVE-Albert-01-13-2023

This should be simple using the Python API and some math.

For example, the following code applies an offset of [100,200,300] mm along [X,Y,Z] coordinates.
Code:
# Define your relative move as an XYZABC offset
pose_delta = KUKA_2_Pose([100,200,300,0,0,0])

# get the current object pose:
pose = m1.Pose()
new_pose = pose * pose_delta

# update the new pose:
m1.setPose(new_pose)



RE: REQUEST TO ADD RELATIVE MOVE-sig.johnnson-01-13-2023

Thanks, Albert! That works.