Converting Simscape model to RigidbodyTree

36 views (last 30 days)
Simay Yalcin
Simay Yalcin on 24 Jan 2023
Answered: Sakshay on 14 Mar 2023
Hi, I am trying to convert Simscape model to RigidBodyTree. I first converted my xml file to Simscape model there was no problem. But when I try to build a RigidBodyTree. Matlab gives me error which says: 'Error using robotics.SMImporter/processTranslationFlags (line 275). The Simscape Multibody components contain closed chains and cannot be converted to a rigidBodyTree. To break all closed chains and only issue a warning, use the Name-Value pair: 'BreakChains','remove-joints'. Otherwise, remove the closed chains associated with the following joints: PanTiltt/Planar Joint' Can you please tell what am I doing wrong here?

Answers (1)

Sakshay
Sakshay on 14 Mar 2023
Hello Simay,
As per my understanding, while converting a Simscape Model to RigidBodyTree you are getting the mentioned error.
URDF (Unified Robot Description Format) do not support a closed chain based structure. Hence, while converting your model from Simscape to RigidBodyTree you are getting an error to remove the closed chain structures.
As the error suggests, to successfully convert a Simscape model to RigidBodyTree, you can set the "BreakChains" Name-Value pair to "remove-joints" while using the "importrobot" function. The "remove-joints" will automatically remove the chain closure joints in the final output. An example code for the same would look like:
importrobot(model, "BreakChains", "remove-joints");
For more information, you can refer to the following documentations:

Products


Release

R2020a

Community Treasure Hunt

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

Start Hunting!