Giter Site home page Giter Site logo

URDF to VRML conversion is broken about simtrans HOT 3 OPEN

haudren avatar haudren commented on September 13, 2024
URDF to VRML conversion is broken

from simtrans.

Comments (3)

yosuke avatar yosuke commented on September 13, 2024

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.

$ gz sdf -p test.urdf
<sdf version='1.5'>
  <model name='test'/>
</sdf>

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.

from simtrans.

haudren avatar haudren commented on September 13, 2024

Hello,

I found this on the gazebo page:

An element within each element must be properly specified and configured.
This is why the sdf conversion fails spectacularly.

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:

  • Add file support
  • Make the logger.debug('resolveFile unresolved[...]') a warning instead.

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.

from simtrans.

yosuke avatar yosuke commented on September 13, 2024

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.

from simtrans.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.