File tree Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Expand file tree Collapse file tree 1 file changed +2
-6
lines changed Original file line number Diff line number Diff line change @@ -224,10 +224,8 @@ def execute(self, userdata):
224224 if answer is not None :
225225 # We received an ACK
226226 if self .outer .client_sync_complete_pub is not None :
227- time_msg = Time ()
228227 current_time = self .outer .ros_node .get_clock ().now ()
229- time_msg .sec , time_msg .nanosec = current_time .seconds_nanoseconds ()
230- self .outer .client_sync_complete_pub .publish (time_msg )
228+ self .outer .client_sync_complete_pub .publish (current_time .to_msg ())
231229 break
232230 time .sleep (CHECK_POLL_TIME )
233231 i += 1
@@ -482,9 +480,7 @@ def callback_server(self, msg):
482480 f" Target: { target .decode ()} - " +
483481 f"My target: { self .target_robot } " )
484482 if self .server_sync_complete_pub is not None :
485- time_msg = Time ()
486483 current_time = self .ros_node .get_clock ().now ()
487- time_msg .sec , time_msg .nanosec = current_time .seconds_nanoseconds ()
488- self .server_sync_complete_pub .publish (time_msg )
484+ self .server_sync_complete_pub .publish (current_time .to_msg ())
489485 return "Ack" .encode ()
490486 return Comm_msgs .SERRM .name .encode ()
You can’t perform that action at this time.
0 commit comments