Traverse to find Link

Hello everyone,
I studied the kinematic settings of the six-axis robot, and I found that its settings mainly depend on the coordinate frame of the Link and the positional relationship between the Link and the parent system. I wanted to try to use a Python script to automatically fill in these values into ArticulatedKinematics2, but while trying I found a small problem. I may not be able to find a vcNode directly like using findBehavioursByType, which means I may have to use finNode and give it a more certain name to search for. My current approach is:
for i in robotcont.Joints:
link = comp.findNode(‘Link_’+str(int(i.Name[1])+1))#When the base also acts as a Link.
But I think this may not be applicable to most six-axis robots, so if it can, can anyone give me some suggestions on how to traverse and find Link?
Thanks in advance for any help! :melting_face:

vcHelpers.Selection is very useful, search vcHelpers.Selection in help document.

from vcScript import * 
from vcHelpers.Selection import * 
 
childNodes = getGivenComponentsNodes(getComponent())
print [childNode.Name for childNode in childNodes]
1 Like

This works great, thanks for your prompt reply! :grinning:

1 Like