manipulation_plan.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, Sachin Chitta */
36 
37 #ifndef MOVEIT_PICK_PLACE_MANIPULATION_PLAN_
38 #define MOVEIT_PICK_PLACE_MANIPULATION_PLAN_
39 
44 #include <moveit_msgs/GripperTranslation.h>
45 #include <moveit_msgs/RobotState.h>
46 #include <moveit_msgs/RobotTrajectory.h>
47 #include <moveit_msgs/MoveItErrorCodes.h>
48 #include <moveit_msgs/Constraints.h>
49 #include <string>
50 #include <vector>
51 
52 namespace pick_place
53 {
54 MOVEIT_CLASS_FORWARD(ManipulationPlanSharedData);
55 
57 {
59  : planning_group_(NULL)
60  , end_effector_group_(NULL)
61  , ik_link_(NULL)
64  {
65  }
66 
67  const robot_model::JointModelGroup* planning_group_;
68  const robot_model::JointModelGroup* end_effector_group_;
69  const robot_model::LinkModel* ik_link_;
70 
72 
73  std::string planner_id_;
74 
76 
77  moveit_msgs::Constraints path_constraints_;
78 
79  moveit_msgs::AttachedCollisionObject diff_attached_object_;
80 
82 };
83 
85 
87 {
88  ManipulationPlan(const ManipulationPlanSharedDataConstPtr& shared_data)
89  : shared_data_(shared_data), processing_stage_(0)
90  {
91  }
92 
94  void clear()
95  {
96  goal_sampler_.reset();
97  trajectories_.clear();
98  approach_state_.reset();
99  possible_goal_states_.clear();
100  processing_stage_ = 0;
101  }
102 
103  // Shared data between manipulation plans (set at initialization)
104  ManipulationPlanSharedDataConstPtr shared_data_;
105 
106  // the approach motion towards the goal
107  moveit_msgs::GripperTranslation approach_;
108 
109  // the retreat motion away from the goal
110  moveit_msgs::GripperTranslation retreat_;
111 
112  // the kinematic configuration of the end effector when approaching the goal (an open gripper)
113  trajectory_msgs::JointTrajectory approach_posture_;
114 
115  // the kinematic configuration of the end effector when retreating from the goal (a closed gripper)
116  trajectory_msgs::JointTrajectory retreat_posture_;
117 
118  // -------------- computed data --------------------------
119  geometry_msgs::PoseStamped goal_pose_;
120  Eigen::Affine3d transformed_goal_pose_;
121 
122  moveit_msgs::Constraints goal_constraints_;
123 
124  // Allows for the sampling of a kineamtic state for a particular group of a robot
125  constraint_samplers::ConstraintSamplerPtr goal_sampler_;
126 
127  std::vector<robot_state::RobotStatePtr> possible_goal_states_;
128 
129  robot_state::RobotStatePtr approach_state_;
130 
131  // The sequence of trajectories produced for execution
132  std::vector<plan_execution::ExecutableTrajectory> trajectories_;
133 
134  // An error code reflecting what went wrong (if anything)
135  moveit_msgs::MoveItErrorCodes error_code_;
136 
137  // The processing stage that was last working on this plan, or was about to work on this plan
138  std::size_t processing_stage_;
139 
140  // An id for this plan; this is usually the index of the Grasp / PlaceLocation in the input request
141  std::size_t id_;
142 };
143 }
144 
145 #endif
constraint_samplers::ConstraintSamplerPtr goal_sampler_
trajectory_msgs::JointTrajectory retreat_posture_
moveit_msgs::GripperTranslation retreat_
moveit_msgs::MoveItErrorCodes error_code_
moveit_msgs::GripperTranslation approach_
ManipulationPlan(const ManipulationPlanSharedDataConstPtr &shared_data)
Eigen::Affine3d transformed_goal_pose_
moveit_msgs::AttachedCollisionObject diff_attached_object_
robot_state::RobotStatePtr approach_state_
void clear()
Restore this plan to a state that makes it look like it never was processed by the manipulation pipel...
MOVEIT_CLASS_FORWARD(ManipulationPlanSharedData)
moveit_msgs::Constraints goal_constraints_
const robot_model::JointModelGroup * end_effector_group_
trajectory_msgs::JointTrajectory approach_posture_
const robot_model::LinkModel * ik_link_
ManipulationPlanSharedDataConstPtr shared_data_
const robot_model::JointModelGroup * planning_group_
std::vector< robot_state::RobotStatePtr > possible_goal_states_
std::vector< plan_execution::ExecutableTrajectory > trajectories_
geometry_msgs::PoseStamped goal_pose_
moveit_msgs::Constraints path_constraints_


manipulation
Author(s): Ioan Sucan , Sachin Chitta
autogenerated on Mon Jan 15 2018 03:52:01