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

wrong torque offset calculation? #19

Open
jacknlliu opened this issue Dec 17, 2018 · 5 comments
Open

wrong torque offset calculation? #19

jacknlliu opened this issue Dec 17, 2018 · 5 comments

Comments

@jacknlliu
Copy link

offset_.torque.x -= (gravity_transformed.vector.y * cog.z - gravity_transformed.vector.z * cog.y);

This computes the gravity moment not follow

but using -r x G

@destogl
Copy link
Member

destogl commented Jul 29, 2019

But this is what we want, to remove gravity moment. or am I somewhere wrong?

@jacknlliu
Copy link
Author

@destogl

offset_.torque.x -= (gravity_transformed.vector.y * cog.z - gravity_transformed.vector.z * cog.y); 

the right hand of the code is -r x G, not r x G.
Then the result is:

offset_.torque = offset_.torque - (-rxG) = offset_.torque + r x G

In other words, the offset_.torque is to add the gravity moment, not to remove it. Right?

@destogl
Copy link
Member

destogl commented Aug 2, 2019

Yes you are right. I will check once again what we do in our code to check why is this like that...

@destogl
Copy link
Member

destogl commented Feb 20, 2020

@jacknlliu: Did you correct this for you? Can you make pull request or give a correct code snippet?

@jacknlliu
Copy link
Author

@destogl Yes, I'll check it in these days.

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

2 participants