-
Notifications
You must be signed in to change notification settings - Fork 14
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
URDF to VRML conversion is broken #47
Comments
Hi, URDFReader previously used read2() function but now use read(). This is because we have recently switched internal data structure to absolute position based from relative position based to gain high compatibility with SDF format. Current function calls "gz sdf" utility command to convert urdf file to sdf and go directly to SDFReader to parse the model. When I used gz sdf command on your data, I got following output.
The urdf model is converted to empty sdf model. This is probably because there is no inertial, visual collision elements defined in your link item. |
Hello, I found this on the gazebo page:
In my opinion, this behaviour is not really flexible, because we have a lot of environments that are described as fixed robots with no dynamic properties (obviously). I guess if SDF compliance is your primary goal it cannot be helped unless the Gazebo people change their mind... On the other hand, as read2() itself is broken, consider adding an exception/deprecation warning or removing it entirely if you have no plans to support it in the future. Finally, I guess having an accessible test suite would be useful in this project. Could you at least update the error message ? Then, the conversion still fails... This is because I used "file://" tags for the visual uri. Those are apparently not supported by resolveFile. Please consider fixing this function:
For file support: if f.count('file://') > 0:
ff = os.path.expanduser(f.replace('file://', ''))
return ff Should do the trick. We could also try to implement more complex strategies but I think the point of file tags is usually for one-time experiments. |
Thanks for the feedback (and sorry for the very late response). Now, some improvements are done. And, yes. We do have a testsuite. https://github.com/fkanehiro/simtrans/blob/master/convertall.sh https://travis-ci.org/fkanehiro/simtrans But the problem is, it only test whether the conversion succeeds, but we have to check the model by our eyes. So this is not perfect obviously, but may be still useful. |
Hello,
I recently tried to export a URDF simple model to a VRML one. As there is no specific release, I installed from master.
However, when using:
I get this error:
There is NO include tag in this model. It is in fact very simple.
I saw that the URDF model was in fact using SRDF (And that required a dependency on Gazebo...). If I use read2() from URDFReader, I get a wrl file, where all transforms are set to identity i.e. all links are in the same place.
It seems that the joints transforms are lost during the calls to:
Both input and output files are here:
https://gist.github.com/haudren/826e297c3cfd9dbdb389
Thanks,
Hervé Audren (JRL)
The text was updated successfully, but these errors were encountered: