how to import custom cad stl file into rvctoolbox

729 views
Skip to first unread message

Dilan Peiris

unread,
May 19, 2018, 7:03:27 PM5/19/18
to Robotics & Machine Vision Toolboxes
hello sir 
im working on  4DOF robot arm using matlab robotics toolbox
https://youtu.be/uvLgmlvh07M
the vedio 
now i want to import my own drew solid works cad drawing put into 
matlab robotics toolbox
it says need plot3d and use stl file of cad model
plz tell me how to do it and is there any example plz give me the link

Peter Corke

unread,
May 19, 2018, 7:49:44 PM5/19/18
to Robotics & Machine Vision Toolboxes
Have a look at the code for plot3d and mdl_puma560.  I don't have a general solution, but looking at this code should give you an idea about how to add your robot model.

omgicantfindaname0o

unread,
Jun 4, 2018, 6:39:34 AM6/4/18
to Robotics & Machine Vision Toolboxes
Hi Dilan,
You have to first set up an .stl-file for each of your links separately. Note that you will probably have to scale the models down by a factor of 1000 (mm as in your CAD-software to m as used in the toolbox). This should be fairly simple using a python script like the one I attached. (note that I am a lousy programmer and comments are in German ;) )

Once you have an .stl-file for each link, you need to put it into a folder in the path rvctools\contrib\arte\robots\ and name the base "Link0.stl", the first moving link "Link1.stl" and so on.
Be careful to name the folder like you name your robot model in MATLAB so that plot3D can find it!

Then you should be able to plot your Robot in 3D.
ScaleSTL.py

Peter Corke

unread,
Jun 17, 2018, 8:08:42 AM6/17/18
to Robotics & Machine Vision Toolboxes
Great advice!  The meshlab program is also useful for this kind of work.  One problem you might face is to do with the origins of the various link models.  It must be consistent with the DH kinematic model, ie. the origin (and orientation) of Link2.stl should be the link 2 coordinate frame.
Reply all
Reply to author
Forward
0 new messages