Page 1 of 1

URDF Import: handle multiple <visual> tags

Posted: 21 Jan 2015, 15:55
by Gregwar
Hello,

I am currently trying to export URDF from a custom software to V-REP, and I would like to be able to export links with multiple colored meshes.

However, as specified here: http://wiki.ros.org/urdf/XML/link , a <link> could ba able to contains multiple <visual> tags, that should be handy for this kind of case. Would it be feasible?

I am currently using fixed-jointed links to do this, the robot tree looks really ugly and overkill

Thanks for your work!

Re: URDF Import: handle multiple <visual> tags

Posted: 21 Jan 2015, 18:32
by coppelia
Hello,

the URDF plugin project files are located in programming/v_repExtUrdf. You could try to modify the code, then recompile the plugin.

Cheers

Re: URDF Import: handle multiple <visual> tags

Posted: 21 Jan 2015, 21:53
by Gregwar
Ok

Will my workaround works with dynamics?

Re: URDF Import: handle multiple <visual> tags

Posted: 22 Jan 2015, 17:40
by Gregwar
I've changed the code to handle that.

I've changed link.h, link.cpp & robot.cpp. The strategy is to store the visual elements in a vector and merge it using simGroupShapes if there is multiple tags.

You can have a look at the code+example here: http://gregwar.com/multiple-visuals.tgz
I don't know wether it works good when merged with collisions when link.cpp:435 condition is true

Is there a cleanier way to propose this commit? (Using PR or versionning system)

Image

Re: URDF Import: handle multiple <visual> tags

Posted: 22 Jan 2015, 18:49
by Gregwar
My changes are currently bugging with collisions, I am fixing that

Re: URDF Import: handle multiple <visual> tags

Posted: 15 Apr 2015, 09:21
by peci1
I have fixed it (or at least I think so :) ).

I also added support for multiple <collision> elements, since I use them in my models.

The needed patch is available at https://github.com/peci1/v_repExtUrdf/c ... ster.patch

Coppelia, feel free to integrate these changes into the codebase, I think it'd be of some use for users switching from Gazebo.

Re: URDF Import: handle multiple <visual> tags

Posted: 16 Apr 2015, 08:58
by coppelia
Thanks a lot Martin,

your modifications have been integrated.

Cheers