Load STEP into Simscape Multibody using URDF
16 次查看(过去 30 天)
显示 更早的评论
I have a standard URDF file for a robotic arm and the corresponding CAD for each link as a series of STEP files. When loading the URDF into Matlab using the smimport('file.URDF') function the URDF file declares the geometry is in the following location which is standard when using ROS:
<geometry>
<mesh filename="package://sawyer_description/meshes/sawyer_pv/base.DAE"/>
</geometry>
The line above causes the following warning message to appear in the Matlab command window after executing "smimport('file.URDF')":
Warning: Mesh file 'base.DAE' in link 'base' has an unsupported file extension and cannot be visualized. Valid file extensions include STL, STP, and STEP.
This warning is clear to me. My issue is I cannot find the correct way to alter the URDF line to locate the STEP file in the Matlab folder for a windows system.
Since I am using Windows 10 and Matlab 2018b with Simscape Multibody I would like to alter the URDF so that Matlab can import the CAD as well as build all the blocks for the links in the robotic arm when executing the smimport() function. The result, I would think, would be something like the following:
<geometry>
<mesh filename="C:/Matlab/mesh/base.STEP"/>
</geometry>
But this results in a similar warning message which means the URDF is still not directing Matlab to the STEP file.
I have already tried using the import CAD, plugin and OnShape tutorials to try to get around this issue but I run into the same issue or Matlab tries to use the CAD's generated "file.xml" to import the incorrect physical properties.
Does anyone have experience with importing geometry using a URDF in Simscape Multibody? Any help with altering the "mesh filename" line would be great!
0 个评论
回答(1 个)
Steve Miller
2019-3-25
Hi,
The easiest way (I believe) to get this to work is to remove all path information from the URDF file and simply add the folders with the STEP files to your MATLAB path.
You can verify that your MATLAB installation can import URDF files that refer to STEP files by importing a URDF file that ships with Simscape Multibody.
>> smimport('sm_humanoid.urdf');
You can look at the file directly:
>> edit('sm_humanoid.urdf');
You can also see how the path should be expressed for your operating system using the which command
>> which shoulder.step
C:\Program Files\MATLAB\R2018b\examples\robotics\shoulder.step
--Steve
0 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Simscape Multibody 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!