Quadplane SITL with gazebo

Did you manage to fix this, I’m having the same problem, the motors start to spin without a reason and I don’t know if i have to change the SERVOX_FUNCTION, the FRAME_TYPE/FRAME_CLASS or the “channel” argument in the plugin

Yes we managed to solve that problem. I could give you the world file and the sdf file, If you want

yes please, that would help me a lot. did you found the problem? does the vehicle model has to be in sdf? because im using and urdf

No, I don’t think you’ll have to only use sdf, you can replicate the vectors of LiftDrag plugin in the urdf and similarly map the corresponding channels inside the Ardupilot plugin to correct motors/servos.

The gazebo parm file, along with the vehicle model and world file are uploaded on google drive. Hope it helps you.

https://drive.google.com/drive/folders/1t1sdmQCOl9u54U4Xv2rLTM8RGSQu8UhK

1 Like

Hi there, I’m having the same issue where the motors spin as soon as Gazebo is connected to Ardupilot SITL. I’ve had a look at your files in google drive but I can’t see what you’ve done to fix this. What do you think was causing the motors to spin even while disarmed?

The other thing I’ve noticed is that the assigned channels in the Gazebo SDF file start at channel 0 while the Ardupilot channels start at channel 1.

Appreciate any feedback! Thanks for your help guys :slight_smile:

Hi, I have the same issue using ardurover, it displays this as it started

Rate: target:1000.0 achieved:994.0 speedup 1.0/1.0
Rate: target:1000.0 achieved:998.5 speedup 1.0/1.0
Rate: target:1000.0 achieved:999.0 speedup 1.0/1.0

Do you have any idea why it displays this always ?

1 Like

Hey Justin, I’m not sure what exactly I had done to resolve that issue as It’s been more than 8 months since but you could turn on verbose and there’s a ArduPilotPlugin.cc file that you can edit to print the commands that are being received by the ardupilot plugin and the thrust forces that are being generated to the screen.

It’s the way I debugged and resolved it.

Hi @Salahuddin_Khan,

I’ve tried your file, it work but the motor spin when I start gazebo, even at the begining when it’s disarmed. Also, I had to change 2 of the propeller to make it work correctly. Didn’t had the same problem with all the propeller spinning from start?

@juzzy, @Ric-27: Did you test these file? Didn’t you had the same problem? The propeller does move also when you launch the simulation with the file from @Salahuddin_Khan ?

Thank you

Hi @PotatoesLegend,
So you have the same behavior than me at the start of gazebo ; a propeller spinning without apparent command.

Can you share your solution ?

Hi @tomlogan,
here’s what i’ve done so far in the file. The rotor 2 and 3 were ccw along with 0 and 1. I’ve changed 2 and 3 to cw. The control is much better now. But the rotor puller start with fast spinning. For the quad, it’s also spinning but much slower. It’s seems like it’s from the LiftDrag plugin maybe.
Just change the extension to .sdf for the file i’ve uploaded.
standard_vtol.txt (32.3 KB)

Thanks,
I will try to apply this to Ardurover for a boat with just 2 servo motors.

I learned a lot from this thread. I was able to use the files posted in this thread to make my own world. I was even able to fix the pusher prop spinning continuously by setting the following parameter

SERVO4_MIN      1000

I also set up an example ardupilot gazebo vtol world on my github. I am posting this here for future people that might want to do this.