23 #include <stdr_msgs/LoadExternalMap.h> 25 #define USAGE "USAGE: load_map <map_file.yaml>" 33 int main(
int argc,
char** argv) {
41 nav_msgs::OccupancyGrid map;
51 "Trying to register to /stdr_server/load_static_map_external...");
54 (
"/stdr_server/load_static_map_external",
true);
56 stdr_msgs::LoadExternalMap srv;
58 srv.request.map = map;
60 if (client.
call(srv)) {
65 ROS_ERROR(
"Could not load map, maybe already loaded...");
ServiceClient serviceClient(const std::string &service_name, bool persistent=false, const M_string &header_values=M_string())
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
bool call(MReq &req, MRes &res)
nav_msgs::OccupancyGrid loadMap(const std::string &fname)
Loads a map from an image file.
int main(int argc, char **argv)
Main function of the server node.
ROSCPP_DECL bool waitForService(const std::string &service_name, int32_t timeout)