IMU X und Y getauscht
This commit is contained in:
+9
-8
@@ -141,24 +141,25 @@ def publish_measurements(imu_topic, mag_topic, status_topic, sensor):
|
||||
magnetic = sensor.magnetic
|
||||
quaternion = sensor.quaternion
|
||||
|
||||
# Sensor ist um 90° um die Z-Achse verdreht eingebaut → X- und Y-Achse tauschen
|
||||
imu_topic.publish(roslibpy.Message({
|
||||
'header': {'stamp': stamp, 'frame_id': FRAME_ID},
|
||||
'orientation': {
|
||||
'x': quaternion[0],
|
||||
'y': quaternion[1],
|
||||
'x': quaternion[1],
|
||||
'y': quaternion[0],
|
||||
'z': quaternion[2],
|
||||
'w': quaternion[3],
|
||||
},
|
||||
'orientation_covariance': [0.0] * 9,
|
||||
'angular_velocity': {
|
||||
'x': gyro[0],
|
||||
'y': gyro[1],
|
||||
'x': gyro[1],
|
||||
'y': gyro[0],
|
||||
'z': gyro[2],
|
||||
},
|
||||
'angular_velocity_covariance': [0.0] * 9,
|
||||
'linear_acceleration': {
|
||||
'x': acceleration[0],
|
||||
'y': acceleration[1],
|
||||
'x': acceleration[1],
|
||||
'y': acceleration[0],
|
||||
'z': acceleration[2],
|
||||
},
|
||||
'linear_acceleration_covariance': [0.0] * 9,
|
||||
@@ -167,8 +168,8 @@ def publish_measurements(imu_topic, mag_topic, status_topic, sensor):
|
||||
mag_topic.publish(roslibpy.Message({
|
||||
'header': {'stamp': stamp, 'frame_id': FRAME_ID},
|
||||
'magnetic_field': {
|
||||
'x': magnetic[0] * 1e-6,
|
||||
'y': magnetic[1] * 1e-6,
|
||||
'x': magnetic[1] * 1e-6,
|
||||
'y': magnetic[0] * 1e-6,
|
||||
'z': magnetic[2] * 1e-6,
|
||||
},
|
||||
'magnetic_field_covariance': [0.0] * 9,
|
||||
|
||||
Reference in New Issue
Block a user