I’m trying to achieve stable flight with a custom hexacopter model in the PX4 sitl and gazebo. I have modified the “posix_sitl.launch” in “/PX4/Firmware/launch” to point to my drone model. My own model is an URDF-File which copies most of the “typhoon_480.sdf” and converts it into urdf-syntax. This means I utilize the same plugins as the “typhoon_h480.sdf” including the same rotor arrangement. Basically I use a .urdf version of the “typhoon_h480.sdf” with my own drone model and custom parameters (for inertia, mass, rotorsize, etc)
When I open QGroundControl and give a takeoff order the drone does leave the ground, but the flight is very unstable. It immediately tilts to one direction and crashes - as you can see in the following image.
The red and blue rotors are rotating faster than all other rotors and that stays the same even after the drone topples over. I have tried swapping the control_channels for the libgazebo_mavlink_interface plugin, but the behaviour stays the same. There seems to be no relation, f.e. if I swap the channels of the blue and grey rotors, the grey rotor should behave like the blue rotor did before - but this does not happen. It always tilts in the same direction and seems to be unrelated to the channels.
Another issue: I have also tried to replace the drone collision with a simple cylinder shape, but when I do this I get “Preflight Fail: Accel Range, hold still on arming” warnings when I try to take off in QGroundControl. This does not happen when I use the 3D model file for collision.
It seems like I’m missing something important. Can someone tell me what I am missing if I want to properly set up a custom drone model?
- I am using an URDF file instead of a SDF file. Would using an SDF file be better?
- How do I setup the motor arrangements to properly work?
- What are the required steps in order to get a working custom drone model? We would prefer to use the “roslaunch px4 posix_sitl.launch” instead of the “make px4_sitl gazebo” command.
If someone could help me out - that would be great.