27 obj.rawMeasurements.at(IMU_ORI_QUAT_X) = msg.orientation.x;
28 obj.rawMeasurements.at(IMU_ORI_QUAT_Y) = msg.orientation.y;
29 obj.rawMeasurements.at(IMU_ORI_QUAT_Z) = msg.orientation.z;
30 obj.rawMeasurements.at(IMU_ORI_QUAT_W) = msg.orientation.w;
32 obj.rawMeasurements.at(IMU_X_ACC_GLOBAL) = msg.linear_acceleration.x;
33 obj.rawMeasurements.at(IMU_Y_ACC_GLOBAL) = msg.linear_acceleration.y;
34 obj.rawMeasurements.at(IMU_Z_ACC_GLOBAL) = msg.linear_acceleration.z;
36 obj.rawMeasurements.at(IMU_X_VEL) = msg.angular_velocity.x;
37 obj.rawMeasurements.at(IMU_Y_VEL) = msg.angular_velocity.y;
38 obj.rawMeasurements.at(IMU_Z_VEL) = msg.angular_velocity.z;
49 sensor_msgs::Imu& msg)
51 msg.header = msg_header;
53 vector<double> measurements = obj.rawMeasurements;
54 msg.orientation.x = measurements.at(IMU_ORI_QUAT_X);
55 msg.orientation.y = measurements.at(IMU_ORI_QUAT_Y);
56 msg.orientation.z = measurements.at(IMU_ORI_QUAT_Z);
57 msg.orientation.w = measurements.at(IMU_ORI_QUAT_W);
61 msg.linear_acceleration.x = measurements.at(IMU_X_ACC_GLOBAL);
62 msg.linear_acceleration.y = measurements.at(IMU_Y_ACC_GLOBAL);
63 msg.linear_acceleration.z = measurements.at(IMU_Z_ACC_GLOBAL);
65 msg.angular_velocity.x = measurements.at(IMU_X_VEL);
66 msg.angular_velocity.y = measurements.at(IMU_Y_VEL);
67 msg.angular_velocity.z = measurements.at(IMU_Z_VEL);