Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Coordinate system mismatch #9

Open
rsasaki0109 opened this issue Dec 13, 2021 · 0 comments
Open

Coordinate system mismatch #9

rsasaki0109 opened this issue Dec 13, 2021 · 0 comments

Comments

@rsasaki0109
Copy link
Member

rsasaki0109 commented Dec 13, 2021

The output of this IMU is a non-ROS coordinate system, but the following code converts the IMU to imu messages without considering the conversion from non-ROS to ROS.

      imu_msg.angular_velocity.x =
          raw_data * (200 / pow(2, 15)) * M_PI / 180;  // LSB & unit [deg/s] => [rad/s]
      raw_data = msg->data[5] + (msg->data[4] << 8);
      imu_msg.angular_velocity.y =
          raw_data * (200 / pow(2, 15)) * M_PI / 180;  // LSB & unit [deg/s] => [rad/s]
      raw_data = msg->data[7] + (msg->data[6] << 8);
      imu_msg.angular_velocity.z =
        raw_data * (200 / pow(2, 15)) * M_PI / 180;  // LSB & unit [deg/s] => [rad/s]

https://github.com/MapIV/tamagawa_imu_driver/blob/master/src/tag_can_driver.cpp#L74-L81

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant