-
Notifications
You must be signed in to change notification settings - Fork 126
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
Fix deprecation warning #145
base: main
Are you sure you want to change the base?
Conversation
Hi @rovo89 👋
I searched for this définition in open_mower_ros compilation configuration with no results. I searched on github "#define TF2_EULER_DEFAULT_ZYX" and i found only 3 repo using this definition. To me, it confirms that you choose to use the good fonction setRPY(). I would understand that you want someone to check "on the ground"... 😁 |
Good point I think that's used in multiple places though, since during compilation it comes up a lot |
Hm, really? It's That confused me a lot, because I didn't find references to |
Well i'm sorry to have done this misreading...😅 Yeah then i understand that there is a need to check more in detail. 👌 |
I did some emperical tests, the strongest one being that I modified Quaternion.h and changed the #else branch to call setRPYxxx. It still compiled, while doing the same thing in the #ifndef branch complained about the unknown function. So setEuler it is... but that raises more questions. The constructor is defined as: ROS_DEPRECATED Quaternion(const tf2Scalar& yaw, const tf2Scalar& pitch, const tf2Scalar& roll) And it passes on the arguments to setEuler() in the same order. But the call in OM is with |
Finally got confirmation that setRPY(0.0, 0.0, yaw) is the right thing to do: Nevertheless, I'm converting this PR to draft so I can check for other instances of the deprecated call. |
Compiling mower_logic showed a warning about that constructor being deprecated. It would either call
setEuler()
orsetRPY()
. Testing in the simulator,setRPY(0.0, 0.0, yaw)
seems to record the docking orientation fine, whilesetEuler(yaw, 0.0, 0.0)
produced crap. That fits to the fact that I saw variousgetRPY()
calls in the code base. But another pair of eyes would definitely help.