How i can visulised OpenStreetMap with RVIZ

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

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";


Thanks for helping

edit retag flag offensive close merge delete


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 imagePeteBlackerThe3rd ( 2019-02-08 07:16:02 -0600 )edit

Please see #q279647.

gvdhoorn gravatar imagegvdhoorn ( 2019-02-08 07:45:29 -0600 )edit

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

LucLucLuc gravatar imageLucLucLuc ( 2019-02-08 08:11:37 -0600 )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 imagePeteBlackerThe3rd ( 2019-02-08 08:14:17 -0600 )edit

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

LucLucLuc gravatar imageLucLucLuc ( 2019-02-08 08:44:30 -0600 )edit

There is an example on the osm_cartography package page.

PeteBlackerThe3rd gravatar imagePeteBlackerThe3rd ( 2019-02-08 09:12:04 -0600 )edit