importrobot with Simscape model has no visual geometries

3 次查看(过去 30 天)
Hi all, I have a simscape model that was exported from Creo using the multi-link plugin. It is configured to work with STL as its geometry files in Simscape and correctly displays them.
When I use the importrobot command from the robotics toolbox, it successfully completes this, however it lacks any geometry meshes, using the show command, it only shows a skeleton model and a bunch of coordinate systems.
I have seen some solutions floating around using the name valued pair (Taken from here)
robot = importrobot(URDFtext, "MeshPath", {"../arm_meshes", "../body_meshes"});
However this does not work, and the documentation points out that this is for URDF, Xacro or SDf imports, while Simscape Multibody Model imports lack this option. The code then throws an error.
'MeshPath' is not a recognized parameter. For a list of valid name-value pair arguments, see the documentation for this function.
How can I import a simscape model into the robotics toolbox alongside its STL's as collision or visual geometry? The ultimate goal is to then export as URDF with STL's (Currently the URDF also lacks STL's).
Thanks

回答(1 个)

Sivsankar
Sivsankar 2024-8-9
Hi William,
The 'MeshPath' parameter is for URDF, Xarco and SDF imports. You can not use it for importing STL files, which explains the error that you have recieved.
In order to visualise the geometry using STL files, import a robot model as a URDF file. The STL file locations must be properly specified in this URDF. The importrobot‘ function parses the URDF file to get the robot model and visual geometries.
But since you do not have the URDF file of the robot, I suggest you export the Simscape multibody model to a URDF file and then add the STL files to the URDF file in oder to visualise the geometry of the robot.
To visualise the geometry, you can run the command:
show(robot,Visuals="on",Collisions="off");
You can leverage the documentation on how to visualize the geometry from here:
I hope this helps your query. Feel free to correct me if I’m wrong. Thanks!

类别

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

标签

Community Treasure Hunt

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

Start Hunting!

Translated by