Hello all,

I'm trying to get the waypoint navigation in HIL simulation using XPlane, but not successful yet.....with the default HIL firmware and the config file "AC211r6_Xplane.param" available in the starter_pack, i observe the following:

- The quad rotor in xplane get a max throttle of 0.169, and does not take-off.....

- If i change the throttle gain (from default 10000 to smthng like 3000), quad rotor takes off, but does not switch mode to AUTO even after reaching very high altitudes...

The mission script that i run from Mission Planner is this:

----------------------------------------------------------------------------------------------------

print 'Start Script' # auto-lauch the AUTO mode for HIL test in Xplane v9.70 (JLN January 6, 2012)
Script.SendRC(1,1500,True) # roll
Script.SendRC(2,1500,True) # pitch
Script.SendRC(3,1000,True) # throttle
Script.SendRC(4,1500,True) # yaw
Script.SendRC(5,1933,True) # mode Stabilize - Mode 6

Script.Sleep(1000)

Script.Sleep(1000)

Script.SendRC(4,2000,True) # yaw right to arm the motors
cs.messages.Clear()
Script.WaitFor('ARMING MOTORS',30000)
print 'Motors Armed!'
Script.SendRC(4,1500,True)

Script.Sleep(1000)

print 'Takeoff'
Script.SendRC(4,1500,True)
Script.SendRC(1,1500,True)
Script.SendRC(2,1500,True)
Script.SendRC(3,1700,True) # throttle up


Script.SendRC(5,1515,True) # set mode to AUTO- Mode 3

------------------------------------------------------------------------------------------------

Any suggestions on how do i get the mode change to AUTO and waypoint navigation working in HIL...??

Views: 391

Attachments:

Reply to This

Replies to This Discussion

Was a silly mistake......i was doing it without a GPS lock.....now i can change mode to AUTO....

But the throttle problem remains....max throttle tht i get with RC channel 3 (max,min = 1885,1100) and sim throttle gain of 10000 are 0.180, which makes sense.....so i change throttle gain to 3000, and quad takes off fine with mission script (new throttle in XPlane = 1885/3000 = 0.628)....

However, whenever it encounters mode change command to AUTO in mission script, it just keeps coming down, until it crashes.....throttle value show the same (no reduction) in mission planner and XPlane....i've tried them with different home altitudes with only one command in AUTO mission: takeoff to certain altitude....but same thing happens always....the usual waypoint nav too responds the same...

Any suggestions or ideas on what am I doing wrong here....??

Hi Anant...  I too am in about the same place simulating in X-plane.  The throttle values sent range from about .112 to .186 which is insufficient to get the simulated quadcopter to take off.  Messing with throttle gain like you did or editing the plane in x-plane to scale up the thrust value or increase the horsepower works, but since the minimum value is .112 rather than 0, the minimum throttle value gets scaled up as well, so when trying to fly the sim with the radio, you throttle all the way down and there's still a lot of thrust.

I don't see any way to get x-plane or the mission planner, through their interfaces, to subtract an offset before applying scaling.

My theory is that the servo pulse width times that ardupilot would use to set the motor controllers are being sent to xplane rather than a percentage of total thrust, so the .110 to .185 is ardupilot asking for 0 to nearly 100% thrust, but the motor controller settings are instead being interpreted as 11% to 18% thrust.

If I'm right then either the HIL simulation version of the Ardupilot software needs to be modified to perform this scaling, or the ground station software that's making the UDP packets needs to do it.

I got this working 1 month ago........here's the link to latest post......

http://diydrones.com/forum/topics/xplane-simulation-keeps-crashing-...

Hope it helps.....

RSS

Social Networking

Contests

Season Two of the Trust Time Trial (T3) Contest has now begun. The fourth round is an accuracy round for multicopters, which requires contestants to fly a cube. The deadline is April 14th.

A list of all T3 contests is here

Advertisement

© 2013   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service