pick_place_action_capability.h
Go to the documentation of this file.
1 /*********************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2012, Willow Garage, Inc.
5  * All rights reserved.
6  *
7  * Redistribution and use in source and binary forms, with or without
8  * modification, are permitted provided that the following conditions
9  * are met:
10  *
11  * * Redistributions of source code must retain the above copyright
12  * notice, this list of conditions and the following disclaimer.
13  * * Redistributions in binary form must reproduce the above
14  * copyright notice, this list of conditions and the following
15  * disclaimer in the documentation and/or other materials provided
16  * with the distribution.
17  * * Neither the name of Willow Garage nor the names of its
18  * contributors may be used to endorse or promote products derived
19  * from this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
24  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
25  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
28  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
29  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
30  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
31  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
32  * POSSIBILITY OF SUCH DAMAGE.
33  *********************************************************************/
34 
35 /* Author: Ioan Sucan */
36 
37 #pragma once
38 
42 #include <moveit_msgs/PickupAction.h>
43 #include <moveit_msgs/PlaceAction.h>
44 
45 #include <memory>
46 
47 namespace move_group
48 {
49 class MoveGroupPickPlaceAction : public MoveGroupCapability
50 {
51 public:
53  void initialize() override;
54 
55 private:
56  void executePickupCallback(const moveit_msgs::PickupGoalConstPtr& goal);
57  void executePlaceCallback(const moveit_msgs::PlaceGoalConstPtr& goal);
58 
59  void executePickupCallbackPlanOnly(const moveit_msgs::PickupGoalConstPtr& goal, moveit_msgs::PickupResult& action_res);
60  void executePickupCallbackPlanAndExecute(const moveit_msgs::PickupGoalConstPtr& goal,
61  moveit_msgs::PickupResult& action_res);
62 
63  void executePlaceCallbackPlanOnly(const moveit_msgs::PlaceGoalConstPtr& goal, moveit_msgs::PlaceResult& action_res);
64  void executePlaceCallbackPlanAndExecute(const moveit_msgs::PlaceGoalConstPtr& goal,
65  moveit_msgs::PlaceResult& action_res);
66 
67  bool planUsingPickPlacePickup(const moveit_msgs::PickupGoal& goal, moveit_msgs::PickupResult* action_res,
69  bool planUsingPickPlacePlace(const moveit_msgs::PlaceGoal& goal, moveit_msgs::PlaceResult* action_res,
71 
72  void preemptPickupCallback();
73  void preemptPlaceCallback();
74 
77 
80 
82  void setPlaceState(MoveGroupState state);
83 
84  void fillGrasps(moveit_msgs::PickupGoal& goal);
85 
86  pick_place::PickPlacePtr pick_place_;
87 
88  std::unique_ptr<actionlib::SimpleActionServer<moveit_msgs::PickupAction> > pickup_action_server_;
89  moveit_msgs::PickupFeedback pickup_feedback_;
90 
91  std::unique_ptr<actionlib::SimpleActionServer<moveit_msgs::PlaceAction> > place_action_server_;
92  moveit_msgs::PlaceFeedback place_feedback_;
93 
94  std::unique_ptr<moveit_msgs::AttachedCollisionObject> diff_attached_object_;
95 
98 
100 };
101 } // namespace move_group
move_group::MoveGroupState
MoveGroupState
move_group_capability.h
move_group::MoveGroupPickPlaceAction::place_state_
MoveGroupState place_state_
Definition: pick_place_action_capability.h:161
move_group::MoveGroupPickPlaceAction::fillGrasps
void fillGrasps(moveit_msgs::PickupGoal &goal)
Definition: pick_place_action_capability.cpp:427
move_group::MoveGroupPickPlaceAction::executePlaceCallbackPlanAndExecute
void executePlaceCallbackPlanAndExecute(const moveit_msgs::PlaceGoalConstPtr &goal, moveit_msgs::PlaceResult &action_res)
Definition: pick_place_action_capability.cpp:288
move_group::MoveGroupPickPlaceAction::startPickupExecutionCallback
void startPickupExecutionCallback()
Definition: pick_place_action_capability.cpp:68
move_group::MoveGroupPickPlaceAction::MoveGroupPickPlaceAction
MoveGroupPickPlaceAction()
Definition: pick_place_action_capability.cpp:42
move_group::MoveGroupPickPlaceAction::setPickupState
void setPickupState(MoveGroupState state)
Definition: pick_place_action_capability.cpp:413
simple_action_server.h
move_group::MoveGroupPickPlaceAction::initialize
void initialize() override
Definition: pick_place_action_capability.cpp:47
move_group::MoveGroupPickPlaceAction::startPickupLookCallback
void startPickupLookCallback()
Definition: pick_place_action_capability.cpp:73
pick_place.h
move_group::MoveGroupPickPlaceAction::place_action_server_
std::unique_ptr< actionlib::SimpleActionServer< moveit_msgs::PlaceAction > > place_action_server_
Definition: pick_place_action_capability.h:155
move_group::MoveGroupPickPlaceAction::planUsingPickPlacePickup
bool planUsingPickPlacePickup(const moveit_msgs::PickupGoal &goal, moveit_msgs::PickupResult *action_res, plan_execution::ExecutableMotionPlan &plan)
Definition: pick_place_action_capability.cpp:168
move_group::MoveGroupPickPlaceAction::pickup_feedback_
moveit_msgs::PickupFeedback pickup_feedback_
Definition: pick_place_action_capability.h:153
move_group::MoveGroupPickPlaceAction::executePickupCallback
void executePickupCallback(const moveit_msgs::PickupGoalConstPtr &goal)
Definition: pick_place_action_capability.cpp:321
move_group::MoveGroupPickPlaceAction::setPlaceState
void setPlaceState(MoveGroupState state)
Definition: pick_place_action_capability.cpp:420
move_group::MoveGroupPickPlaceAction::place_feedback_
moveit_msgs::PlaceFeedback place_feedback_
Definition: pick_place_action_capability.h:156
move_group::MoveGroupPickPlaceAction::preemptPlaceCallback
void preemptPlaceCallback()
Definition: pick_place_action_capability.cpp:409
move_group::MoveGroupPickPlaceAction::pickup_action_server_
std::unique_ptr< actionlib::SimpleActionServer< moveit_msgs::PickupAction > > pickup_action_server_
Definition: pick_place_action_capability.h:152
move_group::MoveGroupPickPlaceAction::startPlaceExecutionCallback
void startPlaceExecutionCallback()
Definition: pick_place_action_capability.cpp:78
ros::ServiceClient
move_group
move_group::MoveGroupPickPlaceAction::executePlaceCallbackPlanOnly
void executePlaceCallbackPlanOnly(const moveit_msgs::PlaceGoalConstPtr &goal, moveit_msgs::PlaceResult &action_res)
Definition: pick_place_action_capability.cpp:128
move_group::MoveGroupPickPlaceAction::executePickupCallbackPlanAndExecute
void executePickupCallbackPlanAndExecute(const moveit_msgs::PickupGoalConstPtr &goal, moveit_msgs::PickupResult &action_res)
Definition: pick_place_action_capability.cpp:254
plan_execution::ExecutableMotionPlan
move_group::MoveGroupPickPlaceAction::planUsingPickPlacePlace
bool planUsingPickPlacePlace(const moveit_msgs::PlaceGoal &goal, moveit_msgs::PlaceResult *action_res, plan_execution::ExecutableMotionPlan &plan)
Definition: pick_place_action_capability.cpp:211
move_group::MoveGroupPickPlaceAction::pickup_state_
MoveGroupState pickup_state_
Definition: pick_place_action_capability.h:160
move_group::MoveGroupPickPlaceAction::executePlaceCallback
void executePlaceCallback(const moveit_msgs::PlaceGoalConstPtr &goal)
Definition: pick_place_action_capability.cpp:368
move_group::MoveGroupPickPlaceAction::startPlaceLookCallback
void startPlaceLookCallback()
Definition: pick_place_action_capability.cpp:83
move_group::MoveGroupPickPlaceAction::preemptPickupCallback
void preemptPickupCallback()
Definition: pick_place_action_capability.cpp:405
move_group::MoveGroupPickPlaceAction::pick_place_
pick_place::PickPlacePtr pick_place_
Definition: pick_place_action_capability.h:150
move_group::MoveGroupPickPlaceAction::diff_attached_object_
std::unique_ptr< moveit_msgs::AttachedCollisionObject > diff_attached_object_
Definition: pick_place_action_capability.h:158
move_group::MoveGroupPickPlaceAction::executePickupCallbackPlanOnly
void executePickupCallbackPlanOnly(const moveit_msgs::PickupGoalConstPtr &goal, moveit_msgs::PickupResult &action_res)
Definition: pick_place_action_capability.cpp:88
move_group::MoveGroupPickPlaceAction::grasp_planning_service_
ros::ServiceClient grasp_planning_service_
Definition: pick_place_action_capability.h:163


manipulation
Author(s): Ioan Sucan , Sachin Chitta
autogenerated on Thu Nov 21 2024 03:24:46