32 #include <gtest/gtest.h> 35 #include <nav_msgs/GetMap.h> 36 #include <nav_msgs/OccupancyGrid.h> 37 #include <nav_msgs/MapMetaData.h> 75 map_metadata_ = map_metadata;
76 got_map_metadata_ =
true;
83 nav_msgs::GetMap::Request req;
84 nav_msgs::GetMap::Response resp;
90 ASSERT_STREQ(resp.map.header.frame_id.c_str(),
"map");
91 for(
unsigned int i=0; i < resp.map.info.width * resp.map.info.height; i++)
113 ASSERT_STREQ(
map_->header.frame_id.c_str(),
"map");
114 for(
unsigned int i=0; i <
map_->info.width *
map_->info.height; i++)
138 int main(
int argc,
char **argv)
140 testing::InitGoogleTest(&argc, argv);
145 return RUN_ALL_TESTS();
Subscriber subscribe(const std::string &topic, uint32_t queue_size, void(T::*fp)(M), T *obj, const TransportHints &transport_hints=TransportHints())
bool call(const std::string &service_name, MReq &req, MRes &res)
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
boost::shared_ptr< nav_msgs::MapMetaData const > map_metadata_
const unsigned int g_valid_image_height
const unsigned int g_valid_image_width
int main(int argc, char **argv)
Duration & fromSec(double t)
boost::shared_ptr< nav_msgs::OccupancyGrid const > map_
void mapCallback(const boost::shared_ptr< nav_msgs::OccupancyGrid const > &map)
const float g_valid_image_res
void mapMetaDataCallback(const boost::shared_ptr< nav_msgs::MapMetaData const > &map_metadata)
ROSCPP_DECL void spinOnce()
TEST_F(MapClientTest, call_service)
const char g_valid_image_content[]
ROSCPP_DECL bool waitForService(const std::string &service_name, int32_t timeout)