5 ms·
Dimforge is really doing god's work. I would be so excited if nalgebra + Rust can replace Eigen + C++ for robotics stuff like localization and mapping.
by porphyra 3y ago
Dimforge is really doing god's work. I would be so excited if nalgebra + Rust can replace Eigen + C++ for robotics stuff like localization and mapping.
- accurrent 3y agoYes! Ive been working mostly in rust recently for robotics projects. The amount of time our industry wastes on C++isms is ridiculous where rust just works. Unfortunately theres an old guard that refuses to let up and invest in rust. Tbh there is a huge industry aroumd C++ robotics code so I can see why.
- iExploder 3y agoCompanies barely have enough time and money to keep developing their already existing 10+ yrs old tested and "working" codebases as is, how would anyone switch to a whole new language at this point?
- abricq 3y agoMaybe not converting legacy code, but starting new projects in Rust ! At my robotics company (where I lost so many hours compiling overly-templated code in C++), I was able to convince my boss to start a new small product in Rust (was an internal simulation tool) and it convinced him to let me work on another new product a few month later, also in Rust, on a much bigger scale. He had only ever worked in C++ before, and I guess he doesn't mind to loose hours compiling and fixing memory leaks. But regardless, it worked and now I can work (a bit) in Rust.
- robertlagrant 3y agoThat's great - I mostly work in Python now and I came from the Java world. My first paid Python project was from that time - a little data munging script I was allowed to write in Python.
- accurrent 3y agoIm in a similar position to you. My manager loves rust, so Im fortunate... Weve been developing new tools in rust. Some greybeards actively oppose it though. Im not asking for rewrites but at least new stuff should be written with more modern tools. Rust aint perfect but its hell of a lot better than C++ and CMake magic. My experience has been we can build features far faster with rust than C++ and we deal with legitemate bugs not "which idiot forgot to check the bounds of this array?". I think the biggest pitfall for rust howver is its difficulty in interoping with C++ and the unstable ABI (given how much the robotics community love C++ plugins...).
- throw10920 3y ago> The amount of time our industry wastes on C++isms is ridiculous where rust just works. This implies that Rust doesn't have any problems, which is...crazy. In addition to the problematic community, just rearchitecting your code to fit around the borrow checker can be a massive amount of work, which already makes it infeasible for use in some places where the primary work is not on greenfield projects but on legacy code. > Unfortunately theres an old guard that refuses to let up and invest in rust. ...and this is just emotionally manipulative, in addition to incredibly dishonest about the problems that Rust actually has.
- abricq 3y agoI want to make this happen ! Do you know of any good robotics framework in Rust, as of today ? I heard that ROS2 was slowly including Rust [1], not sure at how did it go. Ros would be a good entry door to sensor fusion, mapping and localization. Because all of the hardware integration / abstraction is already done (in C++). I'm curious to know if company are using this. [1] https://github.com/ros2-rust/ros2_rust https://github.com/ros2-rust/ros2_rust
- singhrac 3y agoMaybe the folks at Rerun [1] know something about it? I imagine at least some of their customers are Rust robotics shops. [1] https://github.com/rerun-io/rerun https://github.com/rerun-io/rerun
- fvncc 3y agoYou can also check https://github.com/sequenceplanner/r2r https://github.com/sequenceplanner/r2r for another example of ROS2 bindings (using in production at work for a couple of ROS nodes). But TBH, in a Rust world, it’s worth revisiting the assumptions behind the ROS node architecture, since Rust is so strong at scaling to large monolithic applications (due to the strict hierarchical code patterns it encourages). A transitional Rust approach, that doesn't try to reimplement everything from scratch, could do something like a strangler pattern: Take each ROS node, run them separately in “jails” with a Rust API around each one, then implement the plumbing/management logic in pure Rust.
- porphyra 3y agoYeah the ROS node architecture sucks. However, one reason for that design was so that you can run ROS on distributed systems where things communicate to each other over the network.
- fvncc 3y agoActually another reason people use the architecture is for process level isolation, i.e. limiting the blast radius of memory corruption. But in both cases, Im sure you could design an ergonomic RPC framework that takes care of offloading computation mostly transparently behind the scenes :)
- p4ul 3y agoYes! I couldn't possibly agree more; this is truly my fondest wish!