UPDATE: 0.2 BETA and a simulator setup have been published HERE.

So, here it is; one more BETA of NXT AutoPilot.

I didn't have the time to do enough testing during the holidays so this is still going to be a BETA version instead of the non-BETA I promised. However, I caught some very nasty bugs in the stabilization loop and added some nice functionalities.

// -Fixes in 0.1:
// -Added variance (gyro vs. accelerometer) based coefficient for gyro drift fixing.
// -Fixed some crucial GPS errors.
// -Everything is now based on PID controllers (even yaw).
//
// -Still not using compass or barometer although the device driver for compass is still there
// if you don't mind some home brewing..

TO-DO:
-Navigation still assumes GPS co-ordinates to be co-ordinates on a flat surface. Introduce ball geometry..
-I'm planning to buy a 3D Bluetooth GPS so alternate device driver and control loops are needed.
-Documentation.

Hopefully someone finds this useful..

NXT AutoPilot v0.1b.zip WARNIGN: This version of the auto pilot is out dated!

Sami F.

Views: 626


3D Robotics
Comment by Chris Anderson on January 6, 2009 at 8:33am
Excellent! Many thanks for sharing it. Any special hardware requirements or just the standard Accel+2gyros+servo driver+BT GPS?

T3
Comment by Sami Finnila on January 6, 2009 at 8:36am
No, just the standard ones so there's no altitude hold ATM.
Comment by Harrison on January 6, 2009 at 12:47pm
Are these the unreleased new gyros or are they the ones you can order from Lego today?

Also would it be reasonable to use a heading hold gyro from a heli on the elevator channel to maintain altitude?

T3
Comment by Sami Finnila on January 6, 2009 at 1:06pm
These are the already available HiTechnic rate gyros and everything else you'd need is also already commercially available.

There are already gyros (both roll and pitch) holding the plane level with the aid of the accelerometer. But unless you can perfectly set your throttle and trim you aircraft the altitude will change over time and for a fully functional autopilot you'll want to be able to set 3D waypoints. I have source for an I2C barometer (SCP1000-D11) but it's stripped from this version of the NXT AutoPilot since this sensor requires some home brewing in order to work with NXT.

3D bluetooth GPS modules are also becoming relatively cheap so I'll try and add one to this project so that we can finally have a fully functional Lego autopilot which is built with commercially available parts.

3D Robotics
Comment by Chris Anderson on January 6, 2009 at 1:26pm
Sami,

You can get the altitude reading from the GPS, so no need for a barometric sensor.

T3
Comment by Sami Finnila on January 6, 2009 at 1:36pm
Yes that's what I meant but the GPS I use supports only RMC so there's no altitude coming out of it and for a 3D GPS I need a new parser and a new control loop but in the mean while I can provide the barometer code if someone decides to pick that path; My matriculation examinations begin within a month or so and therefore I won't publish any updates for the next 3-4 months so that's why I mentioned the barometer path. Sorry for the confusion.
Comment by Robert Drone on July 25, 2009 at 7:34am
What about these?;

http://web.mac.com/ryo_watanabe/iWeb/Ryo's%20Holiday/Gyro%20Sensor.html

http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=93

http://www.mindsensors.com/index.php?module=pagemaster&PAGE_user_op=view_page&PAGE_id=101

T3
Comment by Sami Finnila on July 26, 2009 at 5:38am
Those might do. I have stopped developing the NXT AutoPilot because I ran out of funds and intrest for the project. One thing that I recommend you do is make it with full 6DOF IMU. I.e. you'll have to put the servo controller and accelerometer onto the same port (in order to get 3 gyros connected) which will slow down the refresh rate of both of these a little but with 3 gyros slowing down the accelerometer a little is nothing to worry about. Other than that my code should be up to the task.
Comment by Robert Drone on July 29, 2009 at 3:15pm
Thanks for the info!

Comment

You need to be a member of DIY Drones to add comments!

Join DIY Drones

© 2019   Created by Chris Anderson.   Powered by

Badges  |  Report an Issue  |  Terms of Service