8 ms·
UFO: A Drone/UAV Programming Library for Rust
- durrrrrrrrrrrr 8y agoThe thought occurs to me, that if one were to combine a combination of stealth technology, quad-copter technology, autonomous piloting technology, and rocket booster technology, you's have all the makings for what appear to be legit UFO events.
- ingenieroariel 8y agoDoes it work with the 3dr solo?
- kam 8y agoNo, but https://github.com/3drobotics/rust-mavlink https://github.com/3drobotics/rust-mavlink would. The enterprise version of Solo actually ships with a Rust app running on the onboard computer for camera control, which uses rust-mavlink to talk to the autopilot.
- ingenieroariel 8y agothanks!
- bri3d 8y agoIs anyone working on flight controllers in Rust? Now that the STM targets are maturing it seems like a perfect target. I can only find stub projects and blog posts right now.
- Varcht 8y agoI've been on sabbatical for a while but a while back it was pretty much C, C or C.
- copterust 8y agothere is https://github.com/copterust/ https://github.com/copterust/, it's somewhat flying, but still a lot of work. we're in process of porting f3-eva repo to rtfm, so a lot of things are different now, and we have to rethink and reimplement a lot. we also working on writing drivers and supporting libs as we need them: we've implemented drivers for accelerometers, magnetrometers, pressure sensor, tof sensor, and ported dcmimu algorithm to rust.
- bri3d 8y agoThis is amazing and exactly what I was looking for, thank you! I had trouble finding it because I was searching for "quadcopter" and not "quadrocopter," I think.
- blt 8y agoA low level flight controller needs only statically allocated memory, so one of the main benefits of Rust is irrelevant. The syntax is still nice though.
- StavrosK 8y agoAnd the much more stringent error checking, as I don't want a null pointer making my quad mow people down.
- bluejekyll 8y ago> so one of the main benefits of Rust is irrelevant Not sure what you mean with this comment. Even in a context like this, Rust has a lot of safety benefits, but yes you don't have access to the stdlib, and are restricted to core.
- perennate 8y agoI think parent meant "one of the main benefits" = safety not as useful because anyway no dynamic allocations are needed to implement a basic flight control algorithm.
- bluejekyll 8y agoIt also helps with other references, shared mutability, UB, etc. Allocation and deallocation focuses on small sliver of safety, but yes, That’s not a concern in that context.
- vvillena 8y agoThere was a comment in another thread that talked about the benefits of using the ownership mechanism to control access to all the I/O. It's possible that Rust is useful to manage not just memory, but all kinds of hardware resources.
- Matthias247 8y agoAs someone who has reviewed, debugged and fixed ton of issues in embedded code before, I strongly have to disagree. There are tons of memory issues that can also happen without dynamic allocations. Invalidated pointers to the stack are a prime example. Multithreading issues (on an RTOS) another one. And forgetting to release resources (e.g. a RTOS mutex lock) is yet another one.
- m-ou-se 8y agoYes! I'm founder of a start-up (about 10 employees now) that makes flight controllers for Drones, and all the software that runs on them is written in Rust. We don't use STM chips though. Since the way we do state estimation and fault tolerant control requires a lot of computational power, we settled on 64-bit ARM Cortex A series processors. Since there was nothing available that fit our requirements, we produce the hardware ourselves as well. When we started a bit more than two years ago, we started in C++, but have been slowly switching to Rust starting less than a year later. Now that everything is in Rust, our productivity went up a lot, together with the reliability of our systems (which is our main selling point). The thing we miss most from C++ is the Eigen library, but the alternatives in Rust are pretty okay, though less complete. We are adding features and optimizations to some of these libraries, which we'll publish open source in a few months probably.
- janywer 8y agoDo you have a website?
- m-ou-se 8y agoWe do, but it's very minimal for now: https://dronesforwork.nl/ https://dronesforwork.nl/ We'll be changing our company name in a few weeks, followed by the launch of a new website which should have a lot more information than the current one.
- drewm1980 8y agoMe and the company I am at are on the fence with Rust because the type system still can't do Eigen but probably will eventually. I worry all of the current array libraries for Rust will go obsolete in a year or ten and Rust will only then start building up a convincing ecosystem for numerical computing.
- steveklabnik 8y agoGetting const generics finished up is on this year’s roadmap.
- leafario2 8y agoWhat hardware is required for this?
- bri3d 8y agoAs the README indicates, this is a networking client library to control JJRC H61 drones over their built-in network control protocol, with the goal apparently being to abstract over the control protocol for a variety of drones.
- heyoni 8y agoYou’re trying hard to get the word out on Rust. Are you affiliated with the project in any capacity?
- formalsystem 8y agoNot really, I'm just a fan of the ideas in Rust and it's nice to see codebases that do interesting stuff.
- heyoni 8y agoTwo of your posts came up on the front page and set off some alarms in my head
- formalsystem 8y agoYeah I've been researching Rust a bunch for my own projects. Mostly around doing efficient reinforcement learning and physics engines so I've been finding lots of cool repos as I research.
- heyoni 8y agoI want you to know, that...know this, what you're doing is totally fine :)
- moosingin3space 8y agoWhy exactly does HN always accuse Rust-related posts of astroturfing? This is completely bizarre to me.
- heyoni 8y agoThere are two posts from the same person on the front page linking to rust repos. It’s not insane to ask.
- deleted 8y ago
- erdleerdle 8y agowould love to talk to anyone that is big into drones and video. live streams of builds, etc.
- copterust 8y agohere is our old video of maiden flight https://twitter.com/copterust/status/1024724881680867328 https://twitter.com/copterust/status/1024724881680867328
- impostir 8y agoSeems cool, especially since I know nothing about programming drones. I was glancing through the code, and ibwas wondering if there was particular reason you split flight commands into UDP and camera controls into TCP. As I said I know nothing about drone programming, sorry if it is obvious.
- saidinesh5 8y agoHi, Not the maintainer of the above library, but this seems similar to a reverse engineered library for a couple of other chinese wifi quads. Someone created a chrome app for their specific model a couple of years ago, and their notes are available here [1]: > The commands are simple 8 byte packets sent continuously over UDP. > The drone creates an unprotected wireless network and streams live video to an android or ios app named 'RC-Leading' (there are dozens of near-identical apps from the manufacturer) > The drone's IP is always 172.16.10.1 > I've captured the communications between the drone and app and there seems to be several rounds of back and forth of ~100 bytes worth of non-intelligible data over the TCP 8888 port before the video streaming begins (I assume this is some kind of app level handshaking) > It streams unencrypted video over TCP port 8888 (I can view video frame info using ffprobe on captured packets) There was a similar hackaday project for this [2] and some of their notes are at [3]: 1) https://www.reddit.com/r/HowToHack/comments/4512il/how_to_hack_ip_camera_in_toy_drone/ https://www.reddit.com/r/HowToHack/comments/4512il/how_to_ha... 2) https://hackaday.io/project/56102-reverse-engineering-a-drone https://hackaday.io/project/56102-reverse-engineering-a-dron... 3) https://steemit.com/drone/@highonapples/reverse-engineering-a-drone-from-amazon-to-make-it-programmable https://steemit.com/drone/@highonapples/reverse-engineering-... (edited for formatting)
- ada1981 8y agoThis is awesome! If anyone is interested in the software side of things, we have a fabrication team and facility in the Pittsburgh area (proximity to CMU) right near an airport. Early stage exploration of building personal transport drones. Looking into a cooperative / holocracy type model. We could use some strong engineers in our group!