How i can visulised OpenStreetMap with RVIZ

asked 2019-02-08 06:55:37 -0500

LucLucLuc gravatar image

I would like to display in c ++ an OpenStreetMap in rviz. Preferably by means of a publisher. The file should be read from a path and be published.

Can you show me an example?

I started with....

publisher_osm_map_application_=nh.advertise<visualization_msgs::Marker>("visu/osm_map", 10, true); ...

geographic_msgs::GeographicMap osm_map;

osm_map.request.url ="package://home/lucas/projects/imagine/map/imagineF1.osm";

publisher_osm_map_application_.publish(osm_map);

Thanks for helping

edit retag flag offensive close merge delete

Comments

You can only publish visualization_msgs::Marker objects with the publisher that is setup with them. You cannot pass a different message type this will not work. What you are trying to do is not-trivial, I don't know of any RVIZ plugins for OSM but there may be one out there.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-02-08 07:16:02 -0500 )edit

Please see #q279647.

gvdhoorn gravatar image gvdhoorn  ( 2019-02-08 07:45:29 -0500 )edit

yes...... #q279647 ....... But ther is no example for C++

LucLucLuc gravatar image LucLucLuc  ( 2019-02-08 08:11:37 -0500 )edit

You don't need c++, in-fact you don't need to code anything. The package accepts service requests and then converts the resulting OSM data into RVIZ compatible marker messages.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-02-08 08:14:17 -0500 )edit

oh nice, do you know what for a comand i must include/execute? to show my own openstreetmap?

LucLucLuc gravatar image LucLucLuc  ( 2019-02-08 08:44:30 -0500 )edit

There is an example on the osm_cartography package page.

PeteBlackerThe3rd gravatar image PeteBlackerThe3rd  ( 2019-02-08 09:12:04 -0500 )edit