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; } }
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); } }
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; } }
void service_callback(RBS.Messages.rosapi.GetTimeResponse response) { data = response; isRequested = false; }
void serviceCallBack(RBS.Messages.rosapi.GetTimeResponse response) { Debug.Log(response.time.nsecs); isRequested = false; }