MCPcopy Create free account
hub / github.com/RoboMaster/RoboRTS / GetStaticMap

Method GetStaticMap

roborts_localization/localization_node.cpp:76–90  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

74}
75
76bool LocalizationNode::GetStaticMap(){
77 static_map_srv_ = nh_.serviceClient<nav_msgs::GetMap>("static_map");
78 ros::service::waitForService("static_map", -1);
79 nav_msgs::GetMap::Request req;
80 nav_msgs::GetMap::Response res;
81 if(static_map_srv_.call(req,res)) {
82 LOG_INFO << "Received Static Map";
83 amcl_ptr_->HandleMapMessage(res.map, init_pose_, init_cov_);
84 first_map_received_ = true;
85 return true;
86 } else{
87 LOG_ERROR << "Get static map failed";
88 return false;
89 }
90}
91
92bool LocalizationNode::GetLaserPose() {
93 auto laser_scan_msg = ros::topic::waitForMessage<sensor_msgs::LaserScan>(laser_topic_);

Callers

nothing calls this directly

Calls 1

HandleMapMessageMethod · 0.80

Tested by

no test coverage detected