def find_next_link(root, current_joint, next_link_name):
has_next = False<EOL>next_link = None<EOL>if next_link_name is None:<EOL><INDENT>next_link_name = current_joint.find("<STR_LIT>").attrib["<STR_LIT>"]<EOL><DEDENT>for urdf_link in root.iter("<STR_LIT>"):<EOL><INDENT>if urdf_link.attrib["<STR_LIT:name>"] == next_link_name:<EOL><INDENT>next_link = urdf_link<EOL>has_next = True<EOL><DEDENT><DEDENT>return has_next, next_link<EOL>
Find the next link in the URDF tree

Parameters
----------
root
current_joint: xml.etree.ElementTree
    The current URDF joint
next_link_name: str
    Optional : The name of the next link. If not provided, find it automatically as the first child of the joint.