I got a really good question sent to me, and I’d like to archive the response here…
I mostly use Go (previously Java) and am exploring Rust for unmanned systems, particularly embedded work and autonomy like navigation and perception. Given your domain expertise, I’d love to hear your perspective:
I’m bullish on Rust long term. If you’re coming from Go/Java, then you’ve already got the “backend” covered, and a lot of robotics happens in “backend”-like code. So, rust here is more of a curiosity / lateral move for you. Great to try, not required. You could start right now by developing implementations of robotics-like things and making a backend.
Very little “solving” happens on small machines, it happens on on-system servers running in docker, usually. The small computers do little things, usually. So, you can definitely get started with pathfinding, optimization, mapping, image processing in Rust right now, and build small automous systems that mostly live in something you’d call a “backend”. Then plug a webcam in, and hit your “backend” with imagery and you’re off to the races.
If you’re more interested in “robotics systems”, then there’s really no substitute for learning ROS. While ROS is a bit dated, and most serious shops built their own version, ROS2.0 has a bunch of normal practices in it, and every custom robotics framework is defacto compared to ROS2.0 nowadays. This implies C++ and CMake, it’s really hard to get around that. Though there are Rust wrappers and ROS2.0 Rust compliant messaging libraries.
If you’re more interested in “on the metal” code, then ROS2.0 is still relevant, but we’re more into the firmware level things. C is the king here (still). Firmware generally does very little more than manage custom hardware like motors, low level sensors, etc. It often doesn’t do the “thinking”.
So if you’re looking to get into robotics, C and C++ are still the industry breadwinner.
Rust is a great language for this domain, but the libraries and industry adoption is lagging a little. There’s just no serious reason to rewrite your entire stack in Rust at this time, when robotics products are not very mature yet. I definitely have seen production Rust code that flies in warzones, so it does exist, but it’s commonly an outlier.
One huge benefit of Rust that is often overlooked is the immediate compatability of types, build systems, and dependency management across the firmware, system, and backend. This is what will eventually cause Rust to catch up to C++, but it may never replace it and doesn’t need to.
Comments
I have not configured comments for this site yet as there doesn't seem to be any good, free solutions. Please feel free to email, or reach out on social media if you have any thoughts or questions. I'd love to hear from you!