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

Add the support of actions in ROS2 #2

Open
minggangw opened this issue Mar 29, 2018 · 4 comments
Open

Add the support of actions in ROS2 #2

minggangw opened this issue Mar 29, 2018 · 4 comments

Comments

@minggangw
Copy link

Dear @chris-smith and @IanTheEngineer ,

As ROS community has released ROS2 Ardent Apalone and keeps a swift iteration of it, I think it is the time we should add more features into it and promote the web solution in ROS2 ecosystem.

In the design document of ROS2, it mentioned that

ROS 2.0 could either implement services and actions on top of publish-subscribe (this is more feasible in DDS because of their reliable publish-subscribe QoS setting) or it could use the DDS RPC specification once it is finished for services and then build actions on top, again like it is in ROS 1.x. Either way actions will be a first class citizen in the ROS 2.0 API and it may be the case that services just become a degenerate case of actions.

The actionlib_nodejs has implemented the functionality of actions on top of rosnodejs in JavaScript language, and rclnodejs is a Node.js client for ROS2 based on rcl library. I think we could collaborate together to integrate the current actionlib module into ROS2 and achieve the same functions in ROS2 as ROS1.x does. We could be the first one who implements this feature by JavaScript in ROS2:smile:

So I'd like to submit a task that begins to migrate the current actionlib to support ROS2 and track it through this thread.

Yours sincerely!
Minggang

@minggangw minggangw changed the title Add the support of actionlib in ROS2 Add the support of actions in ROS2 Mar 29, 2018
@chris-smith
Copy link
Contributor

Hi Minggang!

Sounds great! I think the first thing we need to figure out is how actionlib is going to be exposed to users (#1). rosnodejs already exposes actions on its own to some degree - this is a bit different from other ROS 1 client libraries but actions are essentially part of the core communication people expect and so I thought it made sense to expose it there.

I'm not sure which direction client libraries in ROS 2 are going or if they've even started. From that design doc, it sounds like they're expecting to expose actions directly in rclcpp, etc though. My main thought is that actionlib_nodejs would not be directly exposed to users, but that it provide a common backend for rosnodejs and rclnodejs to bind to and expose on their own or through separate libraries.

e.g. rosnodejs depends on actionlib_nodejs to expose actions
OR
A new actionlib_rclnodejs depends on actionlib_nodejs and rclnodejs to expose actions

To some degree actionlib_nodejs will need to be configured with the relevant client library. I just put up a pull request (#3) that does this kind of thing, though I'm unsure how well everything in there scales to ROS 2.

@minggangw
Copy link
Author

Hi Chris, I think it's feasible to expose actions through rosnodejs or rclnodejs, and we'd better define an interface which can isolate the differences of rosnodejs and rclnodejs (like the current ActionServerInterface).

I will investigate the possible implementations in ROS 2 by rclnodejs first.

@minggangw
Copy link
Author

Hi @chris-smith, I am glad to tell you that the actionlib has been integrated into rclnodejs client for ROS 2.

During the implementation, I found that some incompatible cases can not be eliminated, so I forked this repo and made some small changes to adapt to the interfaces of rclnodejs. The interfaces of client/server were implemented in rclnodejs and exposed through it.

What's more, I added a simple example to demonstrate the usage and a tutorial. As the actionlib has not been supported by the community officially in ROS 2 and it will be implemented in Crystal Clemmys, I marked it as experimental temporarily. The unit tests are being written.

Thanks for your work, it's a great example of collaboration. By the way, will you attend the ROSCon in Madrid? I could thank you in person then 😄

@chris-smith
Copy link
Contributor

Hi @minggangw! Great to hear you were able to get actions going in ROS 2!

I won't be able to make it to ROSCon unfortunately - looks like it should be a good program!

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

2 participants