-
Notifications
You must be signed in to change notification settings - Fork 11
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 Service Call capability #35
Comments
that would definitely be something if we could enable services and actions. would have to do some research how difficult this would be... |
so, ros services is just an array, whereas topics is an object with an array (RobotWebTools/roslibjs#363)... so stay true to roslibjs and just pass through the array, or add the functionality so that topics and services act the same? (I chose the later to get it to work):
so instead of [... , ... , ... ] you get [{...}, {...}, {...}] returned... either way is probably fine, OCD in me likes the later to match the topic return... but you are not really getting any more information, since we are just arbitrarily adding type:"service" as another key:value element... but you already "know" that because of the react-ros variable is called "services"! |
I tested the function above and it seems to work... this "may" work if we want to be purists and just return the array:
|
This works for a simple "clear" command to the turtlesim... not sure how to "universalize it" within react-ros:
instead of "listeners", could create an array of "servicers"? would be nice if react-ros returned a function call, so to send the service call, you would just call it, i.e. ( |
for a "/kill" service to the turtlesim, the request becomes
so it will get challenging to incorporate something "easy"... maybe a function that accepts arguments (defaults to none) and leave it to the user to figure out how to use it... because the arguments can get pretty complex! http://wiki.ros.org/roslibjs/Tutorials/Writing%20a%20dynamic_reconfigure%20client%20with%20roslibjs
|
@jaguardo this one too? |
No issue, actually making a service call is going to be pretty involved (getting the list is not bad)... not sure if it is worth it. |
Should be similar to Topic?
The text was updated successfully, but these errors were encountered: