3D models from .OBJ, .STL or .URDF

2,284 views
Skip to first unread message

Leonel Rozo

unread,
Apr 11, 2014, 6:57:57 AM4/11/14
to robotics...@googlegroups.com
Hi guys! 

Has anybody ever tried to display the 3D (CAD) models of your robot using the robotic toolbox? Considering that ROS has standardized the things with the URDF files, I would like to know if somebody has done something in this direction. 

Regards!

Peter Corke

unread,
Apr 12, 2014, 7:06:53 PM4/12/14
to robotics...@googlegroups.com, ing.leo...@gmail.com
It's a good question that comes up periodically.  It's certainly way easier to do now with standards like Collada and URDF, than it used to be.

Have a look at


I'm not planning on going this route, but others are welcome to take it.  Currently prototyping a class-based interface to V-REP 


peter

bmou...@gmail.com

unread,
Apr 12, 2014, 11:16:49 PM4/12/14
to robotics...@googlegroups.com, ing.leo...@gmail.com
Yes I've used the toolbox to plot STL files of robots. You can find a function called stlread in the MATLAB File Exchange which does the trick quite well



On Friday, 11 April 2014 20:57:57 UTC+10, Leonel Rozo wrote:

bmou...@gmail.com

unread,
Apr 15, 2014, 7:22:58 PM4/15/14
to robotics...@googlegroups.com
I take that back slightly, I tried using stlread with larger files (~200kb each) than I have been (~10kb), and I ran out of patience with it. It did my small files immediately though

bmou...@gmail.com

unread,
Apr 16, 2014, 12:54:14 AM4/16/14
to robotics...@googlegroups.com, ing.leo...@gmail.com, bmou...@gmail.com
To clarify, stlread only works with binary STL files, cad2mat works with ascii STL files

Peter Corke

unread,
Apr 16, 2014, 7:31:15 AM4/16/14
to robotics...@googlegroups.com, ing.leo...@gmail.com, bmou...@gmail.com
There are some nice STL models of the Puma 560 robot at http://juve.ro/blog/puma

Relevant projects on MATLAB File Exchange:
 - import_stl_fast, some fast code to read ASCII STL files called 
 - cat2matdemo, read and display ASCII STL files, works fine with the Puma models

There's still a bit of work to, for a general solution, in figuring the origins of each component and transforming them all to the right pose.  Certainly doable though.

peter

bmou...@gmail.com

unread,
Apr 16, 2014, 7:44:08 PM4/16/14
to robotics...@googlegroups.com
It's not hard - certainly doable, yesterday I wrote a function to plot STL files for SerialLink objects. It works alright but needs some polishing before its released.
The most logical and easily integratable thing to do is to have the files in their own local co-ordinate frame from its DH parameters. The STL files from ARTE seem to follow this, I've successfully married its link files with the example SerialLink object for the puma 560.

Bryan Moutrie

unread,
Apr 17, 2014, 3:33:47 AM4/17/14
to robotics...@googlegroups.com
I've attached my rough code, run runme and it will explain some things about it
plotSTL.zip

Wang Yuchi

unread,
Apr 17, 2014, 10:33:47 AM4/17/14
to robotics...@googlegroups.com
That is interesting. But there are files missing perhaps. The error message is showed below.


Bryan Moutrie

unread,
Apr 17, 2014, 10:12:53 PM4/17/14
to robotics...@googlegroups.com
Have you properly extracted all the files and added them to your MATLAB directory?
If you ran runme and then just clicked on the "add to path" option when prompted, then the subfolder containing the STL files wouldn't be on the path I'd imagine

Bryan

Wang Yuchi

unread,
Apr 17, 2014, 11:11:47 PM4/17/14
to robotics...@googlegroups.com
See it. Thank you! It's really a wonderful group.

Peter Corke

unread,
Apr 20, 2014, 7:19:16 AM4/20/14
to robotics...@googlegroups.com
Bryan,

thanks for this.  It inspired me to finally add this to RTB.  Here's what it looks like for the Puma 560.

If you want to have a play you'll need to:

-  replace the whole SerialLink folder from svn
- replace mdl_puma560.m
-  download ARTE and place it in rvctools/contrib/arte, and add an empty file called arte.m in that same folder

Comments welcome.  This'll come out in RTB 9.9 which I'm just polishing at the moment.

peter
Reply all
Reply to author
Forward
0 new messages