Open baalexander opened 12 years ago
More work needs to go into defining the services usage, but service should resemble the topic API some. The new ros.js has some example code using services, but it's not complete yet either.
Srv files also need to be parsed, similar to msg files.
This is a big issue and will likely require smaller, more specific issues going forward.
There's two ways to communicate between nodes in ROS: The publisher/subscriber way passing messages for topics and the RPC way, using service request and service responses. Currently, there is no support for services.
The implementation from a request/response perspective should resemble other RCP implementations, something along the lines of
service.request('add_two_numbers', [array, of, parameters], callback)
where the callback returns the service response.tcpros.js will need to be updated and refactored for service supports. But tcpros.js really needs to be refactored anyways. Core service related models should be added to ros.js as well. Most documentation only references publishers and subscribers, so service copy will need to be added too.