For what ever it's worth, I'm experimenting with converting the APM2 to a sensor suite that plugs into a higher level computer (such as a gumstix overo, beagleboard, laptop, desktop, etc.) My approach is to use the "library" portion of the ArduPlane code to simplify accessing and managing all the hardware sensors, but write my own setup() and loop() functions that (for the most part) just read the hardware sensors through the library API and write the output into a straightforward binary/checksummed packet format that my actual flight computer can parse.
I have some well developed autopilot code that runs on a a linux gumstix (or just about any other posix system) but I'm in need of some sensors to test with.
I realize there are any number of ways you can combine all the possible pieces together to get a solid autopilot, and there are any number of engineering decisions and choices that we face along the way, but for me I enjoy the bigger head room that a higher end linux computer offers, so this is the route I'm taking.
It's not too complicated to 'assemble' the code from scratch though. Using the existing libraries to get attitude, position, and user readings and then using that to manipulated servos outputs and what not is not too hard and a good opportunity to better understand what the devs are up to when looking at the source code. It looks a little messy and a bit hard to follow to the untrained eye (noobs like myself), but if you try and 'assemble' the code yourself, you'll quickly grow an understanding and appreciation for the structure and logic of the dev team.
This is what I've made for the sake of learning Ardupilot code:
Yeah I have nothing wrong with the code. Its so good I have nothing to add. I dont just want to buy a uav and assemble it. I would like to make it a project and learning experience. Is it really that complex? I was just going to do it piece by piece. Like start with just fly by wire, then telemetry, then basic mission planner, then stabilization, then like a digital fence/border then waypoints, then complex mission planner. Something like that. Start basic then just add on. I will be using the current code as a huge reference. How long do you think this will take?
I've written a lot of code portions to expand ArduPlane to a particular project that I'm involved, mainly to add rpm sensors and temperature sensors. I also have added more Mavlink messages to send the additional data to QGroundcontrol.
Personally, I found the system very well designed and structured and I don't recommend you to write the whole code from scratch. If you think there is something missing, you can expand the code and make it capable of doing what you want as I did. That is the most exciting and fascinating point of opensource: you can change it as you want!
Lot's of folks are writing portions of code from scratch.The current Ardupilot dev team consists of about 5-10 expert programmers and another 10-15 people contributing code. Same for multiWii and other full autopilot projects. I guess it depends on what you are trying to do. If you have an application that truly requires a complete custom application that is very different from ArduPilot or, you think the ArduPilot code is so junky it needs a full re-write ;-) it could make sense. If you want to do it as merely a learning experience you might want to start with something still challenging but a bit less ambitious like modifying the existing code to do what you want so you can achieve it in some reasonable timeframe.
Replies
For what ever it's worth, I'm experimenting with converting the APM2 to a sensor suite that plugs into a higher level computer (such as a gumstix overo, beagleboard, laptop, desktop, etc.) My approach is to use the "library" portion of the ArduPlane code to simplify accessing and managing all the hardware sensors, but write my own setup() and loop() functions that (for the most part) just read the hardware sensors through the library API and write the output into a straightforward binary/checksummed packet format that my actual flight computer can parse.
I have some well developed autopilot code that runs on a a linux gumstix (or just about any other posix system) but I'm in need of some sensors to test with.
I realize there are any number of ways you can combine all the possible pieces together to get a solid autopilot, and there are any number of engineering decisions and choices that we face along the way, but for me I enjoy the bigger head room that a higher end linux computer offers, so this is the route I'm taking.
It's not too complicated to 'assemble' the code from scratch though. Using the existing libraries to get attitude, position, and user readings and then using that to manipulated servos outputs and what not is not too hard and a good opportunity to better understand what the devs are up to when looking at the source code. It looks a little messy and a bit hard to follow to the untrained eye (noobs like myself), but if you try and 'assemble' the code yourself, you'll quickly grow an understanding and appreciation for the structure and logic of the dev team.
This is what I've made for the sake of learning Ardupilot code:
Good luck, and happy learning.
Yeah I have nothing wrong with the code. Its so good I have nothing to add. I dont just want to buy a uav and assemble it. I would like to make it a project and learning experience. Is it really that complex? I was just going to do it piece by piece. Like start with just fly by wire, then telemetry, then basic mission planner, then stabilization, then like a digital fence/border then waypoints, then complex mission planner. Something like that. Start basic then just add on. I will be using the current code as a huge reference. How long do you think this will take?
Hello,
I've written a lot of code portions to expand ArduPlane to a particular project that I'm involved, mainly to add rpm sensors and temperature sensors. I also have added more Mavlink messages to send the additional data to QGroundcontrol.
Personally, I found the system very well designed and structured and I don't recommend you to write the whole code from scratch. If you think there is something missing, you can expand the code and make it capable of doing what you want as I did. That is the most exciting and fascinating point of opensource: you can change it as you want!
Pedro
One other point
Hi,
Lot's of folks are writing portions of code from scratch.The current Ardupilot dev team consists of about 5-10 expert programmers and another 10-15 people contributing code. Same for multiWii and other full autopilot projects. I guess it depends on what you are trying to do. If you have an application that truly requires a complete custom application that is very different from ArduPilot or, you think the ArduPilot code is so junky it needs a full re-write ;-) it could make sense. If you want to do it as merely a learning experience you might want to start with something still challenging but a bit less ambitious like modifying the existing code to do what you want so you can achieve it in some reasonable timeframe.
Cheers,
Ron