Exemple #1
0
 void Update()
 {
     if (RBSocket.Instance.IsConnected && !isRequested)
     {
         RBS.Messages.rosapi.GetTimeRequest  request_data  = new RBS.Messages.rosapi.GetTimeRequest();
         RBS.Messages.rosapi.GetTimeResponse response_data = new RBS.Messages.rosapi.GetTimeResponse();
         serviceClient.Call(ref request_data, ref response_data);
         isRequested = true;
     }
 }
Exemple #2
0
 void Update()
 {
     if (RBSocket.Instance.IsConnected)
     {
         RBS.Messages.rosapi.GetTimeRequest  request_data  = new RBS.Messages.rosapi.GetTimeRequest();
         RBS.Messages.rosapi.GetTimeResponse response_data = new RBS.Messages.rosapi.GetTimeResponse();
         serviceClient.Call(ref request_data, ref response_data);
         Debug.Log(response_data.time.nsecs);
     }
 }
Exemple #3
0
 void Update()
 {
     if (RBSocket.Instance.IsConnected && !isRequested)
     {
         RBS.Messages.rosapi.GetTimeRequest  request_data  = new RBS.Messages.rosapi.GetTimeRequest();
         RBS.Messages.rosapi.GetTimeResponse response_data = new RBS.Messages.rosapi.GetTimeResponse();
         service_client.Call(ref request_data, ref response_data);
         isRequested = true;
     }
     if (data != null)
     {
         TimeText.text = "ROS Time: " + data.time.secs;
     }
     if (!RBSocket.Instance.IsConnected)
     {
         isRequested = false;
     }
 }
Exemple #4
0
 void service_callback(RBS.Messages.rosapi.GetTimeResponse response)
 {
     data        = response;
     isRequested = false;
 }
Exemple #5
0
 void serviceCallBack(RBS.Messages.rosapi.GetTimeResponse response)
 {
     Debug.Log(response.time.nsecs);
     isRequested = false;
 }