doubt in uploading model .STL file in gazebo
Hi, I made my .stl model file in solidworks with taking center as origin as this is (" Use your 3D modeling software to move each mesh so that it is centered on the origin") written in gazebo make model tutorial. But when i upload these .stl model in gazebo it shows axis of this model to be corner of model. And also i set up material in solidworks during model making so weight should be assigned to it but after uploading model in gazebo it shows mass = 1kg and same inertia for all model files. I m somewhat confused at this point so please help me to get rid of this problem. any help will be appreciated. thanks in advance.
Asked by mukesh_148 on 2017-08-14 15:39:21 UTC
Answers
STL is supported as one of the mesh shapes in the <geometry>
tag. An SDF file is still required.
The mass must be given in an <inertial>
tag on a <link>
.
There's an example of a model using an stl file in the cube_20k
model here. Note that model is usind sdf 1.4. New models should be created with the latest version (currently 1.6).
There is a guided tutorial for creating Velodyne model with a mesh here. It says to create a collada mesh .dae
, but the process is exactly the same for an .stl
mesh. I recommend going through it.
It sounds like the origin of the .stl mesh is in the corner. I imagine you don't want to redraw your model at the origin in solidworks, so you can use the pose on the <collision>
or <visual>
to the right place on the <link>
.
Asked by sloretz on 2017-08-14 16:08:28 UTC
Comments
thanks for reply. can u please clear 2 point -- 1. does that corner side origin of .stl file will create any problem during simulation ?? 2. can i just add inertia calculated from meshlab directly in sdf file ??
Asked by mukesh_148 on 2017-08-14 16:32:43 UTC
I don't know of any problems that would be caused by the origin being at the corner. I think as long as the pose is adjusted to put it in the right spot everything should be ok. Yeah you can add the inertia to the sdf file. You may have to adjust the pose on the inertia tag too. Use "View -> Inertias" in the top menu of the gazebo gui to make sure it's right.
Asked by sloretz on 2017-08-14 16:51:37 UTC
so now axis of model .stl is corner. I'll calculate inertia w.r.t. corner in meshlab. Now in inrtial tag i will put that inertia tensor. what will be the pose here ??
Asked by mukesh_148 on 2017-08-15 00:49:34 UTC
Possibly the opposite of the pose used to position the mesh? I'm not sure, bu visualizing the inertia in the gazebo gui will help a lot in figuring that out.
Asked by sloretz on 2017-08-16 16:59:57 UTC
Comments