Open leorich opened 6 years ago
Hi @leorich , I was wondering whether you have any idea on how to set up a ros service server on the html side, rather than setting up a ros service client. Right now, we can set up a service server in a ros node, and then make a service call through the ros service client that resides inside the html code. What I am looking for is the opposite. I basically want to play a video clip once, upon a service call from a ros node, and then return to ros upon completion of the video (publishing through a ros topic won't work properly). I would like the ros service server to reside in the html code so that the service client inside my ros node can activate the video streaming whenever needed. I would appreciate any insight on that.
Really surprised this hasn't been addressed. Bump!
If the same service is advertised, unadvertised, then advertised again, both callbacks given to service.advertise(callback) end up getting executed. They keep stacking up the more you readvertise.
Example:
Adding
this.ros.removeAllListeners(this.name)
before line 85 of src/core/Service.js:this.ros.on(this.name, this._serviceResponse.bind(this));
should solve this issue fairly simply. I tested and it solved the issue for me.