-
Notifications
You must be signed in to change notification settings - Fork 279
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
Add sensor_msgs::Imu transform to tf2 #78
Conversation
befe29b
to
4cbd94a
Compare
Looks like a really useful feature to have! Didn't test/review it properly though. Just an idea, if you want to cross-test this, Chad Rockey has written a node (imu_transformer) that does essentially the same thing, so perhaps that's useful to cross-validate your implementation. Still, I think this would be a great thing to have in tf2! |
6118cc2
to
79c73fd
Compare
be5c4d1
to
f95f699
Compare
Added a sensor_msgs::MagneticField transform as well |
Thanks these look useful. I'll try to review them soon. |
|
||
transformCovariance(imu_in.linear_acceleration_covariance, imu_out.linear_acceleration_covariance, r); | ||
|
||
Eigen::Quaternion<double> orientation = r * Eigen::Quaternion<double>( |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Shouldn't orientation be imu_in.orientation*r.inverse()
, instead of r*imu_in.orienation*r.inverse()
?
I tried this code with an IMU mounted tilted on an object and imu_in.orientation*r.inverse()
works for me (unless I'm misunderstanding what it should do. I had assumed when having an IMU mounted on an object with transform only being a rotation around y-axis, when the object it's mounted on is level pointing east, the output of transform should be unit quaternion?)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You're definitely right. I thought that this code could do double duty as an NED->ENU conversion, but I have messed up the offset-application for regular transforms, will need to rethink this, feel free to pull your change to my fork.
sorry. how to use this? |
@asimay Please stop spamming unrelated issues with your question. You've already opened CCNYRoboticsLab/imu_tools#63 , I'll answer there shortly. |
Hello, what is the status of this? It is a very useful feature. |
@paulbovbel Would you remember why has this PR been closed without any comment? It still seems quite important to me (although there is workaround via the imu_transformer package). |
Transforms IMU data created in an IMUs reference frame to the equivalent data in another frame. Particularly useful for getting data in an ENU frame from an NED IMU.
Notes: