private void timerConnectRosSocket_Tick(object sender, EventArgs e)
 {
     rosSocket.seturl("ws://" + props.cam.ip + ":" + props.cam.port);
     if (rosSocket.isConnected)
     {
         int subscription_id = rosSocket.Subscribe("/pallet_status_" + props.cam.id, "std_msgs/String", subscriptionHandler);
         timerConnectRosSocket.Stop();
         timerCheckConnection.Start();
     }
     else
     {
         rosSocket.connect();
     }
 }
Exemple #2
0
 private void timerConnectRosSocket_Tick(object sender, EventArgs e)
 {
     rosSocket.seturl("ws://" + IpAddress + ":9090");
     if (rosSocket.isConnected)
     {
         timerCheckConnection.Start();
         timerConnectRosSocket.Stop();
         createRosTerms();
     }
     else
     {
         rosSocket.connect();
     }
 }