1 #include <gtest/gtest.h> 5 #include <move_base_msgs/MoveBaseAction.h> 10 #include <condition_variable> 134 std::unique_ptr<actionlib::QueuedActionServer<move_base_msgs::MoveBaseAction>>
qserv;
135 std::unique_ptr<actionlib::SimpleActionClient<move_base_msgs::MoveBaseAction>>
cli;
140 move_base_msgs::MoveBaseGoal goal;
143 goal.target_pose.pose.position.x = 3.0;
153 goal.target_pose.pose.position.x = 7.0;
174 goal.target_pose.pose.position.x = 13.0;
185 move_base_msgs::MoveBaseGoal goal;
188 goal.target_pose.pose.position.x = 3.0;
206 EXPECT_FALSE(
qserv->isActive());
210 move_base_msgs::MoveBaseGoal goal;
213 goal.target_pose.pose.position.x = 3.0;
231 goal.target_pose.pose.position.x = 7.0;
241 move_base_msgs::MoveBaseGoal goal;
242 goal.target_pose.pose.position.x = 3.0;
252 goal.target_pose.pose.position.x = 7.0;
276 int main(
int argc,
char **argv) {
277 ros::init(argc, argv,
"goal_queueing_test");
278 testing::InitGoogleTest(&argc, argv);
279 return RUN_ALL_TESTS();
std::condition_variable execute_cv
int main(int argc, char **argv)
std::mutex execute_done_lock
TEST_F(GoalQueueSuite, addGoalWhileExecuting)
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
std::unique_ptr< actionlib::QueuedActionServer< move_base_msgs::MoveBaseAction > > qserv
std::unique_ptr< actionlib::SimpleActionClient< move_base_msgs::MoveBaseAction > > cli
std::condition_variable sleep_cv
void executeCallback(const move_base_msgs::MoveBaseGoalConstPtr &msg)
std::condition_variable execute_done_cv
ROSCPP_DECL void spinOnce()
move_base_msgs::MoveBaseGoalConstPtr received_goal