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 {
89 
90  ManipulationPlan(const ManipulationPlanSharedDataConstPtr& shared_data)
91  : shared_data_(shared_data), processing_stage_(0)
92  {
93  }
94 
96  void clear()
97  {
98  goal_sampler_.reset();
99  trajectories_.clear();
100  approach_state_.reset();
101  possible_goal_states_.clear();
102  processing_stage_ = 0;
103  }
104 
105  // Shared data between manipulation plans (set at initialization)
106  ManipulationPlanSharedDataConstPtr shared_data_;
107 
108  // the approach motion towards the goal
109  moveit_msgs::GripperTranslation approach_;
110 
111  // the retreat motion away from the goal
112  moveit_msgs::GripperTranslation retreat_;
113 
114  // the kinematic configuration of the end effector when approaching the goal (an open gripper)
115  trajectory_msgs::JointTrajectory approach_posture_;
116 
117  // the kinematic configuration of the end effector when retreating from the goal (a closed gripper)
118  trajectory_msgs::JointTrajectory retreat_posture_;
119 
120  // -------------- computed data --------------------------
121  geometry_msgs::PoseStamped goal_pose_;
122  Eigen::Affine3d transformed_goal_pose_;
123 
124  moveit_msgs::Constraints goal_constraints_;
125 
126  // Allows for the sampling of a kineamtic state for a particular group of a robot
127  constraint_samplers::ConstraintSamplerPtr goal_sampler_;
128 
129  std::vector<robot_state::RobotStatePtr> possible_goal_states_;
130 
131  robot_state::RobotStatePtr approach_state_;
132 
133  // The sequence of trajectories produced for execution
134  std::vector<plan_execution::ExecutableTrajectory> trajectories_;
135 
136  // An error code reflecting what went wrong (if anything)
137  moveit_msgs::MoveItErrorCodes error_code_;
138 
139  // The processing stage that was last working on this plan, or was about to work on this plan
140  std::size_t processing_stage_;
141 
142  // An id for this plan; this is usually the index of the Grasp / PlaceLocation in the input request
143  std::size_t id_;
144 };
145 }
146 
147 #endif
constraint_samplers::ConstraintSamplerPtr goal_sampler_
trajectory_msgs::JointTrajectory retreat_posture_
moveit_msgs::GripperTranslation retreat_
moveit_msgs::MoveItErrorCodes error_code_
moveit_msgs::GripperTranslation approach_
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_
EIGEN_MAKE_ALIGNED_OPERATOR_NEW ManipulationPlan(const 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 Sun Oct 18 2020 13:18:24