-
Notifications
You must be signed in to change notification settings - Fork 44
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Feature request: C++ support #126
Comments
This issue has been mentioned on ROS Discourse. There might be relevant details there: https://discourse.ros.org/t/ros-2-embedded-wg-meetings/15460/20 |
micro_rclcpp: a C++ API for micro-ROS
Alternative: Benefits:
Limitations:
Summary micro_rclcpp Benefits:
Limitations:
|
Questionnaire to micro-ROS users
Looking forward to your feedback. Thank you. |
This thread is looking a little sparse, I missed the meeting but I'll throw my opinion in I've normally avoided C++ for microcontrollers because of how easy it is to accidentally pull in Arduino in relies heavily on std::string and permits concatenation and deep copy; It's often ok even if it's not desired for performance. I would like to see more type-safety in RCLC; it's getting tedious writing endless functions that take only I'd really really want to see strongly-typed callbacks, and I would make extensive use of RCL offers allocation pointers and defined allocator structs, I'd personally default those to no-allocation, but I would want to see the custom-allocator feature of RCL exposed in micro_rclcpp as it is in rclcpp because of the zero-cost abstractions it offers. Tangentially, I'm also interested in a Rust wrapper but that might be easier to build from scratch. |
This issue has been mentioned on ROS Discourse. There might be relevant details there: https://discourse.ros.org/t/ros-2-embedded-wg-meetings/15460/22 |
Example for C++ type support:
Demonstrated in rclc_examples/example_pingpong: #199 |
Hi I was not able to make my mic work during today's meeting, so I'll add my few cents here. We already work having wrappers on top of rclc or rcl depending on the use, and our biggest "struggle" is that we saw ourselves forced to make singletons to somehow get access to a class method during a callback (this was basically solved with the introduction of the context pointer). Regarding RUST, it's interesting, but far from being mature enough to use it on product development. |
@bjv-capra Thank you for your feedback. Regarding the access to class members, as you mentioned, we have now subscriptions with context pointers. Apart from access to class members (which should be solved), I see as main development points:
|
This issue has been mentioned on ROS Discourse. There might be relevant details there: https://discourse.ros.org/t/microxrce-dds-on-ardupilot/29972/8 |
We have received a number of requests to provide a C++ API for micro-ROS. Therefore we would like to discuss how to develop a C++ API for micro-ROS as a community effort. The default rclcpp API uses dynamic memory allocation (STL containers) which is problematic for micro-controllers due to memory framentation and potentially allocating more memory than available. Completely re-writing rclcpp would be a large effort, therefore we see two basic strategies:
The decision might also depend on the requirements for such a C++ API. So please feel free to join the next EWG meeting on 27th July 2021 to share your opinion:
https://discourse.ros.org/t/ros-2-embedded-wg-meetings/15460
You are also welcome to comment here below.
The text was updated successfully, but these errors were encountered: