Skip to content
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

Any plan to support ROS2? #29

Open
gc-robotics opened this issue May 10, 2021 · 3 comments
Open

Any plan to support ROS2? #29

gc-robotics opened this issue May 10, 2021 · 3 comments

Comments

@gc-robotics
Copy link

No description provided.

@TimWhiting
Copy link
Collaborator

TimWhiting commented May 11, 2021

Hi, I've worked on it occasionally, (using dart:ffi, and package:ffigen) but have not had much time to really invest in it. I'm just using ROS1 Melodic at work right now.

However, I've just open sourced and made visible the work that I've done at https://github.com/TimWhiting/rcldart. Please feel free to contribute. The following two issues in Dart would make the implementation and use simpler. Please upvote.
dart-lang/sdk#44768
dart-lang/sdk#35770

The main problem right now is that you would have to remember to manually call some deallocation function, to make sure none of the c memory leaks. Since this is common in dart (dispose method of flutter widgets / etc), I'm sure we could get used to it, but it would not be very ROSy. The second github issue above is for finalizers in dart for native memory that we allocate and would be very helpful. Discussion about how the finalizers would work is in this issue: https://github.com/dart-lang/sdk/issues/45455

I've been mostly going off of the C++ implementation https://github.com/ros2/rclcpp. Starting with just the basics, any help in copying the class interfaces, and starting the dart implementation of the methods would be great. The C bindings are currently generated off of the ROS eloquent headers.

Anyways there is still a lot of work to be done. I'd also like to at one point provide a roslib layer for web compatibility implementing the same interface, but again, I don't have the time right now.

@JAICHANGPARK
Copy link

@TimWhiting Nice works !

@TimWhiting
Copy link
Collaborator

Finalizers should be available soon, which should make ros2 bindings much easier.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants