ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question
0

mapviz - transforming local xy coordinate frame to tile map lat/lon coordinate frame

asked 2017-04-20 15:25:01 -0500

obotic gravatar image

I am running a tile map plugin for mapviz. As I move my mouse on the map I can see the GPS coordinates changing on the ui interface. I also used the swri_transform_util to give my robot a lat/lon xy origin. Now I am trying to use the point click publisher to get lat/lon coordinates when a place on the map is clicked. I am not sure what the tile map frame is however. I can get my robot's local xy position when I click on the map, but not sure how to transform it to the lat/lon coordinate.

edit retag flag offensive close merge delete

3 Answers

Sort by ยป oldest newest most voted
0

answered 2017-04-21 00:22:37 -0500

obotic gravatar image

As I was looking in some of the other swri packages there is a function called Wgs84FromLocalXy in package swri_transform_util. It takes local xy, referenced lat/lon, and outputs the transform(no tf). So it looks like in my subscriber I can call this function. I'm not sure if this is the best way to go about it, but it seems to work for me right now.

edit flag offensive delete link more

Comments

That is probably used because lat/long cannot be directly converted into metres in X and Y as used by tf, because they are angles referenced against a spheroid, not a perfect sphere. https://en.wikipedia.org/wiki/Geograp...

Geoff gravatar image Geoff  ( 2017-04-21 00:45:53 -0500 )edit
1

answered 2017-04-20 22:30:37 -0500

Geoff gravatar image

Use the view_frames utility from tf to see what the frames are in your system. From that you should be able to make a good guess which is correct for the tile map frame.

edit flag offensive delete link more

Comments

Thanks Geoff, I forgot about that utility. I saw that there was no frame from the tile map which then made me realize maybe the transform is done another way.

obotic gravatar image obotic  ( 2017-04-21 00:22:35 -0500 )edit
0

answered 2018-08-08 06:41:10 -0500

Stepan Kostusiev gravatar image

To get lat/lon from Point Click Publisher you can set frame: /wgs84

edit flag offensive delete link more

Question Tools

Stats

Asked: 2017-04-20 15:25:01 -0500

Seen: 969 times

Last updated: Aug 08 '18