Visuals not available using importrobot from a simscape file
4 views (last 30 days)
Show older comments
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?
0 Comments
Answers (1)
Narvik
on 27 Oct 2023
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!
0 Comments
See Also
Categories
Find more on Robotics in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!