Import Solidworks robot designs into V-REP (CoppeliaSim)
HTML-код
- Опубликовано: 22 авг 2024
- The animation in Solidworks is not that advanced and sometimes complicated especially when we use robots, so you can use simulator V-REP instead (sorry it is not open source (just free for students)).
This software is very powerful because it can be a C/C++, python, java, Matlab, octave, Lua client.
First step: download the SW2URDF exporter :
wiki.ros.org/sw...
make sure that this software is included in Solidworks
Add-Ins -- SW2URDF
The KUKA KR16 is not included in the educational version of V-REP, You can download our URDF and v-rep scene from this link :
drive.google.c...
⚠️ 𝙉𝙤𝙩𝙚𝙨 :
♜If you want to get the real axis origins and values in vrep, it is recommended:
-to mate the robot to its origin position before saving the URDF file in Solidworks
-to mate the robot base with Standard Planes (Front, Top, and Right plane) so that it will be well oriented in the v-rep scene.
♜The other method of importing a Solidworks models is:
1- save all its parts as ".stl" files
2-on vrep go to :File-import-Mesh.. and import all the parts
3- create all joints (Add -joint-revolute ) according to the robot documentation.
It is a time-consuming method, however, it allows you to get the exact robot axis positions and directions.
♜ if you want to get different colors of the servos you can link it with a "fixed" relationship (gathering it in the same "link components 1:25" will give it a unique color).
♜ Importing a CAD file is only 50% of the job. After that, you need to adjust the robot parameters (joints limitations, max speed ...)
♜ If you want to optimize your Lua code you can rename all joints with the same name+number (eg:joint1, joint2, joint3....) and set the handle function in a "for" loop :
𝘧𝘰𝘳 𝘪=1,6,1 𝘥𝘰
𝘫𝘰𝘪𝘯𝘵𝘏𝘢𝘯𝘥𝘭𝘦𝘴[𝘪]=𝘴𝘪𝘮.𝘨𝘦𝘵𝘖𝘣𝘫𝘦𝘤𝘵𝘏𝘢𝘯𝘥𝘭𝘦('𝘫𝘰𝘪𝘯𝘵'..𝘪)
𝘦𝘯𝘥
⚠️𝑪𝒐𝒎𝒎𝒐𝒏 𝒗𝒊𝒆𝒘𝒆𝒓𝒔 𝒑𝒓𝒐𝒃𝒍𝒆𝒎𝒔 :
♜ I didn't get the right size of the imported STL file:
I think this is because of the parameters of Solidworks. For example, in CoppeliaSim, to get the right size of an STL file you need to save it in the Meters unit (save as proprieties: unit: meters):
drive.google.c...
***
♜ Please note that this is a personal CAD file and it's note provided by KUKA:
• Solidworks KUKA KR-16 ...
♜Acapella song: Imagine Dragons - On Top of the World - Peter Hollens & Mike Tompkins
• Imagine Dragons - On T...
📛 Our Facebook page :
/ mechatronics-ninja-160...
Your video is actually better than lots go vrep tutorials out there...it was a big help...thank you
This is exactly what i was looking for, thanks bro.
If anyone is looking into comment threads,
* you may mess with colors.
*if you do not find "export urdf" under file menu, check under tools. You will find at the bottom of tools menu I hope.
*use export with mesh
*while importing to vrep wait untill you get "import finished"
Thanks for such helpful video !! helped me a in my uni project a lot !!!
This really helps me a lot. Thank you so much!
You're welcome
@@mechatronicsninja3806 Hi, thank for your video again, but I found that I don't have the joint page like you have at 7:47, what I have is force sensor, so I can't program my robot motion either. Is there any step I missing?
@@andrewlin2483 Sorry but can please give me more details about your project so that I can understand your problem .
@@mechatronicsninja3806 Hi, sorry for being this late to response. I found where my problem is. I didn't switch the joint type when I exported the URDF file.
@@andrewlin2483 I'am so glad that you find the problem , if you have any other questions feel free to ask.
Thank you a lot! It works fine for me. Very helpful
لا شكر على واجب سيد مروان
Hey i have made my own robot in Solidworks and i have converted into URDF file but when i import into vrep it show me error that
simExtURDF: error:there is no joint with name"
What should I do plz help...
I have done same exact steps as u have shown
@@PriyaGupta-vm8pj I don't know the exact cause of the problem. Try to rename the 'joint Name' and 'Link Name'. Otherwise, .urdf is an XML file that contains the parameters of the model, open the .urdf with notepad ++ and try to check the tags 'name' to see if there is something wrong.
It was helpful. Thank you.
thanks ..
but I have problem with importing my model
"there is no robot in the file" !!!
This is probably because the URDF file is not built correctly.
Verify that an .urdf file is created with a folder containing all meshes (STL files)
The URDF file is an XML file that describes the relationships between all the saved stl meshes (the robot parts).
You can open it with notepad++ to check the paths of the meshes.
*If it doesn't work you can set the robot in the position, save all the assembly as STL files, and then in CoppeliaSim use file>import>meshes (more details in the description)
well done,bro,thx a lot
You are welcome
Awesome channel sir, vreppp
Thanks for your video. I have finished the jobs in solidworks but when I impot the urdf file into V-REP, it shows the following information:
URDF import operation started.
ERROR: file couldn't be opened.
ERROR: there is no robot in the file.
Do you have any idea of what the problem is?
Hi, after I turned to you for help, I suspected that the problem appears due to the lack of some software or package( maybe ros? for example ) of the V-REP. To prove this, I downloaded your KR16 URDF file and tried to import it into V-REP(and my robot type is KR6 R900 sixx), however the same error information that mentioned above appeared. Could you please offer me some help?
Just run V-rep as an administrator, I solved it this way
I have the same problem
@@user-wd6mm2zq6f i have tried as an administrator,but it still show error. So strange
having the same issue, maybe a problem with a newer version of V-REP? did you find a solution to this?
I figured out, it was not working because I had a special character on the directory where the URDF file was created (I speak spanish so...), changed the name of the directory in the path, and it worked...
Thanks for sharing man!!
You're welcome 🙂
hello, boy, i have a question. When I set the joint mode to passive mode, the robot manipulator can move normally, and when I set the joint mode to torque mode, the robot manipulator will jitter during movement. Can you help me? thank you
Thanks man!
thanks!
You're welcome
The URDF export option does not come up for me under file, any suggestions?
if you do not find "export urdf" under file menu, check under tools. You will find at the bottom of tools menu I hope.
@@MahmudulHasan-eq7ug I have the same problem and checked the tools menu
@@yomnaattia8807 Good to see it helped someone
Thank you for your video. It really helps. But I got a problem: when I plug in the URDF file in V-rep, it says file couldn't be opened and there is no robot in the file. Is there any error that I got by importing the model to URDF? Looking forward to your reply. Thanks a lot!
I appreciate it .I don't know exactly the problems but it could be one of these:
1-make sure to rename all joints and links
, verify the types of all joints
2-Make sure that your imported meshes do not contain too many triangles (for a robot, typically between 10000-20000 triangles in total), otherwise V-REP could have some errors.There are applications allowing to reduce the number of polygons in a mesh (e.g. MeshLab or polygon crunsher)
3-Open the folder created.You will find a folder named meshes,check that that all "*.stl" files are created.If this folder is empty then the problem is in solidworks and not v-rep.
If all of these didn't work ,I have a plan B for you :
1-save all your assembly part as "*.stl" .
2- Open vrep, go to _File>import>mesh_ and import all you stl files created
3-between each parts _Add>joint>(select the type needed)_
4-every time you complete adding joint select it and select the part just above in the scene hierarchy an then click _Edit>make last selected object parent_
Is it possible to connect UR5 robot arms with imported solidworks robot torso?
hey...Thanks for making this video...And l also have make a robot in SolidWorks but when l Import in CoppeliaSim the size of robot is very small.. how can l increase it.
I think this is because of the parameters of Solidworks. For example, in CoppeliaSim, to get the right size of an STL file you need to save it in the Meters unit (save as>proprieties> unit > meters):
drive.google.com/file/d/1R2UwwFKulBlIUhPrJvOmJg-Os1XYIBYv/view?usp=sharing
I didn't get this problem when importing an urdf file.
Try the change the default units of SolidWorks and tell me if it works:
www.cadtek.com/change-units-solidworks/#:~:text=This%20can%20be%20done%20by,(metre%2C%20kilogram%2C%20second)
@@mechatronicsninja3806 Ok Sir..
@@mechatronicsninja3806 I have made full robot using (unit MMGS) .. so now I have to make it again using different units....And l have try by change the default units in SolidWorks
then also same problem...Do you have any Telegram Or anything So that l can sent u my file or photo so u can check it....
thanks a lot
Very usefull. Thanks! Can you show more functionality of this vrep? Thanks in advance
Yes, soon
@@mechatronicsninja3806 thanks !
it is not so useful to be able to import from SolidWorks (commercial software) into Coppelia (free software) only if you already purchased the commercial SW! :-(
if you don't have a SW licence , I recommend "FREECAD". The parts can be also imported as .stl
[C]: in function 'getObjectHandle'
[string "CHILD SCRIPT base_link_respondable2"]:11: in function
having this error . Can you help me @mechatronics NInja
thanks
I have imported my robot model here successfully, can you help me with the steps to go give the DH parameters to the joints individually. I have the calculated DH parameter values. Thanks in advance.
In this case, I recommand the other method:
0- In Solidworks Mate the robot base with Standard Planes (Front, Top, and Right plane). and lock it in its home position.
1- save all its parts as ".stl" files
2- on vrep go to :File-import-Mesh.. and import all the parts
3- create all joints (Add -joint-revolute ) according to the robot documentation.
It is a time-consuming method, however, it allows you to get the exact robot axis positions and directions.
Thnx
thanks for your video! But I want to ask you a question. When I import a urdf file to Rviz, I find out that every joint is not connect correctly (Link some joints were flying).
Do you know how to solve this problem? please!!!
Hi Cheng Cheng , you can send me your file so that I can convert it for you : mechatronicsninja@gmail.com
@@mechatronicsninja3806 I am facing a similar issue. Can you help me out please?
Hey! Was your issue solved??
Hey thanks for the video. I am using linux ubuntu 18.04 and I tried importing the urdf to v-rep but it is not working. How can I fix this?
You have the plan B: save all parts as .stl files and add the joints by yourself ( more details in the description)
i followed all the steps but codes appears different as yours why ?
Hi, I didn't understand you question, can you please give me more details.
I cannot find the plug ins in my software
You need to download it and install it (link in the description)
Hello, how do I import a .xacro file to Vrep?
Thanks, but may i know what is the song name?
The name is in the description : Imagine Dragons - On Top of the World - Peter Hollens & Mike Tompkins
@@mechatronicsninja3806 Thank sir.
This works with SW 2019? Because when i make all the URDF the button "next" does not appear. :(
Hi Nariz , if it doesn't work with SW 2019 , as a plan B , try to set your robot on its zero position, and make coincidence between the robot base and the SW default XYZ plan and then save your model as .STL . Open then VREP : File > import > Mesh (select all the .stl files )
@@mechatronicsninja3806 Yep. I had to do a mix of mesh files and primitives shapes from V-rep to make the joints. Thanks anyway. :)
i don't find this: SW2URDF in my solidworks, what's the solution ?
like you bro i dont know whats the problem
wiki.ros.org/sw_urdf_exporter
Hi, I added the add-in on SW2018 but sadly nothing appears under the normal Saving options, any ideas on how to solve that?
Ok, found it under Tools>File>Export as URDF
@Александр Гутковский did you try my solution?
@@cardansan Thanks from the future, and from mexico .
@@alfredoagrar you're welcome! From both places too, haha.
When I import the URDF I got a texture like this:
drive.google.com/file/d/1DMjmkUxWPvC9PU1pJBM2AxBggCRHcNbY/view?usp=sharing
What could be the problem?
I thought that the problem was my CAD, but then I decided to use yours and I have the same problem. I hope you can help me, thanks a lot.
I think you mess up with some vrep default setting . This is how to fix it part by part :
1- select the part and click on " Edit appearance of ...."
2- select the shape , and then select " Show edges with angle .."
drive.google.com/drive/folders/1DMOxPMu7M4WkTX1S_5dvvBvucogMf4Ye?usp=sharing
@@mechatronicsninja3806 I have this white line and adjust color doesn't help :( drive.google.com/drive/folders/1QxBM4DtjBYZl6UNg7knVtsG0Zh3-qQOh?usp=sharing
Sorry Samuel , I don't know the answer of your question , try to update or reinstall vrep
how to save the scence or model bro ?
To save the robot as a model in v-rep library take a look at this:
ruclips.net/video/TuZVYcTgXQs/видео.html
Thanks for the video. Is there any tool to export Autodesk Inventor model to URDF?
Sorry for the late response, I don't know if there is an urdf tool for Inventor,
You can do the other method :
- mate the robot to its origin position
- mate the robot base with Standard Planes (Front , Top and Right plane) so that it will be well oriented in the v-rep scene.
1- save all its parts as ".stl" files
2- on vrep go to :File-import-Mesh.. and import all the parts
3- create all joints (Add -joint-revolute )
@@mechatronicsninja3806 Thank you so much :)
@@SitiAminah-gr8qd you're welcome
@@mechatronicsninja3806 can i get your email? i want to ask some problem about v rep with my video
@@mechatronicsninja3806 thank you. I've sent an email