38 #include <gtest/gtest.h> 39 #include "gazebo/GetWorldProperties.h" 40 #include "geometry_msgs/Pose.h" 41 #include "std_srvs/Empty.h" 45 #include <boost/lexical_cast.hpp> 54 TEST(SpawnTest, spawnSingleBox)
60 gazebo::GetWorldProperties world_properties;
66 double test_duration = 10.0;
69 test_duration = boost::lexical_cast<
double>(
g_argv[1]);
71 catch (boost::bad_lexical_cast &e)
73 ROS_ERROR_NAMED(
"check_model",
"first argument of check_model should be timeout");
79 std::string model_name = std::string(
g_argv[2]);
80 ROS_INFO_NAMED(
"check_model",
"looking for model: %s",model_name.c_str());
84 check_model_client.
call(world_properties);
85 for (std::vector<std::string>::iterator mit = world_properties.response.model_names.begin();
86 mit != world_properties.response.model_names.end();
89 if (*mit == model_name)
105 int main(
int argc,
char** argv)
108 testing::InitGoogleTest(&argc, argv);
111 return RUN_ALL_TESTS();
ServiceClient serviceClient(const std::string &service_name, bool persistent=false, const M_string &header_values=M_string())
TEST(SpawnTest, spawnSingleBox)
#define ROS_INFO_NAMED(name,...)
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
bool call(MReq &req, MRes &res)
#define ROS_ERROR_NAMED(name,...)
int main(int argc, char **argv)
ROSCPP_DECL bool waitForService(const std::string &service_name, int32_t timeout)