move_group_interface.h
Go to the documentation of this file.
1 /*********************************************************************
2  * Software License Agreement (BSD License)
3  *
4  * Copyright (c) 2014, SRI International
5  * Copyright (c) 2012, Willow Garage, Inc.
6  * All rights reserved.
7  *
8  * Redistribution and use in source and binary forms, with or without
9  * modification, are permitted provided that the following conditions
10  * are met:
11  *
12  * * Redistributions of source code must retain the above copyright
13  * notice, this list of conditions and the following disclaimer.
14  * * Redistributions in binary form must reproduce the above
15  * copyright notice, this list of conditions and the following
16  * disclaimer in the documentation and/or other materials provided
17  * with the distribution.
18  * * Neither the name of Willow Garage nor the names of its
19  * contributors may be used to endorse or promote products derived
20  * from this software without specific prior written permission.
21  *
22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25  * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32  * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33  * POSSIBILITY OF SUCH DAMAGE.
34  *********************************************************************/
35 
36 /* Author: Ioan Sucan, Sachin Chitta */
37 
38 #pragma once
39 
42 #include <moveit_msgs/RobotTrajectory.h>
43 #include <moveit_msgs/RobotState.h>
44 #include <moveit_msgs/PlannerInterfaceDescription.h>
45 #include <moveit_msgs/Constraints.h>
46 #include <moveit_msgs/Grasp.h>
47 #include <moveit_msgs/PlaceLocation.h>
48 #include <moveit_msgs/PickupGoal.h>
49 #include <moveit_msgs/PlaceGoal.h>
50 #include <moveit_msgs/MotionPlanRequest.h>
51 #include <moveit_msgs/MoveGroupAction.h>
52 #include <geometry_msgs/PoseStamped.h>
54 #include <memory>
55 #include <utility>
56 #include <tf2_ros/buffer.h>
57 
58 namespace moveit
59 {
61 namespace planning_interface
62 {
63 class MoveItErrorCode : public moveit_msgs::MoveItErrorCodes
64 {
65 public:
67  {
68  val = 0;
69  }
70  MoveItErrorCode(int code)
71  {
72  val = code;
73  }
74  MoveItErrorCode(const moveit_msgs::MoveItErrorCodes& code)
75  {
76  val = code.val;
77  }
78  explicit operator bool() const
79  {
80  return val == moveit_msgs::MoveItErrorCodes::SUCCESS;
81  }
82  bool operator==(const int c) const
83  {
84  return val == c;
85  }
86  bool operator!=(const int c) const
87  {
88  return val != c;
89  }
90 };
91 
92 MOVEIT_CLASS_FORWARD(MoveGroupInterface); // Defines MoveGroupInterfacePtr, ConstPtr, WeakPtr... etc
93 
99 class MoveGroupInterface
100 {
101 public:
103  static const std::string ROBOT_DESCRIPTION;
104 
106  struct Options
107  {
108  Options(std::string group_name, std::string desc = ROBOT_DESCRIPTION,
109  const ros::NodeHandle& node_handle = ros::NodeHandle())
110  : group_name_(std::move(group_name)), robot_description_(std::move(desc)), node_handle_(node_handle)
111  {
112  }
113 
115  std::string group_name_;
116 
118  std::string robot_description_;
119 
121  moveit::core::RobotModelConstPtr robot_model_;
122 
124  };
125 
126  MOVEIT_STRUCT_FORWARD(Plan);
127 
129  struct Plan
130  {
132  moveit_msgs::RobotState start_state_;
133 
135  moveit_msgs::RobotTrajectory trajectory_;
136 
138  double planning_time_;
139  };
140 
151  MoveGroupInterface(const Options& opt,
152  const std::shared_ptr<tf2_ros::Buffer>& tf_buffer = std::shared_ptr<tf2_ros::Buffer>(),
153  const ros::WallDuration& wait_for_servers = ros::WallDuration());
154  [[deprecated]] MoveGroupInterface(const Options& opt, const std::shared_ptr<tf2_ros::Buffer>& tf_buffer,
155  const ros::Duration& wait_for_servers);
156 
164  MoveGroupInterface(const std::string& group,
165  const std::shared_ptr<tf2_ros::Buffer>& tf_buffer = std::shared_ptr<tf2_ros::Buffer>(),
166  const ros::WallDuration& wait_for_servers = ros::WallDuration());
167  [[deprecated]] MoveGroupInterface(const std::string& group, const std::shared_ptr<tf2_ros::Buffer>& tf_buffer,
168  const ros::Duration& wait_for_servers);
169 
171 
179 
180  MoveGroupInterface(MoveGroupInterface&& other) noexcept;
183  const std::string& getName() const;
184 
187  const std::vector<std::string>& getNamedTargets() const;
188 
190  moveit::core::RobotModelConstPtr getRobotModel() const;
191 
193  const ros::NodeHandle& getNodeHandle() const;
194 
196  const std::string& getPlanningFrame() const;
197 
199  const std::vector<std::string>& getJointModelGroupNames() const;
200 
202  const std::vector<std::string>& getJointNames() const;
203 
205  const std::vector<std::string>& getLinkNames() const;
206 
208  std::map<std::string, double> getNamedTargetValues(const std::string& name) const;
209 
211  const std::vector<std::string>& getActiveJoints() const;
212 
214  const std::vector<std::string>& getJoints() const;
215 
218  unsigned int getVariableCount() const;
219 
221  bool getInterfaceDescription(moveit_msgs::PlannerInterfaceDescription& desc) const;
222 
224  std::map<std::string, std::string> getPlannerParams(const std::string& planner_id,
225  const std::string& group = "") const;
226 
228  void setPlannerParams(const std::string& planner_id, const std::string& group,
229  const std::map<std::string, std::string>& params, bool bReplace = false);
230 
232  std::string getDefaultPlannerId(const std::string& group = "") const;
233 
235  void setPlannerId(const std::string& planner_id);
236 
238  const std::string& getPlannerId() const;
239 
241  void setPlanningTime(double seconds);
242 
245  void setNumPlanningAttempts(unsigned int num_planning_attempts);
246 
252  void setMaxVelocityScalingFactor(double max_velocity_scaling_factor);
253 
259  void setMaxAccelerationScalingFactor(double max_acceleration_scaling_factor);
260 
262  double getPlanningTime() const;
263 
266  double getGoalJointTolerance() const;
267 
270  double getGoalPositionTolerance() const;
271 
274  double getGoalOrientationTolerance() const;
275 
282  void setGoalTolerance(double tolerance);
283 
286  void setGoalJointTolerance(double tolerance);
287 
289  void setGoalPositionTolerance(double tolerance);
290 
292  void setGoalOrientationTolerance(double tolerance);
293 
298  void setWorkspace(double minx, double miny, double minz, double maxx, double maxy, double maxz);
299 
302  void setStartState(const moveit_msgs::RobotState& start_state);
303 
306  void setStartState(const moveit::core::RobotState& start_state);
307 
310 
313  void setSupportSurfaceName(const std::string& name);
314 
344  bool setJointValueTarget(const std::vector<double>& group_variable_values);
345 
361  bool setJointValueTarget(const std::map<std::string, double>& variable_values);
362 
378  bool setJointValueTarget(const std::vector<std::string>& variable_names, const std::vector<double>& variable_values);
379 
389  bool setJointValueTarget(const moveit::core::RobotState& robot_state);
390 
402  bool setJointValueTarget(const std::string& joint_name, const std::vector<double>& values);
403 
415  bool setJointValueTarget(const std::string& joint_name, double value);
416 
427  bool setJointValueTarget(const sensor_msgs::JointState& state);
428 
440  bool setJointValueTarget(const geometry_msgs::Pose& eef_pose, const std::string& end_effector_link = "");
441 
453  bool setJointValueTarget(const geometry_msgs::PoseStamped& eef_pose, const std::string& end_effector_link = "");
454 
466  bool setJointValueTarget(const Eigen::Isometry3d& eef_pose, const std::string& end_effector_link = "");
467 
478  bool setApproximateJointValueTarget(const geometry_msgs::Pose& eef_pose, const std::string& end_effector_link = "");
479 
490  bool setApproximateJointValueTarget(const geometry_msgs::PoseStamped& eef_pose,
491  const std::string& end_effector_link = "");
492 
503  bool setApproximateJointValueTarget(const Eigen::Isometry3d& eef_pose, const std::string& end_effector_link = "");
504 
509  void setRandomTarget();
510 
513  bool setNamedTarget(const std::string& name);
514 
516  void getJointValueTarget(std::vector<double>& group_variable_values) const;
517 
519  [[deprecated]] const moveit::core::RobotState& getJointValueTarget() const;
520 
542  bool setPositionTarget(double x, double y, double z, const std::string& end_effector_link = "");
543 
551  bool setRPYTarget(double roll, double pitch, double yaw, const std::string& end_effector_link = "");
552 
561  bool setOrientationTarget(double x, double y, double z, double w, const std::string& end_effector_link = "");
562 
570  bool setPoseTarget(const Eigen::Isometry3d& end_effector_pose, const std::string& end_effector_link = "");
571 
579  bool setPoseTarget(const geometry_msgs::Pose& target, const std::string& end_effector_link = "");
580 
588  bool setPoseTarget(const geometry_msgs::PoseStamped& target, const std::string& end_effector_link = "");
589 
608  bool setPoseTargets(const EigenSTL::vector_Isometry3d& end_effector_pose, const std::string& end_effector_link = "");
609 
628  bool setPoseTargets(const std::vector<geometry_msgs::Pose>& target, const std::string& end_effector_link = "");
629 
648  bool setPoseTargets(const std::vector<geometry_msgs::PoseStamped>& target, const std::string& end_effector_link = "");
649 
651  void setPoseReferenceFrame(const std::string& pose_reference_frame);
652 
656  bool setEndEffectorLink(const std::string& end_effector_link);
657 
660  bool setEndEffector(const std::string& eef_name);
661 
663  void clearPoseTarget(const std::string& end_effector_link = "");
664 
666  void clearPoseTargets();
667 
674  const geometry_msgs::PoseStamped& getPoseTarget(const std::string& end_effector_link = "") const;
675 
681  const std::vector<geometry_msgs::PoseStamped>& getPoseTargets(const std::string& end_effector_link = "") const;
682 
688  const std::string& getEndEffectorLink() const;
689 
695  const std::string& getEndEffector() const;
696 
699  const std::string& getPoseReferenceFrame() const;
700 
712 
717 
723 
728 
731 
733  MoveItErrorCode asyncExecute(const moveit_msgs::RobotTrajectory& trajectory);
734 
737 
739  MoveItErrorCode execute(const moveit_msgs::RobotTrajectory& trajectory);
740 
750  double computeCartesianPath(const std::vector<geometry_msgs::Pose>& waypoints, double eef_step, double jump_threshold,
751  moveit_msgs::RobotTrajectory& trajectory, bool avoid_collisions = true,
752  moveit_msgs::MoveItErrorCodes* error_code = nullptr);
753 
766  double computeCartesianPath(const std::vector<geometry_msgs::Pose>& waypoints, double eef_step, double jump_threshold,
767  moveit_msgs::RobotTrajectory& trajectory,
768  const moveit_msgs::Constraints& path_constraints, bool avoid_collisions = true,
769  moveit_msgs::MoveItErrorCodes* error_code = nullptr);
770 
772  void stop();
773 
776  void allowLooking(bool flag);
777 
779  void allowReplanning(bool flag);
780 
783  void constructMotionPlanRequest(moveit_msgs::MotionPlanRequest& request);
784 
786  moveit_msgs::PickupGoal constructPickupGoal(const std::string& object, std::vector<moveit_msgs::Grasp> grasps,
787  bool plan_only) const;
788 
790  moveit_msgs::PlaceGoal constructPlaceGoal(const std::string& object,
791  std::vector<moveit_msgs::PlaceLocation> locations, bool plan_only) const;
792 
794  std::vector<moveit_msgs::PlaceLocation>
795  posesToPlaceLocations(const std::vector<geometry_msgs::PoseStamped>& poses) const;
796 
807  MoveItErrorCode pick(const std::string& object, bool plan_only = false)
808  {
809  return pick(constructPickupGoal(object, std::vector<moveit_msgs::Grasp>(), plan_only));
810  }
811 
813  MoveItErrorCode pick(const std::string& object, const moveit_msgs::Grasp& grasp, bool plan_only = false)
814  {
815  return pick(constructPickupGoal(object, { grasp }, plan_only));
816  }
817 
819  MoveItErrorCode pick(const std::string& object, std::vector<moveit_msgs::Grasp> grasps, bool plan_only = false)
820  {
821  return pick(constructPickupGoal(object, std::move(grasps), plan_only));
822  }
823 
828  MoveItErrorCode pick(const moveit_msgs::PickupGoal& goal);
829 
833  MoveItErrorCode planGraspsAndPick(const std::string& object = "", bool plan_only = false);
834 
838  MoveItErrorCode planGraspsAndPick(const moveit_msgs::CollisionObject& object, bool plan_only = false);
839 
841  MoveItErrorCode place(const std::string& object, bool plan_only = false)
842  {
843  return place(constructPlaceGoal(object, std::vector<moveit_msgs::PlaceLocation>(), plan_only));
844  }
845 
847  MoveItErrorCode place(const std::string& object, std::vector<moveit_msgs::PlaceLocation> locations,
848  bool plan_only = false)
849  {
850  return place(constructPlaceGoal(object, std::move(locations), plan_only));
851  }
852 
854  MoveItErrorCode place(const std::string& object, const std::vector<geometry_msgs::PoseStamped>& poses,
855  bool plan_only = false)
856  {
857  return place(constructPlaceGoal(object, posesToPlaceLocations(poses), plan_only));
858  }
859 
861  MoveItErrorCode place(const std::string& object, const geometry_msgs::PoseStamped& pose, bool plan_only = false)
862  {
863  return place(constructPlaceGoal(object, posesToPlaceLocations({ pose }), plan_only));
864  }
865 
870  MoveItErrorCode place(const moveit_msgs::PlaceGoal& goal);
871 
878  bool attachObject(const std::string& object, const std::string& link = "");
879 
888  bool attachObject(const std::string& object, const std::string& link, const std::vector<std::string>& touch_links);
889 
895  bool detachObject(const std::string& name = "");
896 
909  bool startStateMonitor(double wait = 1.0);
910 
912  std::vector<double> getCurrentJointValues() const;
913 
915  moveit::core::RobotStatePtr getCurrentState(double wait = 1) const;
916 
920  geometry_msgs::PoseStamped getCurrentPose(const std::string& end_effector_link = "") const;
921 
925  std::vector<double> getCurrentRPY(const std::string& end_effector_link = "") const;
926 
928  std::vector<double> getRandomJointValues() const;
929 
933  geometry_msgs::PoseStamped getRandomPose(const std::string& end_effector_link = "") const;
934 
946  void rememberJointValues(const std::string& name);
947 
952  void rememberJointValues(const std::string& name, const std::vector<double>& values);
953 
955  const std::map<std::string, std::vector<double> >& getRememberedJointValues() const
956  {
958  }
959 
961  void forgetJointValues(const std::string& name);
962 
971  void setConstraintsDatabase(const std::string& host, unsigned int port);
972 
974  std::vector<std::string> getKnownConstraints() const;
975 
979  moveit_msgs::Constraints getPathConstraints() const;
980 
984  bool setPathConstraints(const std::string& constraint);
985 
989  void setPathConstraints(const moveit_msgs::Constraints& constraint);
990 
993  void clearPathConstraints();
994 
995  moveit_msgs::TrajectoryConstraints getTrajectoryConstraints() const;
996  void setTrajectoryConstraints(const moveit_msgs::TrajectoryConstraints& constraint);
998 
1001 protected:
1004 
1005 private:
1006  std::map<std::string, std::vector<double> > remembered_joint_values_;
1007  class MoveGroupInterfaceImpl;
1008  MoveGroupInterfaceImpl* impl_;
1009 };
1010 } // namespace planning_interface
1011 } // namespace moveit
moveit::planning_interface::MoveGroupInterface::place
MoveItErrorCode place(const std::string &object, bool plan_only=false)
Place an object somewhere safe in the world (a safe location will be detected)
Definition: move_group_interface.h:907
moveit::planning_interface::MoveGroupInterface::getEndEffector
const std::string & getEndEffector() const
Get the current end-effector name. This returns the value set by setEndEffector() (or indirectly by s...
Definition: move_group_interface.cpp:1821
moveit::planning_interface::MoveGroupInterface::setStartState
void setStartState(const moveit_msgs::RobotState &start_state)
If a different start state should be considered instead of the current state of the robot,...
Definition: move_group_interface.cpp:1614
moveit::planning_interface::MoveGroupInterface::getPlannerParams
std::map< std::string, std::string > getPlannerParams(const std::string &planner_id, const std::string &group="") const
Get the planner parameters for given group and planner_id.
Definition: move_group_interface.cpp:1460
moveit::planning_interface::MoveGroupInterface::plan
MoveItErrorCode plan(Plan &plan)
Compute a motion plan that takes the group declared in the constructor from the current state to the ...
Definition: move_group_interface.cpp:1537
moveit::planning_interface::MoveGroupInterface::setPoseTarget
bool setPoseTarget(const Eigen::Isometry3d &end_effector_pose, const std::string &end_effector_link="")
Set the goal pose of the end-effector end_effector_link.
Definition: move_group_interface.cpp:1853
moveit::planning_interface::MoveGroupInterface::setJointValueTarget
bool setJointValueTarget(const std::vector< double > &group_variable_values)
Set the JointValueTarget and use it for future planning requests.
Definition: move_group_interface.cpp:1692
moveit::planning_interface::MoveGroupInterface::getKnownConstraints
std::vector< std::string > getKnownConstraints() const
Get the names of the known constraints as read from the Mongo database, if a connection was achieved.
Definition: move_group_interface.cpp:2212
moveit::planning_interface::MoveGroupInterface::getTrajectoryConstraints
moveit_msgs::TrajectoryConstraints getTrajectoryConstraints() const
Definition: move_group_interface.cpp:2237
moveit::planning_interface::MoveGroupInterface::getJoints
const std::vector< std::string > & getJoints() const
Get all the joints this instance operates on (including fixed joints)
Definition: move_group_interface.cpp:2175
moveit::planning_interface::MoveGroupInterface::getMoveGroupClient
actionlib::SimpleActionClient< moveit_msgs::MoveGroupAction > & getMoveGroupClient() const
Get the move_group action client used by the MoveGroupInterface. The client can be used for querying ...
Definition: move_group_interface.cpp:1507
moveit::planning_interface::MoveGroupInterface::startStateMonitor
bool startStateMonitor(double wait=1.0)
When reasoning about the current state of a robot, a CurrentStateMonitor instance is automatically co...
Definition: move_group_interface.cpp:2073
moveit::planning_interface::MoveGroupInterface::setGoalOrientationTolerance
void setGoalOrientationTolerance(double tolerance)
Set the orientation tolerance that is used for reaching the goal when moving to a pose.
Definition: move_group_interface.cpp:2063
moveit::planning_interface::MoveGroupInterface::setOrientationTarget
bool setOrientationTarget(double x, double y, double z, double w, const std::string &end_effector_link="")
Set the goal orientation of the end-effector end_effector_link to be the quaternion (x,...
Definition: move_group_interface.cpp:1995
moveit::planning_interface::MoveGroupInterface::Plan
The representation of a motion plan (as ROS messasges)
Definition: move_group_interface.h:195
moveit::planning_interface::MoveGroupInterface::setStartStateToCurrentState
void setStartStateToCurrentState()
Set the starting state for planning to be that reported by the robot's joint state publication.
Definition: move_group_interface.cpp:1627
moveit::planning_interface::MoveGroupInterface::getCurrentState
moveit::core::RobotStatePtr getCurrentState(double wait=1) const
Get the current state of the robot within the duration specified by wait.
Definition: move_group_interface.cpp:2185
moveit::planning_interface::MoveGroupInterface
Client class to conveniently use the ROS interfaces provided by the move_group node.
Definition: move_group_interface.h:165
moveit::planning_interface::MoveGroupInterface::allowReplanning
void allowReplanning(bool flag)
Specify whether the robot is allowed to replan if it detects changes in the environment.
Definition: move_group_interface.cpp:2207
moveit::planning_interface::MoveGroupInterface::getVariableCount
unsigned int getVariableCount() const
Get the number of variables used to describe the state of this group. This is larger or equal to the ...
Definition: move_group_interface.cpp:2180
moveit::planning_interface::MoveGroupInterface::ROBOT_DESCRIPTION
static const std::string ROBOT_DESCRIPTION
Default ROS parameter name from where to read the robot's URDF. Set to 'robot_description'.
Definition: move_group_interface.h:169
moveit::planning_interface::MoveGroupInterface::move
MoveItErrorCode move()
Plan and execute a trajectory that takes the group of joints declared in the constructor to the speci...
Definition: move_group_interface.cpp:1512
moveit::planning_interface::MoveGroupInterface::asyncExecute
MoveItErrorCode asyncExecute(const Plan &plan)
Given a plan, execute it without waiting for completion.
Definition: move_group_interface.cpp:1517
moveit::planning_interface::MoveGroupInterface::forgetJointValues
void forgetJointValues(const std::string &name)
Forget the joint values remembered under name.
Definition: move_group_interface.cpp:2197
moveit::planning_interface::MoveGroupInterface::getPlanningFrame
const std::string & getPlanningFrame() const
Get the name of the frame in which the robot is planning.
Definition: move_group_interface.cpp:2279
moveit::planning_interface::MoveGroupInterface::setPlannerId
void setPlannerId(const std::string &planner_id)
Specify a planner to be used for further planning.
Definition: move_group_interface.cpp:1477
moveit::planning_interface::MoveGroupInterface::setGoalJointTolerance
void setGoalJointTolerance(double tolerance)
Set the joint tolerance (for each joint) that is used for reaching the goal when moving to a joint va...
Definition: move_group_interface.cpp:2053
moveit::planning_interface::MoveGroupInterface::getCurrentRPY
std::vector< double > getCurrentRPY(const std::string &end_effector_link="") const
Get the roll-pitch-yaw (XYZ) for the end-effector end_effector_link. If end_effector_link is empty (t...
Definition: move_group_interface.cpp:2143
moveit::planning_interface::MoveGroupInterface::getJointModelGroupNames
const std::vector< std::string > & getJointModelGroupNames() const
Get the available planning group names.
Definition: move_group_interface.cpp:2284
buffer.h
moveit::core::RobotState
moveit::planning_interface::MoveGroupInterface::setRandomTarget
void setRandomTarget()
Set the joint state goal to a random joint configuration.
Definition: move_group_interface.cpp:1632
robot_state.h
moveit::planning_interface::MoveGroupInterface::getCurrentJointValues
std::vector< double > getCurrentJointValues() const
Get the current joint values for the joints planned for by this instance (see getJoints())
Definition: move_group_interface.cpp:2078
moveit::planning_interface::MoveGroupInterface::setPlanningTime
void setPlanningTime(double seconds)
Specify the maximum amount of time to use when planning.
Definition: move_group_interface.cpp:2263
moveit::planning_interface::MoveGroupInterface::clearPathConstraints
void clearPathConstraints()
Specify that no path constraints are to be used. This removes any path constraints set in previous ca...
Definition: move_group_interface.cpp:2232
moveit::planning_interface::MoveGroupInterface::planGraspsAndPick
MoveItErrorCode planGraspsAndPick(const std::string &object="", bool plan_only=false)
Pick up an object.
Definition: move_group_interface.cpp:1567
moveit::planning_interface::MoveGroupInterface::getEndEffectorLink
const std::string & getEndEffectorLink() const
Get the current end-effector link. This returns the value set by setEndEffectorLink() (or indirectly ...
Definition: move_group_interface.cpp:1816
moveit::planning_interface::MoveGroupInterface::clearPoseTargets
void clearPoseTargets()
Forget any poses specified for all end-effectors.
Definition: move_group_interface.cpp:1848
moveit::planning_interface::MoveGroupInterface::getPoseTargets
const std::vector< geometry_msgs::PoseStamped > & getPoseTargets(const std::string &end_effector_link="") const
Definition: move_group_interface.cpp:1927
moveit::planning_interface::MoveGroupInterface::getTargetRobotState
const moveit::core::RobotState & getTargetRobotState() const
Definition: move_group_interface.cpp:1811
moveit::planning_interface::MoveGroupInterface::rememberJointValues
void rememberJointValues(const std::string &name)
Remember the current joint values (of the robot being monitored) under name. These can be used by set...
Definition: move_group_interface.cpp:2068
moveit::planning_interface::MoveGroupInterface::setPlannerParams
void setPlannerParams(const std::string &planner_id, const std::string &group, const std::map< std::string, std::string > &params, bool bReplace=false)
Set the planner parameters for given group and planner_id.
Definition: move_group_interface.cpp:1466
moveit::planning_interface::MoveGroupInterface::MOVEIT_STRUCT_FORWARD
MOVEIT_STRUCT_FORWARD(Plan)
moveit::planning_interface::MoveGroupInterface::setGoalPositionTolerance
void setGoalPositionTolerance(double tolerance)
Set the position tolerance that is used for reaching the goal when moving to a pose.
Definition: move_group_interface.cpp:2058
moveit::planning_interface::MoveGroupInterface::remembered_joint_values_
std::map< std::string, std::vector< double > > remembered_joint_values_
Definition: move_group_interface.h:1072
moveit::planning_interface::MoveGroupInterface::Options::Options
Options(std::string group_name, std::string desc=ROBOT_DESCRIPTION, const ros::NodeHandle &node_handle=ros::NodeHandle())
Definition: move_group_interface.h:174
moveit::planning_interface::MoveGroupInterface::computeCartesianPath
double computeCartesianPath(const std::vector< geometry_msgs::Pose > &waypoints, double eef_step, double jump_threshold, moveit_msgs::RobotTrajectory &trajectory, bool avoid_collisions=true, moveit_msgs::MoveItErrorCodes *error_code=nullptr)
Compute a Cartesian path that follows specified waypoints with a step size of at most eef_step meters...
Definition: move_group_interface.cpp:1582
moveit::planning_interface::MoveGroupInterface::allowLooking
void allowLooking(bool flag)
Specify whether the robot is allowed to look around before moving if it determines it should (default...
Definition: move_group_interface.cpp:2202
moveit::planning_interface::MoveGroupInterface::getDefaultPlannerId
std::string getDefaultPlannerId(const std::string &group="") const
Get the default planner for a given group (or global default)
Definition: move_group_interface.cpp:1472
moveit::planning_interface::MOVEIT_CLASS_FORWARD
MOVEIT_CLASS_FORWARD(MoveGroupInterface)
actionlib::SimpleActionClient
moveit::planning_interface::MoveGroupInterface::getPoseReferenceFrame
const std::string & getPoseReferenceFrame() const
Get the reference frame set by setPoseReferenceFrame(). By default this is the reference frame of the...
Definition: move_group_interface.cpp:2026
moveit::planning_interface::MoveGroupInterface::setConstraintsDatabase
void setConstraintsDatabase(const std::string &host, unsigned int port)
Specify where the database server that holds known constraints resides.
Definition: move_group_interface.cpp:2252
moveit::planning_interface::MoveGroupInterface::setPoseReferenceFrame
void setPoseReferenceFrame(const std::string &pose_reference_frame)
Specify which reference frame to assume for poses specified without a reference frame.
Definition: move_group_interface.cpp:2021
moveit::planning_interface::MoveGroupInterface::getRobotModel
moveit::core::RobotModelConstPtr getRobotModel() const
Get the RobotModel object.
Definition: move_group_interface.cpp:1445
moveit::planning_interface::MoveGroupInterface::getRandomPose
geometry_msgs::PoseStamped getRandomPose(const std::string &end_effector_link="") const
Get a random reachable pose for the end-effector end_effector_link. If end_effector_link is empty (th...
Definition: move_group_interface.cpp:2094
moveit::planning_interface::MoveGroupInterface::Options::robot_model_
moveit::core::RobotModelConstPtr robot_model_
Optionally, an instance of the RobotModel to use can be also specified.
Definition: move_group_interface.h:187
moveit::planning_interface::MoveGroupInterface::execute
MoveItErrorCode execute(const Plan &plan)
Given a plan, execute it while waiting for completion.
Definition: move_group_interface.cpp:1527
moveit::planning_interface::MoveGroupInterface::getNodeHandle
const ros::NodeHandle & getNodeHandle() const
Get the ROS node handle of this instance operates on.
Definition: move_group_interface.cpp:1450
simple_action_client.h
moveit::planning_interface::MoveGroupInterface::~MoveGroupInterface
~MoveGroupInterface()
Definition: move_group_interface.cpp:1409
moveit::planning_interface::MoveGroupInterface::setMaxVelocityScalingFactor
void setMaxVelocityScalingFactor(double max_velocity_scaling_factor)
Set a scaling factor for optionally reducing the maximum joint velocity. Allowed values are in (0,...
Definition: move_group_interface.cpp:1492
moveit::planning_interface::MoveGroupInterface::getName
const std::string & getName() const
Get the name of the group this instance operates on.
Definition: move_group_interface.cpp:1433
moveit::planning_interface::MoveGroupInterface::setMaxAccelerationScalingFactor
void setMaxAccelerationScalingFactor(double max_acceleration_scaling_factor)
Set a scaling factor for optionally reducing the maximum joint acceleration. Allowed values are in (0...
Definition: move_group_interface.cpp:1497
moveit::planning_interface::MoveGroupInterface::Options::node_handle_
ros::NodeHandle node_handle_
Definition: move_group_interface.h:189
moveit::planning_interface::MoveGroupInterface::setGoalTolerance
void setGoalTolerance(double tolerance)
Set the tolerance that is used for reaching the goal. For joint state goals, this will be distance fo...
Definition: move_group_interface.cpp:2046
moveit::planning_interface::MoveGroupInterface::setApproximateJointValueTarget
bool setApproximateJointValueTarget(const geometry_msgs::Pose &eef_pose, const std::string &end_effector_link="")
Set the joint state goal for a particular joint by computing IK.
Definition: move_group_interface.cpp:1787
moveit::planning_interface::MoveGroupInterface::setEndEffectorLink
bool setEndEffectorLink(const std::string &end_effector_link)
Specify the parent link of the end-effector. This end_effector_link will be used in calls to pose tar...
Definition: move_group_interface.cpp:1826
moveit::planning_interface::MoveGroupInterface::setRPYTarget
bool setRPYTarget(double roll, double pitch, double yaw, const std::string &end_effector_link="")
Set the goal orientation of the end-effector end_effector_link to be (roll,pitch,yaw) radians.
Definition: move_group_interface.cpp:1972
moveit::planning_interface::MoveGroupInterface::posesToPlaceLocations
std::vector< moveit_msgs::PlaceLocation > posesToPlaceLocations(const std::vector< geometry_msgs::PoseStamped > &poses) const
Convert a vector of PoseStamped to a vector of PlaceLocation.
Definition: move_group_interface.cpp:1557
moveit::planning_interface::MoveItErrorCode
Definition: move_group_interface.h:129
moveit::planning_interface::MoveGroupInterface::setTrajectoryConstraints
void setTrajectoryConstraints(const moveit_msgs::TrajectoryConstraints &constraint)
Definition: move_group_interface.cpp:2242
moveit::planning_interface::MoveGroupInterface::setPathConstraints
bool setPathConstraints(const std::string &constraint)
Specify a set of path constraints to use. The constraints are looked up by name from the Mongo databa...
Definition: move_group_interface.cpp:2222
moveit::planning_interface::MoveGroupInterface::stop
void stop()
Stop any trajectory execution, if one is active.
Definition: move_group_interface.cpp:1609
moveit::planning_interface::MoveGroupInterface::Options::robot_description_
std::string robot_description_
The robot description parameter name (if different from default)
Definition: move_group_interface.h:184
moveit::planning_interface::MoveGroupInterface::getPoseTarget
const geometry_msgs::PoseStamped & getPoseTarget(const std::string &end_effector_link="") const
Definition: move_group_interface.cpp:1921
moveit::planning_interface::MoveGroupInterface::getGoalJointTolerance
double getGoalJointTolerance() const
Get the tolerance that is used for reaching a joint goal. This is distance for each joint in configur...
Definition: move_group_interface.cpp:2031
moveit::planning_interface::MoveGroupInterface::getRandomJointValues
std::vector< double > getRandomJointValues() const
Get random joint values for the joints planned for by this instance (see getJoints())
Definition: move_group_interface.cpp:2087
moveit::planning_interface::MoveGroupInterface::getPlannerId
const std::string & getPlannerId() const
Get the current planner_id.
Definition: move_group_interface.cpp:1482
moveit::planning_interface::MoveGroupInterface::getJointValueTarget
const moveit::core::RobotState & getJointValueTarget() const
Get the currently set joint state goal, replaced by private getTargetRobotState()
Definition: move_group_interface.cpp:1806
moveit::planning_interface::MoveGroupInterface::operator=
MoveGroupInterface & operator=(const MoveGroupInterface &)=delete
moveit::planning_interface::MoveGroupInterface::clearTrajectoryConstraints
void clearTrajectoryConstraints()
Definition: move_group_interface.cpp:2247
moveit::planning_interface::MoveGroupInterface::constructPlaceGoal
moveit_msgs::PlaceGoal constructPlaceGoal(const std::string &object, std::vector< moveit_msgs::PlaceLocation > locations, bool plan_only) const
Build a PlaceGoal for an object named object and store it in goal_out.
Definition: move_group_interface.cpp:1549
moveit
moveit::planning_interface::MoveGroupInterface::getNamedTargets
const std::vector< std::string > & getNamedTargets() const
Get the names of the named robot states available as targets, both either remembered states or defaul...
Definition: move_group_interface.cpp:1438
moveit::planning_interface::MoveGroupInterface::setSupportSurfaceName
void setSupportSurfaceName(const std::string &name)
For pick/place operations, the name of the support surface is used to specify the fact that attached ...
Definition: move_group_interface.cpp:2274
class_forward.h
moveit::planning_interface::MoveGroupInterface::clearPoseTarget
void clearPoseTarget(const std::string &end_effector_link="")
Forget pose(s) specified for end_effector_link.
Definition: move_group_interface.cpp:1843
moveit::planning_interface::MoveGroupInterface::setNumPlanningAttempts
void setNumPlanningAttempts(unsigned int num_planning_attempts)
Set the number of times the motion plan is to be computed from scratch before the shortest solution i...
Definition: move_group_interface.cpp:1487
std
planning_interface
moveit::planning_interface::MoveGroupInterface::setPositionTarget
bool setPositionTarget(double x, double y, double z, const std::string &end_effector_link="")
Set the goal position of the end-effector end_effector_link to be (x, y, z).
Definition: move_group_interface.cpp:1947
moveit::planning_interface::MoveGroupInterface::getInterfaceDescription
bool getInterfaceDescription(moveit_msgs::PlannerInterfaceDescription &desc) const
Get the description of the planning plugin loaded by the action server.
Definition: move_group_interface.cpp:1455
moveit::planning_interface::MoveGroupInterface::Plan::trajectory_
moveit_msgs::RobotTrajectory trajectory_
The trajectory of the robot (may not contain joints that are the same as for the start_state_)
Definition: move_group_interface.h:201
moveit::planning_interface::MoveGroupInterface::Plan::planning_time_
double planning_time_
The amount of time it took to generate the plan.
Definition: move_group_interface.h:204
moveit::planning_interface::MoveGroupInterface::attachObject
bool attachObject(const std::string &object, const std::string &link="")
Given the name of an object in the planning scene, make the object attached to a link of the robot....
Definition: move_group_interface.cpp:2289
moveit::planning_interface::MoveGroupInterface::setWorkspace
void setWorkspace(double minx, double miny, double minz, double maxx, double maxy, double maxz)
Specify the workspace bounding box. The box is specified in the planning frame (i....
Definition: move_group_interface.cpp:2257
moveit::planning_interface::MoveGroupInterface::pick
MoveItErrorCode pick(const std::string &object, bool plan_only=false)
Pick up an object.
Definition: move_group_interface.h:873
moveit::planning_interface::MoveGroupInterface::impl_
MoveGroupInterfaceImpl * impl_
Definition: move_group_interface.h:1073
moveit::planning_interface::MoveItErrorCode::operator==
bool operator==(const int c) const
Definition: move_group_interface.h:181
moveit::planning_interface::MoveGroupInterface::getPathConstraints
moveit_msgs::Constraints getPathConstraints() const
Get the actual set of constraints in use with this MoveGroupInterface.
Definition: move_group_interface.cpp:2217
moveit::planning_interface::MoveGroupInterface::getPlanningTime
double getPlanningTime() const
Get the number of seconds set by setPlanningTime()
Definition: move_group_interface.cpp:2269
moveit::planning_interface::MoveGroupInterface::MoveGroupInterface
MoveGroupInterface(const Options &opt, const std::shared_ptr< tf2_ros::Buffer > &tf_buffer=std::shared_ptr< tf2_ros::Buffer >(), const ros::WallDuration &wait_for_servers=ros::WallDuration())
Construct a MoveGroupInterface instance call using a specified set of options opt.
Definition: move_group_interface.cpp:1396
moveit::planning_interface::MoveGroupInterface::getActiveJoints
const std::vector< std::string > & getActiveJoints() const
Get only the active (actuated) joints this instance operates on.
Definition: move_group_interface.cpp:2170
moveit::planning_interface::MoveGroupInterface::getLinkNames
const std::vector< std::string > & getLinkNames() const
Get vector of names of links available in move group.
Definition: move_group_interface.cpp:1643
moveit::planning_interface::MoveGroupInterface::getJointNames
const std::vector< std::string > & getJointNames() const
Get vector of names of joints available in move group.
Definition: move_group_interface.cpp:1638
moveit::planning_interface::MoveGroupInterface::setPoseTargets
bool setPoseTargets(const EigenSTL::vector_Isometry3d &end_effector_pose, const std::string &end_effector_link="")
Set goal poses for end_effector_link.
Definition: move_group_interface.cpp:1877
moveit::planning_interface::MoveGroupInterface::setNamedTarget
bool setNamedTarget(const std::string &name)
Set the current joint values to be ones previously remembered by rememberJointValues() or,...
Definition: move_group_interface.cpp:1668
moveit::planning_interface::MoveGroupInterface::getRememberedJointValues
const std::map< std::string, std::vector< double > > & getRememberedJointValues() const
Get the currently remembered map of names to joint values.
Definition: move_group_interface.h:1021
moveit::planning_interface::MoveGroupInterface::getGoalOrientationTolerance
double getGoalOrientationTolerance() const
Get the tolerance that is used for reaching an orientation goal. This is the tolerance for roll,...
Definition: move_group_interface.cpp:2041
ros::WallDuration
moveit::planning_interface::MoveItErrorCode::MoveItErrorCode
MoveItErrorCode()
Definition: move_group_interface.h:165
moveit::planning_interface::MoveGroupInterface::Plan::start_state_
moveit_msgs::RobotState start_state_
The full starting state used for planning.
Definition: move_group_interface.h:198
moveit::planning_interface::MoveGroupInterface::getNamedTargetValues
std::map< std::string, double > getNamedTargetValues(const std::string &name) const
Get the joint angles for targets specified by name.
Definition: move_group_interface.cpp:1648
moveit::planning_interface::MoveGroupInterface::asyncMove
MoveItErrorCode asyncMove()
Plan and execute a trajectory that takes the group of joints declared in the constructor to the speci...
Definition: move_group_interface.cpp:1502
moveit::planning_interface::MoveGroupInterface::constructMotionPlanRequest
void constructMotionPlanRequest(moveit_msgs::MotionPlanRequest &request)
Build the MotionPlanRequest that would be sent to the move_group action with plan() or move() and sto...
Definition: move_group_interface.cpp:2305
ros::Duration
moveit::planning_interface::MoveGroupInterface::getCurrentPose
geometry_msgs::PoseStamped getCurrentPose(const std::string &end_effector_link="") const
Get the pose for the end-effector end_effector_link. If end_effector_link is empty (the default value...
Definition: move_group_interface.cpp:2119
moveit::planning_interface::MoveGroupInterface::detachObject
bool detachObject(const std::string &name="")
Detach an object. name specifies the name of the object attached to this group, or the name of the li...
Definition: move_group_interface.cpp:2300
moveit::planning_interface::MoveGroupInterface::setEndEffector
bool setEndEffector(const std::string &eef_name)
Specify the name of the end-effector to use. This is equivalent to setting the EndEffectorLink to the...
Definition: move_group_interface.cpp:1835
moveit::planning_interface::MoveItErrorCode::operator!=
bool operator!=(const int c) const
Definition: move_group_interface.h:185
moveit::planning_interface::MoveGroupInterface::Options::group_name_
std::string group_name_
The group to construct the class instance for.
Definition: move_group_interface.h:181
ros::NodeHandle
moveit::planning_interface::MoveGroupInterface::constructPickupGoal
moveit_msgs::PickupGoal constructPickupGoal(const std::string &object, std::vector< moveit_msgs::Grasp > grasps, bool plan_only) const
Build a PickupGoal for an object named object and store it in goal_out.
Definition: move_group_interface.cpp:1542
moveit::planning_interface::MoveGroupInterface::getGoalPositionTolerance
double getGoalPositionTolerance() const
Get the tolerance that is used for reaching a position goal. This is be the radius of a sphere where ...
Definition: move_group_interface.cpp:2036
test_cleanup.group
group
Definition: test_cleanup.py:5


planning_interface
Author(s): Ioan Sucan
autogenerated on Sat Dec 12 2020 03:27:08