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

Capture with ROS Action Client and Server #70

Open
waiyc opened this issue May 13, 2022 · 3 comments
Open

Capture with ROS Action Client and Server #70

waiyc opened this issue May 13, 2022 · 3 comments

Comments

@waiyc
Copy link

waiyc commented May 13, 2022

Any plan to include ROS action client and server as an alternative option for capturing data from Zivid camera?
Due to the fact that the data capturing time varies depends on the capturing setting, it is better to use action over service? As we can expect the action server to return the capturing result or we can choose to preempt it if we need to.

@torbsorb
Copy link
Contributor

Hi @waiyc,

As far as I understood the major difference between action and service is that actions are asynchronous, whereas services are synchronous. I can understand why it would be interesting for you, but

  1. The APIs that our ROS-services map to are synchronous today
  2. It is possible for a user to make the call asynchronous via threads, mutexes and signals.
    Adding actions now might bring value, but would extend our API beyond what's provided in the core language. I believe it's more important to make sure that we have full coverage of our APIs, and work on potentially providing asynchronous functionality in the core language first. Then, once that's available it makes sense to support actions.

@waiyc
Copy link
Author

waiyc commented May 17, 2022

Hi @torbsorb ,

Thank you for the reply. My main intention is to increase the "certainty" in knowing when the capturing process is done or failed.
Currently, there is no response/feedback to tell the client that the server has completed the capturing. The only way to know the capturing process is completed is by subscribing to the image topic, is my understanding correct?

@apartridge
Copy link
Collaborator

Hi @waiyc.

You could wait for the image or point cloud topics, but it would be better to check the return value of ros::service::call() function (if you use C++ API) or rospy.ServiceProxy for the Python API. These functions should be blocking until the capture service is finished and has returned either true or false.

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

No branches or pull requests

3 participants