Unstable euler from quaternion conversion

asked 2020-06-26 15:40:21 -0500

Aabed Solayman gravatar image

updated 2022-05-28 17:08:31 -0500

lucasw gravatar image

Hello everyone, I'm facing a problem currently and maybe you can help me with it. I have a node which publishes the pose of the robot as a tf message. Another node subscribes to this tf message and make some calculations (controller). For the calculations, the angle yaw is required. Since the orientation in tf is a quaternion array, I covert the z, w into yaw using euler_from_quaternion function from tf library. However, this conversion from quaternion to euler is very unstable and provides different values. Did anyone experience such a thing?

edit retag flag offensive close merge delete

Comments

Could you please provide more info about your setup? How are you generating the original pose data? My guess is you have a noisy data source and that the problem is not related to the euler conversion.

chives_onion gravatar image chives_onion  ( 2020-06-26 16:07:39 -0500 )edit

Hello @chivez_onion,

I wrote a node that calculates the pose by processing laser scanner data. it's called "pose detector". The laser scanner is fixed in the room. It scans the surrounding environment. I process the scan frames namely the ranges. The visualization of the pose in rviz is pretty accurate. So there is no problem in the "pose detector" algorithm. However, after detecting the pose using the developed "pose detector" algorithm, the pose is published at a rate of 100Hz. I reduced the rate to 10 Hz and now the Euler transformation is working better.

Aabed Solayman gravatar image Aabed Solayman  ( 2020-06-26 16:19:47 -0500 )edit