/** * Unregisters as service advertiser. */ public void unadvertiseService() { this.ros.deregisterCallServiceCallback(this.name); // build and send the rosbridge call JsonObject call = Json.createObjectBuilder() .add(JRosbridge.FIELD_OP, JRosbridge.OP_CODE_UNADVERTISE_SERVICE) .add(JRosbridge.FIELD_SERVICE, this.name).build(); this.ros.send(call); // set the flag indicating we are registered this.isAdvertised = false; }
/** * Unregisters as service advertiser. */ public void unadvertiseService() { this.ros.deregisterCallServiceCallback(this.name); // build and send the rosbridge call JsonObject call = Json.createObjectBuilder() .add(JRosbridge.FIELD_OP, JRosbridge.OP_CODE_UNADVERTISE_SERVICE) .add(JRosbridge.FIELD_SERVICE, this.name).build(); this.ros.send(call); // set the flag indicating we are registered this.isAdvertised = false; }