We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 934a595 commit 7a4e67fCopy full SHA for 7a4e67f
src/core/Ros.js
@@ -232,6 +232,26 @@ ROSLIB.Ros.prototype.getServices = function(callback) {
232
});
233
};
234
235
+/**
236
+ * Retrieves list of active node names in ROS.
237
+ *
238
+ * @param callback - function with the following params:
239
+ * * nodes - array of node names
240
+ */
241
+ROSLIB.Ros.prototype.getNodes = function(callback) {
242
+ var nodesClient = new ROSLIB.Service({
243
+ ros : this,
244
+ name : '/rosapi/nodes',
245
+ serviceType : 'rosapi/Nodes'
246
+ });
247
+
248
+ var request = new ROSLIB.ServiceRequest();
249
250
+ nodesClient.callService(request, function(result) {
251
+ callback(result.nodes);
252
253
+};
254
255
/**
256
* Retrieves list of param names from the ROS Parameter Server.
257
*
0 commit comments