rapid
A ROS robotics library.
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Pages
tuck_arms.h
Go to the documentation of this file.
1 // PR2-specific class for deploying/tucking arms.
2 #ifndef _RAPID_MANIPULATION_TUCK_ARMS_H_
3 #define _RAPID_MANIPULATION_TUCK_ARMS_H_
4 
5 #include "actionlib/client/simple_action_client.h"
6 #include "gmock/gmock.h"
7 #include "pr2_common_action_msgs/TuckArmsAction.h"
8 
10 
11 namespace rapid {
12 namespace manipulation {
14  public:
15  virtual ~TuckArmsInterface() {}
16  virtual bool TuckArms() = 0; // Tuck both
17  virtual bool DeployLeft() = 0; // Deploy left, tuck right
18  virtual bool DeployRight() = 0; // Deploy right, tuck left
19  virtual bool DeployArms() = 0; // Deploy both
20 };
21 
23  public:
25  pr2_common_action_msgs::TuckArmsAction>* client);
26  bool TuckArms();
27  bool DeployLeft();
28  bool DeployRight();
29  bool DeployArms();
30 
31  void set_server_wait_time(double server_wait_time);
32 
33  private:
34  bool ExecuteAction(bool tuck_left, bool tuck_right);
36  client_;
37  double server_wait_time_; // Wait time for tuck arms server, in seconds.
38 };
39 
41  public:
42  MOCK_METHOD0(TuckArms, bool());
43  MOCK_METHOD0(DeployLeft, bool());
44  MOCK_METHOD0(DeployRight, bool());
45  MOCK_METHOD0(DeployArms, bool());
46 };
47 } // namespace manipulation
48 } // namespace rapid
49 
50 #endif // _RAPID_MANIPULATION_TUCK_ARMS_H_
Pr2TuckArms(rapid_ros::ActionClientInterface< pr2_common_action_msgs::TuckArmsAction > *client)
void set_server_wait_time(double server_wait_time)