You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Description: In some applications, as opposed to having a URDF file, one has the URDF as a string. it would be helpful to have a URDF.load_from_string method to handle such scenarios.
Sample Use Case: A common use case with MoveIt2 is to have the robot model as a xacro file, then convert the xacro file to a URDF string, and then pass that string as a parameter to move_group node. As a result, one can easily get the URDF string by calling the get parameter service. However, yourdfpy does not provide a way to load that string.
Workaround: I have currently worked around this with by adding the following code to my class. However, it is non-ideal because we are accessing a private member of the URDF class outside of the class. So it would be better to add the capability to the library itself.
from lxml import etree
from yourdfpy import URDF
parser = etree.XMLParser(remove_blank_text=True)
xml_root = etree.fromstring(urdf_str, parser=parser)
model = URDF(robot=URDF._parse_robot(xml_element=xml_root))
The text was updated successfully, but these errors were encountered:
Description: In some applications, as opposed to having a URDF file, one has the URDF as a string. it would be helpful to have a
URDF.load_from_string
method to handle such scenarios.Sample Use Case: A common use case with
MoveIt2
is to have the robot model as axacro
file, then convert the xacro file to a URDF string, and then pass that string as a parameter to move_group node. As a result, one can easily get the URDF string by calling the get parameter service. However,yourdfpy
does not provide a way to load that string.Workaround: I have currently worked around this with by adding the following code to my class. However, it is non-ideal because we are accessing a private member of the URDF class outside of the class. So it would be better to add the capability to the library itself.
The text was updated successfully, but these errors were encountered: