0
$\begingroup$

Rosanswers logo

Hey there,

Sorry in advance, I know this is a gazebo question but I'm in a hurry and nobody has answered in Gazebo Answers to this question since the last week, I'll appreciate any help thanks. I've exported some meshes from Solid Works and in all of them the center of mass is not where it should be. The center of mass appears always on the corner. I'm quite sure it have to be a problem related to Solid Works, so I've been looking for how to change the center of mass' position in Gazebo but nothing I've found. Few days ago I applied a center of mass in a Solid Works part, then exported it again to Gazebo with the hope to see some changes but nothing, the center of mass continues being out of its logical point.

Thanks.


Originally posted by magole on ROS Answers with karma: 16 on 2019-01-25

Post score: 0


Original comments

Comment by PeteBlackerThe3rd on 2019-01-25:
I would recommend fixing this problem in Solid Works. Calculating physical properties and exporting the SDF definitely does work. It sounds like you haven't set the material properties or generated the physical properties before your export.

Comment by kosmastsk on 2019-01-25:
You may change it dynamically by following the advice in here: https://answers.ros.org/question/258673/how-to-dynamically-update-masscenter-of-massinertia-during-gazebo-sim/

Comment by magole on 2019-01-25:
PeteBlackerThe3rd, I've tried what you say. I applied aluminum material to a part, the center of mass is still making no sense. Actually, when I exported to STL some windows appeared saying that some properties hadn't been exported. Might be that, I'll try again

Comment by PeteBlackerThe3rd on 2019-01-25:
Wait a second, STL doesn't support physical properties. Are you not using the solidworks to URDF exporter?

Comment by magole on 2019-01-25:
I knew about that but then i don't know how to open or edit an urdf file in Gazebo

Comment by PeteBlackerThe3rd on 2019-01-25:
A URDF file is just a text file, you can edit it any text editor. The URDF in gazebo tutorial should cover everything you need.

Comment by magole on 2019-01-25:
Wow thanks, now I see it. However now I get another problem, I'll close this question and open another one.

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

So, the problem was that I was working with STL when as @PeteBlackerThe3rd said it doesn't support physical properties. To export from Solid Works to Gazebo I can do two things, exporting as STL file only recommended for static meshes and as URDF using SW2URDF exporter for models. Now all works correctly, thanks to @PeteBlackerThe3rd.


Originally posted by magole with karma: 16 on 2019-01-28

This answer was ACCEPTED on the original site

Post score: 0


Original comments

Comment by PeteBlackerThe3rd on 2019-01-28:
Great, glad you got this working.

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.