Open mikelyndersOKCC opened 4 years ago
Thanks for your question, I'd like to talk about the history of actionlib feature first
In ROS1, there was no concept of middleware, so each client implements its own version of actionlib achieved by client/service.
In ROS2, we have a middleware named rcl, clients of ROS2 must wrapper this C library and expose the interfaces through different languages, e.g. C++/Pythons/JavaScript:
Based on the background, some comments below:
What would it take to get this functionality?
The rclnodejs should implement the actionlib feature
How could one assist in the effort to support ROS2 Actions in ROS2-web-bridge?
We have to support it for rclnodejs first
Would ROS2 actions need to be implemented inside roslibjs using the topics and services that are already supported by ROS2-web-bridge and the rosbridge v2.0 protocol?
As the rosbridge v2.0 protocol doesn't support actionlib concept, so we may extend it if we want to support it (the corresponding changes may be made to roslibjs also).
Should actions support be implemented in rclnodejs first and then rosbridge v2.0 protocol be extended to support actions in some way?
That's correct.
There is already an open issue - https://github.com/RobotWebTools/rclnodejs/issues/469 to record this feature, so if you are willing to contribute to the implementation, you can submit your PR there. Currently, the rclnodejs still has a gap with Python/Cpp clients, see https://github.com/RobotWebTools/rclnodejs/issues/498, please feel free if you are interested in any of them, thanks!
Thanks for the explanation! I understand much better, I will take a look at RobotWebTools/rclnodejs#469 as well as the guidelines in RobotWebTools/rclnodejs#498 to determine if this is something I might be able to contribute to!
Looks like actions are now supported in rclnodejs. Would extending the rosbridge protocol be the next step?
On a related note - is the 'rosbridge v2.0 protocol' meant for ROS2? Or is it the second iteration of a protocol designed for ROS1?
Looks like actions are now supported in rclnodejs. Would extending the rosbridge protocol be the next step?
Yes, rclnodejs now supports actions, but we haven't had plan to extend the rosbridge protocol yet.
On a related note - is the 'rosbridge v2.0 protocol' meant for ROS2? Or is it the second iteration of a protocol designed for ROS1?
It stands for the 2nd version of rosbridge protocol for ROS1, that's is why it's difficult to extend to ROS2.
Hi, I make website and use ros2-web-bridge to connect with ros2, I have problem on navigation2 because I can't use actions roslibjs and can't get result or feedback if I send pose direct via geometry_msgs/msg/PoseStamped.
Can anyone help me for solution for these problem ? Would better way I should do ?
Currently, ros2-web-bridge
doesn't support the actions feature for ROS2, because the way of implementing action in ROS2 is different from ROS1 and roslibjs
is designed for ROS1. The rclnodejs
acts as the back-end for ros2-web-bridge
and ros2-web-bridge
acts as a kind of bridge to connect the web and the ROS2 nodejs client (rclnodejs). You could consider it as a proxy to send/receive messages to/from the web server.
Currently,
ros2-web-bridge
doesn't support the actions feature for ROS2, because the way of implementing action in ROS2 is different from ROS1 androslibjs
is designed for ROS1. Therclnodejs
acts as the back-end forros2-web-bridge
andros2-web-bridge
acts as a kind of bridge to connect the web and the ROS2 nodejs client (rclnodejs). You could consider it as a proxy to send/receive messages to/from the web server.
Thank you for explain. I understand now between rclnodejs and ros2-web-bridge.
@spygibas did success to manage it? i have the same issue? any good advice?
@spygibas did success to manage it? i have the same issue? any good advice?
rclnodejs acts as the back-end server at location robot , not same as roslibjs it at location on server website if you need use need to make conversation between rclnodejs first
@spygibas many thanks for you replay imaybe you can help me, i tried to run the following example but i got a error that the "https://github.com/RobotWebTools/rclnodejs/blob/develop/example/action-client-example.js"
any idea? i trying to use the rclnodejs for action and send a goal, but unfortently i issue with that. did you success to run a action?
@nadavis Hi, I suggest you to use these https://github.com/open-rmf/rmf-web for demo test https://github.com/open-rmf/rmf_demos
@spygibas Many thanks!!!!
I have created a ROS2 package that implements ROS2 Actions and it would be great if I could call them through my webapp interface. Unfortunately, it seems ROS2 Actions are not supported yet.
What would it take to get this functionality? I have gathered that there are a couple reasons why this might be hard:
How could one assist in the effort to support ROS2 Actions in ROS2-web-bridge?
Would ROS2 actions need to be implemented inside roslibjs using the topics and services that are already supported by ROS2-web-bridge and the rosbridge v2.0 protocol? (I think this is more or less how roslibjs implemented the actionlib support)
or
Should actions support be implemented in rclnodejs first and then rosbridge v2.0 protocol be extended to support actions in some way?
I'd love to help in any way I can. I'm fairly new to ROS so please correct me if I'm misunderstanding.
In the meantime I will likely change my ROS package to provide the same functionality with a long-running service. (I know that is bad as services are meant to 'return quickly' but I'm not sure how else to do it)