Gazebo solo.sdf model modification

Hi all,

I need help with my customization of the solo.sdf model.

I tried to replace the .stl model of the base_link and the rotors, and manually move each rotor to its location (with the correct order).

I had to rotate the base_link in 90 [deg] around the roll axis when I inserted my .stl model.

I’m having two major problems:

  1. When I define the visual and collision element of each rotor as <pose> 0 0 0 0 0 0 </pose> the rotors aren’t rotating around their own axis, it looks like it has some shift.

  2. If I leave the visual <pose> value as the original solo.sdf, the rotation of the rotors seems to be right, but the quadrotor immediately flips when taking off.

Can someone help me with this issue?


I’m a begginer but i faced few weeks ago this problem. The first thing you have to do is to find the rotor configuration you desire here : Airframes Reference | PX4 User Guide (Paying especial attention to the forward direction of the drone (the one the arrow indicates))
Secondly, you should be able to identify your rotors with their respective identifier (in this case 1,2,3,4) and name then as its indicated.
That problem you are facing can be because px4 is commanding one of the rotors and that rotor is not correctly labeled. (start naming then from 0 always, rotor_0 (labeled as 1 in the airframe configuration picture) rotor_1 (labeled as 2 in the airframe configuration picture)…
The problem with the pose, could you give more info? When i did it i just modified the link pose and it worked.
Hope you to be successful with this task!

Hi @JuSevRo, Thanks for the answer.

I double-checked my configuration, and it all seems right, all the rotors are numbered correctly as the airframe definition.

When I set the pose of the visual to [0 0 0 0 0 0], and place each rotor in the right place, I’m getting this rotation:


Maybe it has something to do with my STL files?

Any other solutions that might work?

Thanks again.

Maybe the problem is in how are the joints defined, i dont know. Does your drone lift?

@iftahnaf The problem is that center of the meshfiles are not located at the hub locations.

Hi @Jaeyoung-Lim and Thanks for the answer.

I did an assembly of the different drone parts in CAD, then export the base (frame + motors), CCW rotor, and CW rotor as separate STL files, each has its own origin at [0,0,0].
Do I need to set the origin of each STL rotor in its place on the motor, w.r.t the base’s origin?


@iftahnaf Not sure what you are asking, but essentially your confusion is coming from the fact that the origin of the mesh is not at the hub of the props. You can reposition your mesh(Which is not 0, 0, 0) so that the axis of rotation of the link coincides with the hub of your propellor or you can generate a meshfile that has a origin at the hub and put the mesh at (0, 0, 0)


Thanks for the help.

The problem was solved after using SW2URDF - Solidworks add-on which helps export parts/assembly from Solidworks to URDF files.