Go to the documentation of this file.
38 #include <actionlib/TestAction.h>
41 #include <gtest/gtest.h>
70 boost::placeholders::_1));
92 gh.
setSucceeded(TestResult(),
"The ref server has succeeded");
96 gh.
setAborted(TestResult(),
"The ref server has aborted");
99 gh.
setRejected(TestResult(),
"The ref server has rejected");
113 TEST(ServerGoalHandleDestruction, destruction_test) {
114 boost::thread spin_thread(&
spinner);
121 client.waitForServer();
127 client.sendGoal(goal);
133 int main(
int argc,
char ** argv)
135 testing::InitGoogleTest(&argc, argv);
139 return RUN_ALL_TESTS();
ServerGoalHandle< TestAction > GoalHandle
boost::shared_ptr< const Goal > getGoal() const
Accessor for the goal associated with the ServerGoalHandle.
~ServerGoalHandleDestructionTester()
Encapsulates a state machine for a given goal that the user can trigger transitions on....
ROSCPP_DECL void init(const M_string &remappings, const std::string &name, uint32_t options=0)
ROSCPP_DECL void shutdown()
#define ROS_ERROR_NAMED(name,...)
void setRejected(const Result &result=Result(), const std::string &text=std::string(""))
Set the status of the goal associated with the ServerGoalHandle to rejected.
A Simple client implementation of the ActionInterface which supports only one goal at a time.
void setAccepted(const std::string &text=std::string(""))
Accept the goal referenced by the goal handle. This will transition to the ACTIVE state or the PREEMP...
void setSucceeded(const Result &result=Result(), const std::string &text=std::string(""))
Set the status of the goal associated with the ServerGoalHandle to succeeded.
void goalCallback(GoalHandle gh)
void registerGoalCallback(boost::function< void(GoalHandle)> cb)
Register a callback to be invoked when a new goal is received, this will replace any previously regis...
ServerGoalHandleDestructionTester()
void start()
Explicitly start the action server, used it auto_start is set to false.
TEST(ServerGoalHandleDestruction, destruction_test)
int main(int argc, char **argv)
void setAborted(const Result &result=Result(), const std::string &text=std::string(""))
Set the status of the goal associated with the ServerGoalHandle to aborted.
ActionServer< TestAction > * as_
actionlib
Author(s): Eitan Marder-Eppstein, Vijay Pradeep, Mikael Arguedas
autogenerated on Fri May 19 2023 02:36:55