URDF Import: handle multiple <visual> tags

Requests or suggestions for new features
Post Reply
Gregwar
Posts: 4
Joined: 21 Jan 2015, 15:44

URDF Import: handle multiple <visual> tags

Post 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!

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: URDF Import: handle multiple <visual> tags

Post 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

Gregwar
Posts: 4
Joined: 21 Jan 2015, 15:44

Re: URDF Import: handle multiple <visual> tags

Post by Gregwar »

Ok

Will my workaround works with dynamics?

Gregwar
Posts: 4
Joined: 21 Jan 2015, 15:44

Re: URDF Import: handle multiple <visual> tags

Post 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

Gregwar
Posts: 4
Joined: 21 Jan 2015, 15:44

Re: URDF Import: handle multiple <visual> tags

Post by Gregwar »

My changes are currently bugging with collisions, I am fixing that

peci1
Posts: 11
Joined: 14 Apr 2015, 17:09

Re: URDF Import: handle multiple <visual> tags

Post 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.

coppelia
Site Admin
Posts: 10339
Joined: 14 Dec 2012, 00:25

Re: URDF Import: handle multiple <visual> tags

Post by coppelia »

Thanks a lot Martin,

your modifications have been integrated.

Cheers

Post Reply