-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problems in loading stickbot with urdf parser py #49
Comments
I saw that even forcing the version of urdf parser py does not change the outcome, see https://github.com/CarlottaSartore/ADAM/actions/runs/6783418213. And the version is equal if the package is downloaded with |
C.C. @traversaro @Nicogene |
|
In my computer I have installed |
Looking to the output here, the only error I see a lot of:
I can't find the error that you mentioned in the original post. |
I am able to replicate the error, the difference as @traversaro said is in using
|
Sorry, wrong CI, I was talking about this https://github.com/CarlottaSartore/ADAM/actions/runs/6783316462/job/18437290808#step:7:964 |
I was able to replicate the problem just with urdfdom-py:
fails with:
mamba list:
|
I think it is a problem in urdf_parser_py and/or adam, but anyhow just removing |
I opened the issue upstream in ros/urdf_parser_py#82, while I guess to solve the issue in our models we can just get rid of |
Yes I think also that removing
should be enough (also because generally in icub-models we do not have it), the only problem is that this entry is automatically generated when saving the urdf file e.g.
Am I right ? @Nicogene |
Argh, so this is a urdfpy/urchin (see https://github.com/fishbotics/urchin/blob/5a8068a9c6f4c0d43a57d6bdb4c9be52d9fd0549/urchin/urdf.py#L3714) + urdf_parser_py combined bug, great. |
Probably a quick fix on our side (i.e. |
I have not memory of this, I know that the stickbot has been created by hand by @AlexAntn and @GrmanRodriguez, but I don't know |
No, the encoding is happening inside the urdfpy/urchin at the line https://github.com/fishbotics/urchin/blob/5a8068a9c6f4c0d43a57d6bdb4c9be52d9fd0549/urchin/urdf.py#L3714 . Another possible option is that adam removes the encoding line (or directly all the xml declaration line). That probably make also more sense as the bugged library (urdf_parser_py) is used on the adam side, so it make sense that the workaround is on that side. |
Done in CarlottaSartore/ADAM@5bec824, now the CI passes. What do we want to do with this issue then? |
I think we can close it. An XML file that starts with |
Closing this issue then! Thanks everybody ! |
I am having issues in loading the stickbot urdf in urdf parser py, due to the declaration of XML encoding
ergocub-gazebo-simulations/models/stickBot/model.urdf
Line 1 in 1179630
see attached log:
Errort
___ ERROR collecting tests/parametric/test_NumPy_computations_parametric.py ____ ../../../micromamba/envs/adamdev/lib/python3.11/site-packages/_pytest/runner.py:341: in from_call result: Optional[TResult] = func() ../../../micromamba/envs/adamdev/lib/python3.11/site-packages/_pytest/runner.py:372: in call = CallInfo.from_call(lambda: list(collector.collect()), "collect") ../../../micromamba/envs/adamdev/lib/python3.11/site-packages/_pytest/python.py:531: in collect self._inject_setup_module_fixture() ../../../micromamba/envs/adamdev/lib/python3.11/site-packages/_pytest/python.py:545: in _inject_setup_module_fixture self.obj, ("setUpModule", "setup_module") ../../../micromamba/envs/adamdev/lib/python3.11/site-packages/_pytest/python.py:310: in obj self._obj = obj = self._getobj() ../../../micromamba/envs/adamdev/lib/python3.11/site-packages/_pytest/python.py:528: in _getobj return self._importtestmodule() ../../../micromamba/envs/adamdev/lib/python3.11/site-packages/_pytest/python.py:617: in _importtestmodule mod = import_path(self.path, mode=importmode, root=self.config.rootpath) ../../../micromamba/envs/adamdev/lib/python3.11/site-packages/_pytest/pathlib.py:567: in import_path importlib.import_module(module_name) ../../../micromamba/envs/adamdev/lib/python3.11/importlib/__init__.py:126: in import_module return _bootstrap._gcd_import(name[level:], package, level) :1204: in _gcd_import ??? :1176: in _find_and_load ??? :1147: in _find_and_load_unlocked ??? :690: in _load_unlocked ??? ../../../micromamba/envs/adamdev/lib/python3.11/site-packages/_pytest/assertion/rewrite.py:186: in exec_module exec(co, module.__dict__) tests/parametric/test_NumPy_computations_parametric.py:63: in comp = KinDynComputations(model_path, joints_name_list, root_link) ../../../micromamba/envs/adamdev/lib/python3.11/site-packages/adam/numpy/computations.py:32: in __init__ factory = URDFModelFactory(path=urdfstring, math=math) ../../../micromamba/envs/adamdev/lib/python3.11/site-packages/adam/model/std_factories/std_model.py:24: in __init__ self.urdf_desc = urdf_parser_py.urdf.URDF.from_xml_file(path) ../../../micromamba/envs/adamdev/lib/python3.11/site-packages/urdf_parser_py/xml_reflection/core.py:617: in from_xml_file return cls.from_xml_string(xml_string) ../../../micromamba/envs/adamdev/lib/python3.11/site-packages/urdf_parser_py/xml_reflection/core.py:610: in from_xml_string node = etree.fromstring(xml_string) src/lxml/etree.pyx:3257: in lxml.etree.fromstring ??? src/lxml/parser.pxi:1911: in lxml.etree._parseMemoryDocument ???
This is an output of a CI (see https://github.com/CarlottaSartore/ADAM/actions/runs/6783258175), In my setup it does not happen, I attach here the
conda list
Working Env Conda List
The text was updated successfully, but these errors were encountered: