Hey all, I finished porting over CDR from a typescript implementation. This is the core serialization piece of ROS2. Turns out it packs data similar to structs in most C compilers with padding/alignment roughly the same. There's a header with endiannes information, but it's pretty simple. Most all the tests have been ported and are green!
The repo is in EmbeddedNim under ros_cdr but not (yet) on nimble. I view robotics as embedded, so it makes sense to me.
I'm using porting the Foxglove typescript ROS2 implementation to Nim to help learn the details of ROS2. Personally, I find it's the quickest way to become proficient in a complicated system like ROS2. The typescript version is much clearer than the core C-based roslibs. Typescript ports well to Nim -- despite the fact that I've never programmed in it.
I recall others discussing ROS/ROS2 before. I plan to keep porting over the core bits needed to run a ROS2 node as long as the holiday season doesn't get too distracting. If others are interested feel free to join in!
Here's the rest that's needed to run a pure Nim ROS2 node:
Hey guys, it's been a while but I've started making progress on this again. Instead of making a pure Nim implementation I've start wrapping the ROS2 libraries. They're all auto-generated using a new tool for automating c2nim.
So far I've created wrappers for:
and soon:
Currently they only include the C wrappers and a test to ensure the Nim code compiles, but not that they actually function.
I'd like to make a nice Nim library that wraps the raw C api's. I'd also like to setup a pure Nim implementation of the ROSIDL since that'd simplify making custom messages.