Ask Your Question
0

how do I to make /wgs84 frame available?

asked 2017-05-11 22:02:47 -0600

danielsnider gravatar image

Bit of background:

I want to use point_click_publisher to publish lat/lon coordinates of tile map.

Answer:

The easiest way would be to type /wgs84 in the Frame dropdown for the point click plugin.

That will make the published point have the /wgs84 frame and contain longitude for the x coordinate and latitude for the y coordinate.

Source: https://github.com/swri-robotics/mapv...

But how do I to make the /wgs84 frame available?

I'm following the steps that were given, but still no wgs84 frame...

The /wgs84 frame is not a true tf frame (since it can't be defined with a simple translation and rotation), so it won't be available through the standard tf interfaces. For the point_click_publisher you would just type /wgs84 into the frame dropdown box. This will work as long as the /local_xy_origin has been published and the tf frame it is associated with is connected to the frame mapviz is displaying.

I see in your launch file that the initialize origin node is set to 'auto' and will only publish the origin once it receives a GPS message. Can you confirm that the /local_xy_origin topic has been populated? If not, you can set it to one of the manually defined origins instead of 'auto'.

To use the /wgs84 frame in code as if it were a tf frame you would use swri_transform_util::TransformManager in place of a tf::TransformListener and use swri_transform_util::Transform instead of tf::Transform. The transform manger wraps the standard tf listener and also listens for the local xy orign so it can perform the conversion to and from lat / lon and frames in the tf tree.

Source: https://github.com/swri-robotics/mapv...

My roslaunch file mapviz.launch.

Launch log output:

process[swri_transform-1]: started with pid [125343]
process[mapviz_ubuntu_125328_4724633399611045863-2]: started with pid [125344]
process[initialize_origin-3]: started with pid [125345]
process[rosapi-4]: started with pid [125346]
[139911776519936] [/initialize_origin/initialize_origin:101]: Local XY origin is "auto"
[139911776519936] [/initialize_origin/initialize_origin:104]: Local XY frame ID is "/world"
[139911776519936] [/initialize_origin/initialize_origin:121]: Subscribed to NavSat on /gps/fix
Warning: TF_OLD_DATA ignoring data from the past for frame robot_base at time 1.49455e+09 according to authority unknown_publisher
Possible reasons are listed at http://wiki.ros.org/tf/Errors%20explained
         at line 273 in /tmp/binarydeb/ros-kinetic-tf2-0.5.15/src/buffer_core.cpp
[139911042692864] [/initialize_origin/gps_callback:54]: Got NavSat message. Setting origin and unsubscribing from NavSat.
[7ff0bf201880] [/mapviz_ubuntu_125328_4724633399611045863/TileMapPlugin::PrintError:245]: Error: No transform between /wgs84 and map
[7ff0bf201880] [/mapviz_ubuntu_125328_4724633399611045863/PointClickPublisherPlugin::PrintError:169]: Error: Unable to find transform from map to wgs84.

image description

My tf tree:

image description

I am using the latest mapviz packages available for ubuntu 16.04. Any thoughts?

THANK YOU, this feature would be awesome!

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
1

answered 2017-05-12 08:42:36 -0600

"/wgs84" isn't a real TF frame and isn't handled by the normal ROS TF system, so it won't show up in the normal TF tree. It's handled specially by the swri_transform_util package.

You could try putting a forward slash in front of it in the plugin panel -- so "/wgs84" rather than "wgs84" -- but I don't think that should make a difference. Do you have a topic at "/local_xy_origin"? What does echoing it produce? (it should have been published by initialize_origin.py after I got its first NavSatFix)

edit flag offensive delete link more

Comments

Yes! Thank you! Putting a forward slash is important -- so "/wgs84" rather than "wgs84". We opened an issue for this: https://github.com/swri-robotics/marti_common/issues/444

danielsnider gravatar imagedanielsnider ( 2017-05-13 11:19:57 -0600 )edit

Your Answer

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

Add Answer

Question Tools

2 followers

Stats

Asked: 2017-05-11 22:02:47 -0600

Seen: 1,251 times

Last updated: May 11 '17