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

Question: What are those lines used for? #42

Open
Bozenton opened this issue Nov 17, 2022 · 3 comments
Open

Question: What are those lines used for? #42

Bozenton opened this issue Nov 17, 2022 · 3 comments

Comments

@Bozenton
Copy link

Hi there,
Thanks for your sharing of the repo, I am reading your code and notice those lines:

// Convert tf to eigen quaternion
Eigen::Quaterniond eigen_quat
(odom.transform.rotation.w, odom.transform.rotation.x, odom.transform.rotation.y,
odom.transform.rotation.z);
// can't use this out of some reasons tf2::convert(odom.transform.rotation, eigen_quat);
// Remove yaw from quaternion
Eigen::Quaterniond eigen_quat_out;
rot_conv::QuatNoEYaw(eigen_quat, eigen_quat_out);
// Convert eigen to tf quaternion
tf2::Quaternion tf_quat_out;
tf2::convert(eigen_quat_out, tf_quat_out);

It seems that those lines are never used later in the other part of the code. So I am wondering what they are used for?

Hope for your answer sincerely.

@SammyRamone
Copy link
Contributor

As far as I can see it is not used. It looks like this was first coded to get the orientation but was then solved by another approach in the lines below. I guess it can just be removed. Maybe @jgueldenstein can have a look to make sure

@jgueldenstein
Copy link
Contributor

I have not touched this code in a very long time. I think @Flova would be the best candidate to know why this is there. It also seems to me that it can be deleted as it is not used afterwards.

@Flova
Copy link
Contributor

Flova commented Jan 3, 2023

Good catch. There is some duplication there. I would prefer using the rot_conv based version that is currently unused. Both methods just remove the yaw rotation component from the odometry, to estimate the pitch and roll of the robot relative to the base footprint frame on the ground.

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

4 participants