Sarafun Behavior Trees package  1
Behavior trees for the SARAFun project
 All Data Structures Namespaces Functions Variables Enumerations Enumerator
GraspAction.cpp
1 #include <sarafun_tree/sarafun_action_nodes/GraspAction.h>
2 
3 namespace sarafun {
4 bool GraspAction::fillGoal(sarafun_msgs::GraspKeyframeGoal &goal) {
5  return true;
6 }
7 
9  double timeout = 0;
10  fillParameter("/sarafun/bt_action_nodes/grasp/timeout", 30.0, timeout);
11 
12  return timeout;
13 }
14 }
15 
16 int main(int argc, char **argv) {
17  ros::init(argc, argv, "GraspAction");
18  std::string bt_client_name, action_server_name;
19 
20  if (!ros::param::get("/sarafun/bt_action_nodes/grasp/action_server_name", action_server_name))
21  {
22  ROS_ERROR("%s missing action server name", ros::this_node::getName().c_str());
23  return -1;
24  }
25 
26  if (!ros::param::get("/sarafun/bt_action_nodes/grasp/bt_client_name", bt_client_name))
27  {
28  ROS_ERROR("%s missing bt client name", ros::this_node::getName().c_str());
29  return -1;
30  }
31 
32  sarafun::GraspAction grasp_action(
33  ros::this_node::getName(), action_server_name, bt_client_name);
34  ros::spin();
35  return 1;
36 }
double getTimeoutValue()
Definition: GraspAction.cpp:8
bool fillGoal(sarafun_msgs::GraspKeyframeGoal &goal)
Definition: GraspAction.cpp:4