implementing a service server using roslib.js

asked 2019-11-13 06:59:16 -0500

SpaceTime gravatar image


I am currently working on developing a webbased Interface for robots using roslib.js.

My next goal is to make it possible to "control" the Web-UI from ROS (that is to say change to another page/url when requested by the robot). It would be nice if the robot could trigger change on the website and can receive feedback afterwards if the change went alright. That is why I thought about using a Service for this.

By using the Service Class I already tested calling a Service uing roslib.js which worked nicely. What I would need now it to implement a Service server with roslib.js that can be called from a ROS node. Is this possible? I already looked into the documentation here. The documentation mentions a method called advertise but I am not sure, if this is what could help me with my task.

Thanks a lot in advance!

edit retag flag offensive close merge delete


I am not very sure that exists this capability. I checked at main Main File and I did not found it. Anyway, i have been working on a GUI also, and due to the fact that generally the js code is not as fast as ROS code, i think it is a bad idea (the service server return has to be veery fast or it will break the message). If you just want to have feedback from ROS code, I suggest you to use just a topic subscribe or an actionserver( I did not found a tutporial but i found it on the file).

Solrac3589 gravatar image Solrac3589  ( 2019-11-14 10:22:58 -0500 )edit