3D Robotics

Lego GPS autopilot code now in beta!

Big news: we've finally got a version of the Lego UAV that's based on GPS! The previous versions used a compass sensor as a proof of concept, but we've now upgraded it to use a third-party GPS receiver, connecting to the Mindstorms NXT brick by Bluetooth. This allows us to employ proper waypoints and to navigate to specific geographic locations, including returning home. Right now the code is in an early beta, but the key bits work. You can download the RobotC code here.

Special thanks go to a number of people. Dick Swan, the creator of RobotC, was the first to create a Bluetooth interface to a GPS device. Steve Hassenplug created an excellent GPS parser for his Green Monster outdoor wheeled Lego robot and was kind enough to share the code. And Ralph Hempel, the creator of pbLua, helped a lot in the early stages of solving the Bluetooth interface problem. Although we ended up going with RobotC, not Lua, in the end, he showed the way.

Coming up next: I've got to tweak the code to work properly in the air, and film a demonstration using real-time telemetry and aerial video to show how well it follows its waypoints when under autopilot control. And after that? Well, we've got some prototype hardware the promises to remove the mechanical complexity of the Lego-to-control-surfaces problem entirely. It would also allow us to bring the elevator under autopilot control, allowing us to do a proper altitude hold. Finally, there's a possibility that we may be able to also do aircraft stabilization with Mindstorms using inertial sensors, which would allow us to eliminate the FMA Co-Pilot that we're currently using. I can't say more about this yet, because it's using unreleased hardware, but stay tuned.

We've only just begun!
E-mail me when people leave their comments –

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

Join diydrones

Comments

  • I just replied to your e-mail from last night.

    Steve
  • Not a problem thanks any ways :(
  • 3D Robotics
    Yes, but I can't give that out either. Sorry to be unhelpful, and I hope he'll respond to your contact page query.
  • fair enough, i tryed emailing him from the contact part of his page a couple of days agao but still have no reply. do you have an email adress that i can reach him at?
    thanks
  • 3D Robotics
    I'm afraid you'll have to get that from Steve. It's not ours to distribute.
  • Hi, do you think that you could send me the Green Monster source code by Steve Hassenplug. I am trying to make a GPS robot.
    p.s. your guys code is really good.
    thanks
  • 3D Robotics
    Yes, that's left over from the previous version and can be safely deleted. Sorry for the mess!
  • Hi!

    I tried using the beta code (uav2.c) you posted above on my brick. Quick question ... looking at the text of the code and on the fifth line it states

    "const tSensors kCompass= (tSensors) S1;"

    tried looking at the rest of the code and there's no reference to the compass sensor. So, is the fifth line code an artifact of the compass simulated GPS system you indicated in previous posting? I have no background on C or RobotC for that matter so an innocent question is will deleting the fifth line not affect the working of the code?

    Thanks.
This reply was deleted.