Visuals not available using importrobot from a simscape file

5 visualizaciones (últimos 30 días)
Dylan Bender
Dylan Bender el 2 de Ag. de 2022
Respondida: Narvik el 27 de Oct. de 2023
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?

Respuestas (1)

Narvik
Narvik el 27 de Oct. de 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!

Categorías

Más información sobre Robotics en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2022a

Community Treasure Hunt

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

Start Hunting!

Translated by