[SITL Bug]SITL Quadplane can’t be controlled at QLoiter mode or QStabilize mode

Hello.

[Using Envirionment]

I’m using WSL1 to run the SITL.

Because Mission Planner’s internal SITL does not support multi-type vehicle simulation.

I had to simulate Rover(boat) and quadplane, so I choosed WSL, thanks to forum’s expert.

I installed ardupilot directory in my WSL and ran this command on ardupilot directory :

sim_vehicle.py Rover -A “–serial0=udpclient:127.0.0.1:14551” --no-mavproxy --custom-location=“2.48647,-159.45417,0,0”

sim_vehicle.py quadplane -A “–serial0=udpclient:127.0.0.1:14550” --no-mavproxy --custom-location=“2.48647,-159.45417,0,0”

it connects and operates well except below problem.

[Problem]

I have 3 laptop where ardupilot is installed on WSL.

in first laptop, the quadplane’s flight mode can be changed to QHover or QStabilize or QLoiter, but No Quadcopter mode can be controlled by joystick.

in below video, you can see the quadplane can be controlled in “FBWB” mode, but it suddenly does not follow the joystick command after I change “QLoiter” Mode.

in seconds laptop, the quadplane’s flight mode even can’t changed to QHover or QStabilize or QLoiter mode.

you can refer to below video.

[What I tried]

You can refer to my joystick setup.

I tried several channels to control the copter but I couldn’t

I found Mission Planner’s internal SITL quadplane can be controlled by joystick, both QHover and FBWB mode.

Only WSL SITL quadplane has this problem.

I tried below command for simulating quadplane in WSL1, and joystick seems to work little, but quadplane goes crazy like below video

sim_vehicle.py -j4 -f quadplane -A “–serial0=udpclient:127.0.0.1:14550” --no-mavproxy --custom-location=“2.48647,-159.45417,0,0”

:

In stabilize mode, If I low the throttle to zero, I can control the attitude.

but If I increase throttle or use QHover and QLoiter mode, attitude goes crazy and copter spins clockwise crazyily.

  1. does it work in solo ? Only one SITL ?
  2. did you change the vehicle’s sysid, so they don’t match ?

It does not work on solo…

My post is about Solo SITL.

I only simulated one VTOL, and it fly very weirdly on QLoiter, QHover, QStabilize mode.

as shown on video I attached.

This is the link of SITL log files.

it rolls crazy when I take off them with QStabilize or QHover or QLoiter mode.


I think something act weird with sim_vehicle.py with WSL1 in windows.

with Mission Planner internal SITL, I could control the quadplane with joystick, without problem.

this is the video with similar problem.

before, fixed wing could control with joystick and quad mode was uncontrollable.

now, quad mode is controllable with joystick excepts throttle, and fixed wing mode is uncontrollable.(aircraft’s pitch angle is fluctuating in fixed wing mode)

The problem has been resolved.

There were two key points regarding WSL SITL:

[1] Using WSL1 instead of WSL2 resolves the UDP connection problem.

[2] Avoid running sim_vehicle.py in the ArduPlane folder, as it appears to function as a quadplane but behaves strangely. Instead, run sim_vehicle.py in the ardupilot folder, specifying the vehicle as Plane.

Reference:

This page mentions that quadplane SITL can be run in any vehicle folder, and it provided hint for this solution.

[2] it was you missed the -f from the command line. Either run it from the ArduPlane folder without -v plane or run from the root with -v plane, but ALWAYS add -f quadplane.
[1] wsl2 works, but you have to set the IP address correctly, since in wsl2 it has it’s own network interface connected to the host via the hypervisor virtual switch. 127.0.0.1 is referring to the wsl’s own network interface in wsl2, and not connected to the host.

The problem still here.

I ran the SITL with this command :

sim_vehicle.py -j4 -v plane -f quadplane -A “–serial0=udpclient:127.0.0.1:14550” --no-mavproxy --custom-location=“2.48647,-159.45417,0,0”

When I put QLoiter or QStabilize mode and take off, the vehicle is shaking weird as below video. :

I can’t control yaw as the video.

I changed my post’s title from “Can’t control SITL quadplane by joystick” to “SITL Quadplane can’t be controlled at QLoiter mode or QStabilize mode”

It seems that something related to physical model have problem.

Pleas post your params from the sim. Also update the code, 4.4.0-dev is quite old and dev code, not released.

Thanks. below is my parameter for sims. :

SITL_Crash_Vehicle_Param.param (26.4 KB)

I remember I downgraded git version for solving some errors, but I think version is not important because I’m trying this SITL on several laptops and all have problems.

let me try latest version of ardupilot and post the reply soon.

I deleted ardupilot folder and recopied ardupilot folder with linux command.

and SITL worked like charm.

Thank you for your help.

but the version is still dev version…

“Plane V4.6.0-dev(2ca6ea4f)”

I just used below command :

git clone --recurse-submodules GitHub - ArduPilot/ardupilot: ArduPlane, ArduCopter, ArduRover, ArduSub source

Once you got the master as above

git fetch
git checkout Plane-4.5
git pull
git update submodule --init --recursive

Sorry, It was my misunderstanding.

The problem was not solved yet.

If I take off at QLoiter mode, everything works well, So I thought the problem was solved.

but for some reason, I have to take off at QStabilize mode even in simulation.

You can refer to below video, the problem persists if I take off at QStabilize mode.

when I transition from fixed wing to multicopter-mode, even when throttle is zero it rocket to sky.

Result by your command prompt :


drone@LAPTOP-A1QF1KAN:~/ardupilot$ git fetch
drone@LAPTOP-A1QF1KAN:~/ardupilot$ git checkout Plane-4.5
M modules/ChibiOS
Branch ‘Plane-4.5’ set up to track remote branch ‘Plane-4.5’ from ‘origin’.
Switched to a new branch ‘Plane-4.5’
drone@LAPTOP-A1QF1KAN:~/ardupilot$ git pull
Already up to date.
drone@LAPTOP-A1QF1KAN:~/ardupilot$ git update submodule --init --recursive
git: ‘update’ is not a git command. See ‘git --help’.

The most similar command is
update-ref
drone@LAPTOP-A1QF1KAN:~/ardupilot$ cd ArduPlane
drone@LAPTOP-A1QF1KAN:~/ardupilot/ArduPlane$ git fetch
drone@LAPTOP-A1QF1KAN:~/ardupilot/ArduPlane$ git checkout Plane-4.5
M modules/ChibiOS
Already on ‘Plane-4.5’
Your branch is up to date with ‘origin/Plane-4.5’.
drone@LAPTOP-A1QF1KAN:~/ardupilot/ArduPlane$ git pull
Already up to date.
drone@LAPTOP-A1QF1KAN:~/ardupilot/ArduPlane$ git update submodule --init --recursi
ve
git: ‘update’ is not a git command. See ‘git --help’.

The most similar command is
update-ref
drone@LAPTOP-A1QF1KAN:~/ardupilot/ArduPlane$

my bad
git submodule update --init --recursive