0
$\begingroup$

Rosanswers logo

Hello,

I already asked a question here. I received no answer but I found a way to work around the problem. I'm currently still trying to use the exploration service provided by nav2d. I solved my problem of map building by changing the mapper node by the gmapping one. But now I'm still not able to call the StartMapping and StartExplore services. I got this message: "Could not get a map." I looked at the code to find the not respected condition and I found that:

ros::ServiceClient mGetMapClient = robotNode.serviceClient<nav_msgs::GetMap>(std::string("get_map"));
nav_msgs::GetMap srv;
if(!mGetMapClient.call(srv))
{
ROS_INFO("Could not get a map.");
return false;
}

Have you any idea of what to do when a service doesn't work? And particularly this one?

Thank you in advance for any answer!


Originally posted by Furane on ROS Answers with karma: 13 on 2015-04-10

Post score: 0

$\endgroup$

1 Answer 1

0
$\begingroup$

Rosanswers logo

Have you checked whether the service names match? Gmapping names the service "dynamic_map", while the Navigator defaults to "get_map". You can use the Navigator's "map_service" parameter to tell it what service to call for the map.

Edit: Can you read my comments? Something seems broken... It helps to visualize both global map and local costmap in RVIZ to see what is actually happening.

Can you post a sceenshot from RVIZ with the map, costmap and the green/blue movement indicators? However, if your laser reports an obstacle, the Operator will try to avoid it. There is probably little you can do about that from the costmap-side. Maybe you can pre-filter the laser scan?


Originally posted by Sebastian Kasperski with karma: 1658 on 2015-04-13

This answer was ACCEPTED on the original site

Post score: 1

$\endgroup$

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.