RoboDK Forum
2-axis mechanism targets have 6 joints- Printable Version

+- RoboDK Forum (//m.sinclairbody.com/forum)
+-- Forum: RoboDK (EN) (//m.sinclairbody.com/forum/Forum-RoboDK-EN)
+--- Forum: RoboDK bugs (//m.sinclairbody.com/forum/Forum-RoboDK-bugs)
+--- Thread: 2-axis mechanism targets have 6 joints (/Thread-2-axis-mechanism-targets-have-6-joints)



2-axis mechanism targets have 6 joints-hn-cso-01-05-2023

I have a station with some 2-axis mechanisms and some 6-joint robots. After updating to 5.5.3.23011 (macos), calling target.Joints() on a 2-axis mechanism's joint target returns 6 joints instead of 2. Unfortunately I can't reproduce this in a station I can share with you; creating a station with only a 2-axis mechanism (I also tried creating a 6-joint robot), a joint target has the correct two joints.

Code:
>>> target = rdk.Item("L_extender_2")
>>> target.isJointTarget()
True
>>> target.Joints()
Matrix: (6, 1)
[[ 0.000 ],
[ 1020.400 ],
[ 0.000 ],
[ 0.000 ],
[ 0.000 ],
[ 0.000 ]]

>>> target.getLink(robolink.ITEM_TYPE_ROBOT).Joints()
Matrix: (2, 1)
[[ 0.000 ],
[ 1020.400 ]]

>>> target.setJoints([0, 1020.400])
RoboDK item (140344870373904) of type 6
>>> target.Joints()
Matrix: (6, 1)
[[ 0.000 ],
[ 1020.400 ],
[ 0.000 ],
[ 0.000 ],
[ 0.000 ],
[ 0.000 ]]



RE: 2-axis mechanism targets have 6 joints-Albert-01-05-2023

You need to re-teach the target if you associated it to a different robot so it takes the joint values and degrees of freedom of the mechanism it is linked to.


RE: 2-axis mechanism targets have 6 joints-hn-cso-01-06-2023

Code:
>>> target.getLink().MoveJ(target.Joints())
>>> target.getLink().Joints()
Matrix: (2, 1)
[[ 0.000 ],
[ 1020.400 ]]

>>> # target "Teach current position" in GUI
>>> target.Joints()
Matrix: (6, 1)
[[ 0.000 ],
[ 1020.400 ],
[ 0.000 ],
[ 0.000 ],
[ 0.000 ],
[ 0.000 ]]
这并不改变行为。有一些reason re-teaching should work in 5.4.3 but not 5.5.3?

target.setParam("Recalculate") does not work either.

Managed to reproduce: it happens if I create a target for a 6-axis robot and then change the link to a 2-axis mechanism. Please see attached station.

Code:
target = rdk.Item("former robot target")