This blog has moved to live.com:
Please go to http://anjdreas.spaces.live.com/ .
Thank you!
A project blog for developing a drone simulator. Physics and behavior for different aerial drone vehicles are implemented, and in particular small R/C helicopters. Control logic can then be written and tested out in a safe environment that approximates the real world in terms of physics, to make it easier to develop real autonomous aerial drones.
The second video clip shows flight in higher velocities to demonstrate the air resistance in the physics model. I'm currently using the drag equation for objects in high velocities. I could probably have used the Stokes' drag model which is simply a linear increase of drag over velocity, but one of the goals for this project is to achieve a high level of accuracy on the physics model.
To decide what drag model to use for the air friction vs. the fuselage (ignoring rotors for now), we must calculate the Reynolds number for air that passes around the fuselage at given speeds.
The Reynolds number is defined as:I eventually found time to fiddle with this project again. But once I get to sit down with it I usually find my self fiddling with stuff that ain't even remotely relevant to my thesis.
But hey, as long as I'm a happy puppy..!
In the screenshot you'll see the graphics are coming along pretty nicely since last update. I'm just getting into shaders and XNA, and have picked up some neat tricks from blogs and articles all over.
I really like how the terrain and the skydome blends neatly together with the atmospheric fog effect! The helicopter is still using its own basic shading until I find a way to easily apply the sunlight to all my game objects. Oh wait, I mean simulator objects..
Nothing new on the autopilot yet. I'm still working on a framework for using sensor feedback to estimate the state of the helicopter, but there's some distance to go yet. Besides it would be boring to do all the work now and have nothing to do when the thesis starts in September.
If my spare time continues to be awesome this summer I'll expect to get a few more updates out here soon enough.
After organizing the code a little I am now able to render multiple helicopters and use the same control logic on each. Since they already know how to navigate towards a goal, I thought it would be cool to see how they work in a formation. I do this simply by setting their goal to a relative offset from the target helicopter (the one I am navigating with my joystick).
As you can see in the vid they will try their best to hold the circle formation, but if I move too quickly they fall behind because the PID values are not aggressive enough as they are coded for smooth movements.
No sensors yet though, that's up next!
Alright, first words of my blog for the Autonomous Aerial Drone Simulator project.
The project is part of my Masters thesis in computer technology, which starts this fall and ends next spring. The simulator will feature a simplified physics environment for aerial vehicles, in particular a model for small radiocontroller helicopters will be implemented. Using the simulator it is possible to see how control logic performs in an approximation to reality, and adjust accordingly. It is so much cheaper to crash in virtual life. :-)
Eager to start I have already implemented some initial code for simple physics and helicopter behavior. It works pretty well even without considering air physics, and the helicopter can be controlled using a regular R/C helicopter joystick with a PC cable that ships with most helicopter models. This actually turned out to be a decent R/C simulator to practice flying those things in.
I have also implemented some initial control logic for navigating to a waypoint. Using PID loops (the I is not very much used yet) adjusted to the environment, and using perfect knowledge of position, velocity, forces and orientation of the helicopter the autopilot is by now able to:
- Hover
- Navigate to a waypoint with nose pointing in arbitrary direction
- Come to a halt at a waypoint
- Navigate with intermediate waypoints by passing through them
Although it can't land yet, it has infinitely amounts of fuel so it shouldn't be a problem in the near future.
In the screenshot above you can see the visual presentation so far. Although the graphics is not a focus in the project, I gotta admit it is hard to give a crap too. I will probably add quite more details as the project progresses and I tire of coding control logic and AI.