18 #include <gtest/gtest.h> 26 #include <std_srvs/Trigger.h> 57 void SetUp()
override;
86 std::string omit_service;
90 ASSERT_TRUE(it !=
advertise_funcs_.end()) <<
"Invalid service name: " << omit_service;
120 [](
const std::pair<std::string, std::function<void()>> &el){ el.second(); });
137 int main(
int argc,
char *argv[])
139 ros::init(argc, argv,
"integrationtest_stop1_service_missing");
145 testing::InitGoogleTest(&argc, argv);
146 return RUN_ALL_TESTS();
void SetUp() override
Gather service-advertising functions for all manipulator services and determine service to omit...
static const std::string HOLD_SERVICE_NAME
ros::ServiceServer halt_server_
ros::ServiceServer hold_server_
std::function< void()> omit_advertise_func_
TEST_F(BrakeTestRequiredIntegrationTest, testBrakeTestAnnouncement)
int main(int argc, char *argv[])
void waitForNode(std::string node_name, double loop_frequency=10.0)
Blocks until a node defined by node_name comes up.
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
ServiceServer advertiseService(const std::string &service, bool(T::*srv_func)(MReq &, MRes &), T *obj)
bool triggerCallbackDummy(std_srvs::TriggerRequest &req, std_srvs::TriggerResponse &resp)
static const std::string OMIT_SERVICE_PARAM_NAME
static const std::string UNHOLD_SERVICE_NAME
bool checkForNode(std::string node_name)
Checks if a node is up and running.
static const std::string RECOVER_SERVICE_NAME
static const std::string HALT_SERVICE_NAME
ros::ServiceServer recover_server_
ros::ServiceServer unhold_server_
std::map< std::string, std::function< void()> > advertise_funcs_
Map holding all but one service-advertising functions.
bool getParam(const std::string &key, std::string &s) const
static const std::string STOP1_EXECUTOR_NODE_NAME
static constexpr double WAIT_FOR_NODE_SLEEPTIME_S
Test the stop1 startup with a missing service.