Ask Your Question

utm points drifting on rviz over time

asked 2017-06-04 17:27:03 -0600

obotic gravatar image

updated 2017-06-04 18:33:45 -0600

I have a set of gps navsatfix points that are recorded within a visible physical boundary when viewed on a google satellite image. I am using rviz_satellite to view the utm points on the satellite image, but I noticed that my trajectory is drifting south over time. Based on the answer given below regarding rviz float32 precision:

I changed my tf transform to:

tf::Transform transform;
transform.setOrigin( tf::Vector3( (utmpoint.easting-easting_ref), (utmpoint.northing-northing_ref), utmpoint.altitude ));
tf::Quaternion q;
q.setRPY(0, 0, 0);
br.sendTransform(tf::StampedTransform(transform, msg->header.stamp, frame_fix_origin, frame_robot));

where ref_easting and ref_northing are utm points captured from my first incoming gps message, therefore now my first tf x,y coordinate starts at (0,0). On rviz Fixed Frame is set to frame_fix_origin and Robot frame(from rviz_satellite package) is set to frame_robot, but I still see the drift happening.

If I use another mapping visualization tool called mapviz(which has its own lat long to local xy coordinate system) and feed it my gps coordinates(using same maptile URI source) everything is displayed correctly, there is no drift. So I think my raw /fix coordinates are fine. Either I'm doing the transformation wrong when giving it to rviz or maybe the rviz_satellite is not projecting the satellite images correctly or it's something else.

I guess my question is has anyone used rviz_satellite and been able to plot their utm points without seeing this drift?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2017-06-05 02:01:20 -0600

obotic gravatar image

Well I still don't know why the drift happens, but I started to do the navsatfix to local coordinate transformation similar to how mapviz does it and that seems to solve my problem on rviz. Although I can't accept the answer since I still don't quite understand what the underlying problem is.

edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools



Asked: 2017-06-04 17:27:03 -0600

Seen: 272 times

Last updated: Jun 05 '17