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

How to use geographic_msgs?

asked 2014-09-08 04:16:39 -0500

chris gravatar image


I'm trying to write a little client to access osm maps. What I did so far is:

ros::init(argc, argv, "Geo");
ros::NodeHandle n;
ros::ServiceClient client = n.serviceClient<geographic_msgs::GetGeographicMap>("geographic_msgs");
geographic_msgs::GetGeographicMap srv;

srv.request.url = "";

If I run the programm I always get "failed" as an output. Could anyone tell me how to connect to the maps correctly?

Thanks in advance, Chris

edit retag flag offensive close merge delete



Is the service running?

BennyRe gravatar image BennyRe  ( 2014-09-08 06:11:00 -0500 )edit

Unfortunately the service seems not to be running. I tried to run it with rosrun, but there was no executable found. I compiled the Package with catkin_make before and I had no error as a result. In addition the Package seems to be a Metapackage. So how could I start the service?

chris gravatar image chris  ( 2014-09-09 01:34:08 -0500 )edit

1 Answer

Sort by ยป oldest newest most voted

answered 2014-09-09 02:00:42 -0500

BennyRe gravatar image

The geographic_info metapackage does not contain any nodes for downloading maps.

Try osm_cartography instead. There's a osm_server node.

edit flag offensive delete link more


I downloaded a part of the map previously and used:

srv.request.url = "package:///home/user/map.osm";

But this is not working either.

chris gravatar image chris  ( 2014-09-09 02:44:00 -0500 )edit

If you want to call a service, a server providing that service has to be running.

BennyRe gravatar image BennyRe  ( 2014-09-09 03:05:32 -0500 )edit

Do you know how the server in this package is called and how I can run it?

chris gravatar image chris  ( 2014-09-09 04:11:50 -0500 )edit

The wiki page I linked says that the node is called osm_server. And I guess you run it with rosrun osm_cartography osm_server.

BennyRe gravatar image BennyRe  ( 2014-09-09 05:03:14 -0500 )edit

Thanks for your help

chris gravatar image chris  ( 2014-09-09 09:55:59 -0500 )edit

If your question is answered please mark this answer as correct.

BennyRe gravatar image BennyRe  ( 2014-09-09 23:25:56 -0500 )edit

Question Tools

1 follower


Asked: 2014-09-08 04:16:39 -0500

Seen: 476 times

Last updated: Sep 09 '14