koide3 / hdl_localization

Real-time 3D localization using a (velodyne) 3D LIDAR
BSD 2-Clause "Simplified" License
798 stars 315 forks source link

yaw drift up to 5 degree. #49

Open ipinyulun opened 4 years ago

ipinyulun commented 4 years ago

Hi guys

i had found the yaw on certain position were drift quite alot... while on other some other position seems to be okay.

im using the yaw from

double yaw_angle = tf::getYaw(odom_trans.transform.rotation); in here hdl_localization_nodelet.cpp#L255

with some extra calculation concerning yaw angle value were range from -3.1415... to 3.1415.. i assume it shoud be pi(22/7) therefore: yaw=yaw_angle/((22/7)/180)

so i could get the yaw from 0-180 degree for both positive and negative.

this were working fine for yaw 0,90,and 180.. and some other angle..

however on some circumatances... the yaw drift like up to 5 degree.

here some screen shoot

from current location, 9.15,4.009 to target location 7.13, 2.03 should be around -135 degree from x axis however the yaw showing -137 degree when it standing on current locating facing to target location. (see bottom right corner) WhatsApp Image 2020-09-01 at 11 26 04 AM (2)

2nd sample: this 2nd sample drift till 5 degree (see bottom right corner) WhatsApp Image 2020-09-01 at 11 26 04 AM

could i calculate the yaw wrongly? or im missing something?