File tree Expand file tree Collapse file tree 1 file changed +1
-8
lines changed
carla_ros_bridge/src/carla_ros_bridge Expand file tree Collapse file tree 1 file changed +1
-8
lines changed Original file line number Diff line number Diff line change @@ -82,17 +82,10 @@ def sensor_data_updated(self, carla_imu_measurement):
8282 imu_msg .linear_acceleration .y = - carla_imu_measurement .accelerometer .y
8383 imu_msg .linear_acceleration .z = carla_imu_measurement .accelerometer .z
8484
85- quat = euler2quat (math . sin ( - carla_imu_measurement . compass ), math .cos ( - carla_imu_measurement . compass ), 0.0 )
85+ quat = euler2quat (0.0 , 0.0 , ( math .pi / 2.0 ) - carla_imu_measurement . compass )
8686 imu_msg .orientation .w = quat [0 ]
8787 imu_msg .orientation .x = quat [1 ]
8888 imu_msg .orientation .y = quat [2 ]
8989 imu_msg .orientation .z = quat [3 ]
9090
91- roll , pitch , yaw = quat2euler ([
92- imu_msg .orientation .w ,
93- imu_msg .orientation .x ,
94- imu_msg .orientation .y ,
95- imu_msg .orientation .z ])
96- compass = - math .atan2 (roll , pitch ) + 2 * math .pi
97-
9891 self .imu_publisher .publish (imu_msg )
You can’t perform that action at this time.
0 commit comments