Пример #1
0
 protected void publish() {
   if (publisher_string.isEmpty()) return;
   std_msgs.String string = publisher.newMessage();
   string.setData(publisher_string);
   publisher.publish(string);
   hasPublishedMsg = true;
   publisher_string = "";
 }
 public void send_coordinate(float[] p_array) {
   string = publisher.newMessage();
   StringBuilder stringBuilder = new StringBuilder();
   stringBuilder.append("c_");
   stringBuilder.append(java.lang.String.valueOf(p_array[0]));
   stringBuilder.append('_');
   stringBuilder.append(java.lang.String.valueOf(p_array[1]));
   string.setData(stringBuilder.toString());
   publisher.publish(string);
 }
 public void sendMessage(java.lang.String p_string) {
   string = publisher.newMessage();
   string.setData(p_string);
   publisher.publish(string);
 }
 public void sendCloseMenu() {
   string = publisher.newMessage();
   string.setData("menu_close");
   publisher.publish(string);
 }