Visuals not available using importrobot from a simscape file

5 次查看(过去 30 天)
I have created a custom manipulator using Simscape using STL files as the bodys and revolute joints. I then use the 'importrobot' function to bring this robot to matlab which runs without errors. When I visualize the robot using the 'show' function, I only see a series of lines and coordinate system visualizition (I'm not sure of the propor name). When I inspect the the rigidBodyTree in the Matlab workspace, I notice that teh bodies do not have visuals associated with them. How can I import the robot from simulink to matlab and keep the associated STLs?

回答(1 个)

Narvik
Narvik 2023-10-27
Hi Dylan Bender,
I understand that you are facing an issue while trying to import your robot model to MATLAB. For the visuals to be imported successfully, ensure that importrobot function is locating the directory (containing the mesh files) correctly.
You can set the directory in the function using the MeshPath Name-Value argument. Here is the code snippet for your reference:
robot = importrobot(URDFtext, "MeshPath", {"../arm_meshes", "../body_meshes"});
Please refer to the following documentation for more information:
Additionally, you can verify the format of the visual mesh files of the robot model to ensure they are either in STL or DAE format.
Hope this helps!

类别

Help CenterFile Exchange 中查找有关 Robotics 的更多信息

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by