Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
2-axis mechanism targets have 6 joints
#1
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 ]]
#2
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.
#3
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 ]]
That does not change the behavior. Is there some 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")


Attached Files
.rdk   target-test.rdk (Size: 2.31 KB / Downloads: 14)
  




Users browsing this thread:
1 Guest(s)