Please create an account to participate in the Slashdot moderation system

 



Forgot your password?
typodupeerror
×
Robotics

Video Embedded Linux Takes to the Skies (Video) 26

Video no longer available.
This is an interview with Clay McClure. He makes his living designing 'custom Linux software solutions for technology start-ups in Atlanta and the San Francisco Bay area.' He also works on Embedded Linux for autonomous drones. Here's a link to slides from a talk he gave on exactly that topic: Flying Penguins - Embedded Linux Applications for autonomous UAVs, and that's far from all he has to say about making Linux-controlled drones. However, for some reason Timothy and Clay didn't talk about using drones for target practice. Perhaps they can discuss that another time.

NOTE: We urge you to read the transcript of this interview even if you prefer watching videos; it contains material we left out of the video due to sound problems.

Timothy Lord : Well, Clay how did you come to be talking at Embedded Linux Conference?

Clay McClure : Well, I’ve been following the DIY Drones community mailing list for a while trying to figure out who the players were, what the projects people were working on were. And Andrew Tridge, who’s sort of the Technical Steering Committee Director, posted an invitation for people to apply to speak at the Embedded Linux Conference. And he was encouraging first-time presenters to apply. So I went and read on the website about the kinds of talks they were looking for, they were doing a whole drones track, so it seemed like something that I wanted to do. And it’s nice to have a stretch goal, something to motivate your work because on the project that I’m working on, I could have just chosen not to spend every weekend for the past six weeks working on it, but instead having that motivating factor of, “Oh, I have to get this thing working because I have to give a talk on it” sort of helped out. So I applied to speak and was somewhat surprised that I was chosen, but happy and so I am happy to be here.

Tim: Speaking of first time, you actually haven’t been involved with drones for all that long, so how is it that you came to be on there, you know, to be doing it?

Clay: Yeah, that’s right. So, I’ve been working with the drones for about six months. I just got started with a toy drone that I got as a gift and was flying that around, really just a very simple quadcopter and realized that the brains of the thing looked very much like an arduino, simple input, and output and the microcontroller. And I had an arduino, but I got bored with it pretty quickly because there are only so many ways you can blink an LED. And I didn’t have any projects, project ideas. So I thought, well, I’ll just make a quadcopter flight computer, that would be pretty cool.

Tim: Did you see those boards by opening with a screwdriver?

Clay: What’s that?

Tim: Did you – open your machine, your quadcopter, by opening it with screw driver?

Clay: No, plastic, canopy or whatever, that just sits over. It’s really cheap, right? It just popped off. And so I can see it. In fact the wires that go to the motors are really thin and one of them broke. So I had to solder it back on to fix it, so I was already sort of tinkering with the hardware, had an arduino, started to learn about RC, which is PPM and PWM modulation and timers and [interops], and got all of that stuff working. But then realized that I didn’t want to build sophisticated applications that were just going to take a long time. So I discovered the open-source community has already built a lot of this stuff, there’s no need reinvent the wheel.

Tim: So on that basis, you really are concentrating more on the application layer rather than the flight control?

Clay: Yes, I am very much standing on the shoulders of giants here. I am writing applications that talk to the flight controller, but I am not trying to reinvent anything that the flight controller does to maintain stability of the vehicle and also provide some fail-safes and telemetry and things like that.

Tim: And that’s why you chose to use an add-on board rather than work directly with the onboard controller?

Clay: My original thought was to run the Autopilot directly on Linux because one of the career goals that I have for myself is to get more into embedded Linux development, so very low level driver-related issues, device-trees, that kinds of thing. And so I wanted to get actively involved with that, the problem is so I have a BeagleBone Black for instance which runs Linux, it’s a small little computer, but it doesn’t have any sensors on it, so I need to find a way to integrate an inertial measurement unit, 10 degree of freedom Sensor Package with that, as well as motor controls with very precise PWM output. And there are a couple of add-on packages that you can get for that, but the DIY Drones community and 3D robotics are working on sort of a formal solution for that called the PixHawk Fire, which is a cape that plugs into the BeagleBone Black and it’s got the IMU and the PWM and all that figured out, but it’s still under active development and they only have ever made like three or four of them at the time I got started. So I didn’t have access to anything like that. So I sort of abandoned the idea of running the Autopilot on Linux simply for practical reasons to get something up and running and just let the Autopilot do its thing and then brought the computer on to the side, talking to the Autopilot.

Tim: Computers are now small enough that you can actually do that without a huge sacrifice of weight.

Clay: Right, there is a lot of different Linux-based computers that you can get from the Gumstix, it’s really tiny. You can get – I was just looking at the Intel booth upstairs. I got the Edison, a really tiny computer. I’m using something a bit bigger, but also a bit more powerful called the ODROID-XU3, it’s a 8 core ARM-based processor with two gigs of RAM, and I chose that really just because I didn’t want to be blocked by a processor performance. That is about the biggest thing that I can find that would run on 5 volts and that wouldn’t be too heavy.

Tim: Talk a little bit about the software that’s running on that board?

Clay: Sure, so I have a stock Ubuntu 14.4 distribution. And then on top of that, I’m running the ROS Robot Operating System, the Indigo Igloo release of that which integrates nicely with Ubuntu, and then there is a MAV ROS package for the ROS that speaks the MAVLink dialect. So that’s the layer that communicates directly with the Autopilot. So there is a serial connection from the ODROID to the Autopilot. MAV ROS starts up, opens that serial port and then starts speaking the language and translates MAVLink messages into ROS messages, so then I have two ROS nodes that I’ve written, one of which looks at a camera image, trying to find the learning pad and the other drives the state machine to control the vehicle’s velocity by sending ROS messages to MAV ROS.

Tim: And ROS, I notice the central, the unit of communication....

Clay: Yeah, so MAV ROS really encapsulates all the nitty-gritty details and coordinate frame translations and all those things that you don’t normally have to worry about, although you wouldn’t want worry about. And XBUS is really simple for using Python, a really simple Python API, also a pretty simple C++ API to just send commands directly to the vehicle.

Lorenz, the guy who wrote MAVLink apparently describes it as the HTTP of drones and that’s what I use to describe it too. But it’s more than just a messaging format, it’s also a library. So it’s also the libcurl of drones, which is really going to be a key enabler I think. Hopefully more of the closed-source Autopilots will adopt MAVLink. I’m not sure they will, they don’t have really a whole lot of business reason to do that, but it would be nice if they did because then any fly computer that speaks MAVLink can be programmed using the same application, so it’s a key for portability. And once you get portability, then you can really grow your application base.

Tim: So, as you were describing, your hardware and the software layer on which you’ve written it, talk a little bit about the project that you’ve presented.

Clay: Sure. So, there is a lot of applications you could do with an autonomous drone. The Hello World! Application seems to be precision-landing. So, the quadcopters that are available today that have GPS integrated into their flight computers are pretty accurate, but only as accurate as GPS will allow them to be. And of course, there is barometer drift and other issues. So, if you want it to land at a specific point, you can tell the quadcopter to do that and it would be mostly right, but it would be off by a meter, two meters, something like that in the best case.

Tim: For people who don’t have drones, what sort of practical resolution do you want to achieve, what can you get down to?

Clay: What you’d like to do, especially, if you’re trying to dock with some other vehicle or maybe you’re trying to dock with a charging station or something... Some drones only have a 10 or 15-minute battery life. It would be a great application if you could automatically dock to the charging station. To do that, you really need centimeter level precision. And to get that, you need some sort of navigational aid. So, in addition to GPS, you can use GPS to get in the proximity of the landing pad and then you use a vision-based system or maybe an RF-based system to really localize the object, the vehicle relative to the pad.

So, in my application, I’m using a downward-facing camera, I’m using a machine vision grade camera, which has a global shutter, so it avoids some of the rolling shutter artifacts that you might get, but it turns out the vehicle doesn’t really move that quickly so that doesn’t really matter. But then looking down at the ground and then back projecting a point that I see in the image to real-world coordinates, so I can tell that the landing pad is one meter to the left, for instance, so that I can command the rover to – or the drone -- to move one meter to the left before it descends.

Tim: How do you minimize your chances of financial loss while you’re doing that? What are your safety measures so you don’t crash the drone

Clay: Yes. And my first flight which I attempted indoors in my apartment, which has concrete floors, had the Odroid mounted on top and it got a little bit out of control and flipped and landed on the Odroid and actually cracked the case and bent the circuit board and the circuit board no longer worked, so I had to get another Odroid. Since then, I’ve mounted the Odroid on the bottom of the vehicle where it tends to be more protected by the landing legs and other things, but the best way to not damage the drone is to not fly the drone. So, do all your early development in the simulator.

Tim: Exactly.

Clay: Yeah. Ardupilot and PX4 are the two open-source autopilots that I’m using. They both have simulation environments that are pretty much full-featured. You can talk MAVLink to the autopilot while it’s actually running on your desktop. And it’s getting fake sensor data, so – and fake sort of physics estimation so that it thinks it’s fine. And so it doesn’t really take my code through all of its bases. And then once my control games are tweaked roughly to the right order of magnitude, then I can take it out of doors into the final tweaking there.

Tim: Now, when you’re flying using a simulator, do you have to align, do you have to provide basically a select path that controls the flying programmatically or you fly it real time?

Clay: So, there’s a couple ways of doing it. I don’t have a joystick or anything like that. So, I’m not much of a gamer, so I really don’t have the ability to do much in terms of manual control, but that is one way that you can fly them around, so you can actually fly it around sort of like you’re flying something in a video game. For me, I just give very simple commands like go to this altitude and then go over here and then start the landing program. And at that point, it’s all automated anyway. And I guess that’s for me, the exciting part is the automated flying. To me, flying around manually, yeah, it’s a lot of fun. But that’s not the goal here, so I didn’t really invest any effort.

Tim: ___?

Clay: Right. I didn’t invest any effort in buying a joystick or anything like that.

Tim: How close where the simulations [naturally or experience]?

Clay: So, yeah, so I got everything working fine in the simulator, took it out into the field and nothing worked, literally nothing worked. I had problems with telemetry. I couldn’t get a reliable Wi-Fi connection, so I couldn’t see what the drone was seeing, that was the first problem. And then I discovered a problem where my software would give up every time I tried to land. It would get close to the landing pad and then it would just give up because I encoded it to be pretty conservative. I didn’t want it flying off, crashing into some neighbor’s house or something. So I made it very conservative. And my original thought was that I just made it too conservative. So while I was out in the field getting sunburned, you know, trying to SSH into my drone, I was tweaking the controller games and making it much more aggressive than it needed to be like, just telling it, okay go ahead and land even if you are moving at 3 meters a second, which is a bad idea, but just trying to figure out what was going on. And nothing I did would work. Finally after I got here to the conference, unfortunately, I figured out that there is an issue related to MAVLink heartbeat messaging such that my software was seeing heartbeat messages which indicate the state that the vehicle is in, not only coming from the vehicle, but also coming from the ground control station that I was using. So every half a second, it would oscillate between “I’m flying and I’m in automated mode” to “I’m not flying and I’m in some weird mode” back and forth, back and forth like that. And so my software was just confused, but that has since been fixed upstream in MAV ROS. So when I get home, weather permitting, hopefully the first flight will be successful. I have the video camera on hand, so you guys can see.

Tim: One final question. Are you happy with the drone that you used as a base?

Clay: Yes. I’m using the 3D Robotics IRIS+ which was just released around the time I got started in this project. I would have rather had a do-it-yourself kit to put together, but they were out of stock at the time, and I just needed to get something up and running. The nice thing about that kit is it comes with the batteries, the charger, the remote control. So they have all the infrastructure that you need, lot of DIY folks have their own set of tools already in. So they’re comfortable building a frame from the ground up. I am happy with the IRIS+. I did have to put slightly larger propellers on it to get a little more lift because once you start adding the computer and the camera and I have a laser range finder I want to add as well, so a bit of a payload issue, and the 10-inch props that come with the 3DR IRIS are maybe a little underpowered, so you just put 11 inches on there and you’re good to go.

This discussion has been archived. No new comments can be posted.

Embedded Linux Takes to the Skies (Video)

Comments Filter:
  • We urge you to read the transcript of this interview even if you prefer watching videos

    No-one prefers watching these videos.

    it contains material we left out of the video due to sound problems.

    You're not kidding about sound problems. The guy looks like he's mic'd up, but there's still a lot of background noise. And you can barely hear the questions he's being asked.

    Then, at 4m54s, the sound just stops. Silence, for nearly 30 seconds. Then, we're treated to 7 seconds of what sounds like a "busy machine" stock sound effect.

    C'mon, guys. You get paid to do this. As a job. I'd be embarrassed to get paid for this.

    Finally, though, this is frankly just a waste of video. It's just some guy, who, while he has things of interest to say, is just dryly answering questions. The video provides little or no content over the transcript.

    If you want people to enjoy Slashdot videos, give them something they'll want to watch.

    Oh, and get a fluffy hamster mic.

  • I am kind of surprised they are using Ubuntu on the devices. I work with embedded Linux as well and we usually use custom Linux distributions built using Buildroot, Yocto, etc.

    Don't get me wrong, I think Ubuntu is a fine desktop operating system, but there is a lot going on in the system that is unneeded for a flying robot. I personally use Ubuntu as my desktop development machine and do love it. But it is not a great system for drones and other embedded Linux projects.

    I'd prefer to scale down to exactl

  • Wasn't he in "Stop the Planet of the Apes, I Want to Get Off!" and "Man vs. Nature: The Road to Victory"?

  • by fred911 ( 83970 )

    Always a question. When's someone going to publish spec to allow control via GSM or any tethered connected device. Let US figure out the lag issues. Seems to make more sense than working on yagis or parabolics for signal or control.

      Yes Mom and Dad,,., I wana have a control link and see my device via a public network:-)

  • Waiting for the crashes.

Your own mileage may vary.

Working...