@@ -387,20 +387,20 @@ def __publish_kinematics(self):
387387 msg .global_gps .speed .speed = 0.0
388388 msg .global_gps .heading .heading = 0.0
389389
390- msg .global_pose .position .x = 0.0
391- msg .global_pose .position .y = 0.0
392- msg .global_pose .position .z = 0.0
393- msg .global_pose .orientation .x = 0.0
394- msg .global_pose .orientation .y = 0.0
395- msg .global_pose .orientation .z = 0.0
390+ msg .global_pose .position .x = self . __boat_state . global_position . item ( 0 )
391+ msg .global_pose .position .y = self . __boat_state . global_position . item ( 1 )
392+ msg .global_pose .position .z = self . __boat_state . global_position . item ( 2 )
393+ msg .global_pose .orientation .x = self . __boat_state . angular_position . item ( 0 )
394+ msg .global_pose .orientation .y = self . __boat_state . angular_position . item ( 1 )
395+ msg .global_pose .orientation .z = self . __boat_state . angular_position . item ( 2 )
396396 msg .global_pose .orientation .w = 1.0
397397
398- msg .wind_velocity .x = 0.0
399- msg .wind_velocity .y = 0.0
398+ msg .wind_velocity .x = self . __wind_generator . velocity [ 0 ]
399+ msg .wind_velocity .y = self . __wind_generator . velocity [ 1 ]
400400 msg .wind_velocity .z = 0.0
401401
402- msg .current_velocity .x = 0.0
403- msg .current_velocity .y = 0.0
402+ msg .current_velocity .x = self . __current_generator . velocity [ 0 ]
403+ msg .current_velocity .y = self . __current_generator . velocity [ 1 ]
404404 msg .current_velocity .z = 0.0
405405
406406 sec , nanosec = divmod (self .pub_period * self .publish_counter , 1 )
0 commit comments