Quad HIL Simulation with XPlane

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...??

APM Sim Tab.jpg

XPlanejpg.jpg

APM Commnad Line.jpg

You need to be a member of diydrones to add comments!

Join diydrones

Email me when people reply –

Replies

  • 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....??

This reply was deleted.

Activity

Chris Anderson liked Zara Mae Pickering's profile
May 21
DIY Robocars via Twitter
RT @chr1sa: Donkeycar 4.4 released with tons of new features, including path learning (useful with GPS outdoors), better Web and Lidar supp…
Nov 27, 2022
DIY Robocars via Twitter
RT @NXP: We are already biting our nails in anticipation of the #NXPCupEMEA challenge! 😉 Did you know there are great cash prizes to be won…
Nov 24, 2022
DIY Robocars via Twitter
RT @gclue_akira: レースまであと3日。今回のコースは激ムズかも。あと一歩 #jetracer https://t.co/GKcEjImQ3t
Nov 24, 2022
DIY Robocars via Twitter
UC Berkeley's DIY robocar program https://roar.berkeley.edu/
Nov 24, 2022
DIY Robocars via Twitter
RT @chr1sa: The next @DIYRobocars autonomous car race at @circuitlaunch will be on Sat, Dec 10. Thrills, spills and a Brazilian BBQ. Fun…
Nov 24, 2022
DIY Robocars via Twitter
RT @arthiak_tc: Donkey car platform ... Still training uses behavioral cloning #TCXpo #diyrobocar @OttawaAVGroup https://t.co/PHBYwlFlnE
Nov 20, 2022
DIY Robocars via Twitter
RT @emurmur77: Points for style. @donkeycar racing in @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/Y2hMyj1…
Nov 20, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Going to @diyrobocars race at @UCSDJacobs https://t.co/Rrf9vDJ8TJ
Nov 8, 2022
DIY Robocars via Twitter
RT @SmallpixelCar: Race @diyrobocars at @UCSDJacobs thanks @chr1sa for taking the video. https://t.co/kK686Hb9Ej
Nov 8, 2022
DIY Robocars via Twitter
RT @PiWarsRobotics: Presenting: the Hacky Racers Robotic Racing Series in collaboration with #PiWars. Find out more and register your inter…
Oct 23, 2022
DIY Robocars via Twitter
RT @Hacky_Racers: There will be three classes at this event: A4, A2, and Hacky Racer! A4 and A2 are based around UK paper sizing and existi…
Oct 23, 2022
DIY Robocars via Twitter
Oct 23, 2022
DIY Robocars via Twitter
Oct 19, 2022
DIY Robocars via Twitter
Oct 18, 2022
DIY Robocars via Twitter
RT @NeaveEng: Calling all UK based folks interested in @diyrobocars, @f1tenth, @donkey_car, and similar robot racing competitions! @hacky_r…
Oct 13, 2022
More…