get Solid blocks derived inertia and mass values

조회 수: 16 (최근 30일)
EngM
EngM 2023년 2월 10일
댓글: EngM 2023년 2월 13일
Hi,
I would like to be able to get the derived values of the inertia and mass of the solid body blocks found in a Simulink Model using get_param function.
The values I am getting using a matlab script don't show the 'updated' values, rather the default values I = [1 1 1 0 0 0], mass = 1, despite updating them manually in the block parameters.
The intent is to create a RigidBodyTree from the given multiBody simulink model. I know there is importrobot() function but that one creates links frames not based on DH criteria which creates issues for me. Thanks.
  댓글 수: 3
EngM
EngM 2023년 2월 10일
Solid bodies, like Brick Solid and Cylindrical..etc. found in
  • Library: Simscape / Multibody / Body Elements
fyi, I do update and run the model before trying to extract the info from the block properties. Also, if the Inertia > Type is set to Custom, the script works fine and I can extract the inertia properties. It is not working if the Inertia > Type is set to 'CalculateFromGeometry' :
get_param(blk,'InertiaType')
ans =
'CalculateFromGeometry'
thanks..
Fangjun Jiang
Fangjun Jiang 2023년 2월 10일
I couldn't figure it out.

댓글을 달려면 로그인하십시오.

답변 (1개)

Steve Miller
Steve Miller 2023년 2월 12일
The derived properties are displayed on the block, but are not accessible via get_param().
If you want to automate getting these values, you could use the Inertia Sensor, run a short simulation and save the results to the workspace.
--Steve
  댓글 수: 2
Fangjun Jiang
Fangjun Jiang 2023년 2월 13일
I guess the question or request is to have access to those derived values. No need to add sensor and log to get the value since the value is already displayed.
If there is an interface on the RigidBodyTree to use the sensor, then that might be a solution.
The derived values must be interim variables in the mask as they are calculated and displayed. I dug deep into the mask but couldn't find a way.
EngM
EngM 2023년 2월 13일
Thanks for the suggestion Steve, but as Fangjun elaborated, the derived values are calculated from geometry, so they are not dynamic values which require successful simulation to obtain. Simscape multibody encoruges using its library to combine and create geometry from basic blocks provided. There should be a method by which the resulting inertia is found and used along with built-in Robotic algorithms, possibly outside the Simulink enviroment.
On bigger note, the command importrobot() from simulink could use more specifications to choose to use DH method, as the standard robotic toolbox offers, which will export the inertia matrix for the given link body w.r.t to its link frame defined as per DH method.
thanks..

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Simulation and Analysis에 대해 자세히 알아보기

제품


릴리스

R2022b

Community Treasure Hunt

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

Start Hunting!

Translated by