33 #include <turtlebot_arm_block_manipulation/BlockDetectionAction.h> 34 #include <turtlebot_arm_block_manipulation/PickAndPlaceAction.h> 35 #include <turtlebot_arm_block_manipulation/InteractiveBlockManipulationAction.h> 72 block_detection_action_(
"block_detection", true),
73 interactive_manipulation_action_(
"interactive_manipulation", true),
74 pick_and_place_action_(
"pick_and_place", true)
87 block_detection_goal_.frame =
arm_link;
88 block_detection_goal_.table_height =
z_down;
91 pick_and_place_goal_.frame =
arm_link;
92 pick_and_place_goal_.z_up =
z_up;
97 interactive_manipulation_goal_.block_size =
block_size;
98 interactive_manipulation_goal_.frame =
arm_link;
100 ROS_INFO(
"Finished initializing, waiting for servers...");
103 ROS_INFO(
"Found block detection server.");
106 ROS_INFO(
"Found interactive manipulation.");
109 ROS_INFO(
"Found pick and place server.");
121 ROS_INFO(
"Got block detection callback. Adding blocks.");
122 geometry_msgs::Pose block;
136 ROS_INFO(
"Got interactive marker callback. Picking and placing.");
150 ROS_INFO(
"Got pick and place callback. Finished!");
165 int main(
int argc,
char** argv)
168 ros::init(argc, argv,
"block_manipulation");
181 std::cout <<
"Press Enter for restarting block detection" << std::endl;
PickAndPlaceGoal pick_and_place_goal_
bool waitForServer(const ros::Duration &timeout=ros::Duration(0, 0)) const
BlockManipulationAction()
actionlib::SimpleActionClient< BlockDetectionAction > block_detection_action_
InteractiveBlockManipulationGoal interactive_manipulation_goal_
void pickAndPlace(const actionlib::SimpleClientGoalState &state, const InteractiveBlockManipulationResultConstPtr &result)
ROSCPP_DECL void init(int &argc, char **argv, const std::string &name, uint32_t options=0)
void finish(const actionlib::SimpleClientGoalState &state, const PickAndPlaceResultConstPtr &result)
const std::string pick_and_place_topic
std::string toString() const
BlockDetectionGoal block_detection_goal_
bool param(const std::string ¶m_name, T ¶m_val, const T &default_val) const
int main(int argc, char **argv)
void sendGoal(const Goal &goal, SimpleDoneCallback done_cb=SimpleDoneCallback(), SimpleActiveCallback active_cb=SimpleActiveCallback(), SimpleFeedbackCallback feedback_cb=SimpleFeedbackCallback())
void addBlocks(const actionlib::SimpleClientGoalState &state, const BlockDetectionResultConstPtr &result)
actionlib::SimpleActionClient< PickAndPlaceAction > pick_and_place_action_
ROSCPP_DECL void shutdown()
actionlib::SimpleActionClient< InteractiveBlockManipulationAction > interactive_manipulation_action_