  * [ Getting Started ](../getting_started/getting_started.html)
    * [ Install ROS and Catkin ](../getting_started/getting_started.html#install-ros-and-catkin)
    * [ Create a Catkin Workspace ](../getting_started/getting_started.html#create-a-catkin-workspace)
    * [ Download MoveIt Source ](../getting_started/getting_started.html#download-moveit-source)
    * [ Download Example Code ](../getting_started/getting_started.html#download-example-code)
    * [ Build your Catkin Workspace ](../getting_started/getting_started.html#build-your-catkin-workspace)
    * [ Next Step ](../getting_started/getting_started.html#next-step)
  * [ MoveIt Quickstart in RViz ](../quickstart_in_rviz/quickstart_in_rviz_tutorial.html)
    * [ Getting Started ](../quickstart_in_rviz/quickstart_in_rviz_tutorial.html#getting-started)
    * [ Step 1: Launch the Demo and Configure the Plugin ](../quickstart_in_rviz/quickstart_in_rviz_tutorial.html#step-1-launch-the-demo-and-configure-the-plugin)
    * [ Step 2: Play with the Visualized Robots ](../quickstart_in_rviz/quickstart_in_rviz_tutorial.html#step-2-play-with-the-visualized-robots)
    * [ Step 3: Interact with the Panda ](../quickstart_in_rviz/quickstart_in_rviz_tutorial.html#step-3-interact-with-the-panda)
      * [ Moving into collision ](../quickstart_in_rviz/quickstart_in_rviz_tutorial.html#moving-into-collision)
      * [ Moving out of Reachable Workspace ](../quickstart_in_rviz/quickstart_in_rviz_tutorial.html#moving-out-of-reachable-workspace)
      * [ Moving Joints or in Null Space ](../quickstart_in_rviz/quickstart_in_rviz_tutorial.html#moving-joints-or-in-null-space)
    * [ Step 4: Use Motion Planning with the Panda ](../quickstart_in_rviz/quickstart_in_rviz_tutorial.html#step-4-use-motion-planning-with-the-panda)
      * [ Choosing Specific Start/Goal States ](../quickstart_in_rviz/quickstart_in_rviz_tutorial.html#choosing-specific-start-goal-states)
      * [ Introspecting Trajectory Waypoints ](../quickstart_in_rviz/quickstart_in_rviz_tutorial.html#introspecting-trajectory-waypoints)
      * [ Plan Cartesian motions ](../quickstart_in_rviz/quickstart_in_rviz_tutorial.html#plan-cartesian-motions)
      * [ Executing Trajectories, Adjusting Speed ](../quickstart_in_rviz/quickstart_in_rviz_tutorial.html#executing-trajectories-adjusting-speed)
    * [ Next Steps ](../quickstart_in_rviz/quickstart_in_rviz_tutorial.html#next-steps)
      * [ RViz Visual Tools ](../quickstart_in_rviz/quickstart_in_rviz_tutorial.html#rviz-visual-tools)
      * [ Saving Your Configuration ](../quickstart_in_rviz/quickstart_in_rviz_tutorial.html#saving-your-configuration)
      * [ Next Tutorials ](../quickstart_in_rviz/quickstart_in_rviz_tutorial.html#next-tutorials)


This new position target replaces any pre-existing JointValueTarget or pre-
existing Position, Orientation, or Pose target for this _end_effector_link_ .


If these values are out of bounds then false is returned BUT THE VALUES ARE
STILL SET AS THE GOAL.


934  }


void moveit::planning_interface::MoveGroupInterface::setGoalTolerance  |  (  |
double  |  _tolerance_ |  )  |
---|---|---|---|---|---

Set the tolerance that is used for reaching the goal. For joint state goals,
this will be distance for each joint, in the configuration space (radians or
meters depending on joint type). For pose goals this will be the radius of a
sphere where the end-effector must reach. This function simply triggers calls
to [ setGoalPositionTolerance()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a25e58a6cc1c120409cfa5f256716ffca
"Set the position tolerance that is used for reaching the goal when moving to
a pose. ") , [ setGoalOrientationTolerance()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a7f803a9f365c5c37801c04611d1db933
"Set the orientation tolerance that is used for reaching the goal when moving
to a pose...") and [ setGoalJointTolerance()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a8ec9d8fa132c8d807a5e48d18c579187
"Set the joint tolerance \(for each joint\) that is used for reaching the goal
when moving to a joint va...") .


79  return  val == moveit_msgs::MoveItErrorCodes::SUCCESS;


robot_model::RobotModelConstPtr robot_model_


This new orientation target replaces any pre-existing JointValueTarget or pre-
existing Position, Orientation, or Pose target for this _end_effector_link_ .


##  A Note on Setting Tolerances  ¶


**Definition:** [ move_group_interface.h:102
](move__group__interface_8h_source.html#l00102)


const std::string & moveit::planning_interface::MoveGroupInterface::getName  |
(  |  |  )  |  const
---|---|---|---|---

Get the name of the group this instance operates on.


void moveit::planning_interface::MoveGroupInterface::setPathConstraints  |  (
|  const moveit_msgs::Constraints & |  _constraint_ |  )  |
---|---|---|---|---|---

Specify a set of path constraints to use. This version does not require a
database server. This replaces any path constraints set in previous calls to [
setPathConstraints()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#ac74ec94967a06f6b1da8ea6e060b7444
"Specify a set of path constraints to use. The constraints are looked up by
name from the Mongo databa...") .


[ 128
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Plan.html)
struct  [ Plan
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Plan.html)


30  * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT


**Note:** This tutorial uses the **RvizVisualToolsGui** panel to step through
the demo. To add this panel to RViz, follow the instructions in the [
Visualization Tutorial
](../quickstart_in_rviz/quickstart_in_rviz_tutorial.html#rviz-visual-tools) .


When planning, the planner will find a path to one (arbitrarily chosen) pose
from the list. If this group contains multiple end effectors then all end
effectors in the group should have the same number of pose targets. If
planning is successful then the result of the plan will place all end
effectors at a pose from the same index in the list. (In other words, if one
end effector ends up at the 3rd pose in the list then all end effectors in the
group will end up at the 3rd pose in their respective lists. End effectors
which do not matter (i.e. can end up in any position) can have their pose
targets disabled by calling [ clearPoseTarget()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a837dd04d54218876236da957faf82374
"Forget pose\(s\) specified for end_effector_link. ") for that
end_effector_link.


void moveit::planning_interface::MoveGroupInterface::setSupportSurfaceName  |
(  |  const std::string & |  _name_ |  )  |
---|---|---|---|---|---

For pick/place operations, the name of the support surface is used to specify
the fact that attached objects are allowed to touch the support surface.


##  Classes

---
class  |  [ MoveGroupInterfaceImpl
](classmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1MoveGroupInterfaceImpl.html)
struct  |  [ Options
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Options.html)
|  Specification of options to use when constructing the [ MoveGroupInterface
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html "Client class
to conveniently use the ROS interfaces provided by the move_group node. ")
class. [ More...
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Options.html#details)

struct  |  [ Plan
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Plan.html)
|  The representation of a motion plan (as ROS messasges) [ More...
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Plan.html#details)

##  Public Member Functions

---
const std::vector< std::string > & |  [ getActiveJoints
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a40155313200ef8db02a00433a0af4811)
() const
|  Get only the active (actuated) joints this instance operates on.  More...

std::string  |  [ getDefaultPlannerId
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a8cd64b74e79b7f7059259b26c4ec1395)
(const std::string &group="") const
|  Get the default planner for a given group (or global default)  More...

double  |  [ getGoalJointTolerance
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#ab3472f4f79cc84ff31aa70f582f09b76)
() const
|  Get the tolerance that is used for reaching a joint goal. This is distance
for each joint in configuration space.  More...

double  |  [ getGoalOrientationTolerance
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a86d58ff8269c3d23c1aa765b9ab4353c)


MOVEIT_CLASS_FORWARD(MoveGroupInterface)


Definition at line [ 2010 ](move__group__interface_8cpp_source.html#l02010) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


91  [ MOVEIT_CLASS_FORWARD
](namespacemoveit_1_1planning__interface.html#a6e3731ab08afb210c97f7d8400ccb8b6)
( [ MoveGroupInterface
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html) );


std::string group_name_


86  {


  * [ File List  ](files.html)
  * [ File Members  ](globals.html)


Definition at line [ 2290 ](move__group__interface_8cpp_source.html#l02290) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


If IK fails to find a solution then false is returned BUT THE PARTIAL RESULT
OF IK IS STILL SET AS THE GOAL.


517  bool  setPositionTarget(  double  x,  double  y,  double  z,  const
std::string& end_effector_link =  ""  );


797  [ MoveItErrorCode
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html) place(  const
std::string& object  ,  const  geometry_msgs::PoseStamped& pose,  bool
plan_only =  false  );


Definition at line [ 1837 ](move__group__interface_8cpp_source.html#l01837) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


  * [ Main Page  ](index.html)
  * [ Related Pages  ](pages.html)
  * [ Namespaces  ](namespaces.html)
  * [ Classes  ](annotated.html)
  * [ Files  ](files.html)


Definition at line [ 1598 ](move__group__interface_8cpp_source.html#l01598) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


641  void  clearPoseTargets();


Definition at line [ 1427 ](move__group__interface_8cpp_source.html#l01427) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


/*********************************************************************
 * Software License Agreement (BSD License)
 *
 *  Copyright (c) 2014, SRI International
 *  Copyright (c) 2013, Ioan A. Sucan
 *  Copyright (c) 2012, Willow Garage, Inc.
 *  All rights reserved.
 *
 *  Redistribution and use in source and binary forms, with or without
 *  modification, are permitted provided that the following conditions
 *  are met:
 *
 *   * Redistributions of source code must retain the above copyright
 *     notice, this list of conditions and the following disclaimer.
 *   * Redistributions in binary form must reproduce the above
 *     copyright notice, this list of conditions and the following
 *     disclaimer in the documentation and/or other materials provided
 *     with the distribution.
 *   * Neither the name of Willow Garage nor the names of its
 *     contributors may be used to endorse or promote products derived
 *     from this software without specific prior written permission.
 *
 *  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
 *  "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
 *  LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
 *  FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
 *  COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
 *  INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
 *  BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
 *  LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
 *  CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
 *  LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
 *  ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 *  POSSIBILITY OF SUCH DAMAGE.
 *********************************************************************/
/* Author: Ioan Sucan, Sachin Chitta */
#include <stdexcept>
#include <sstream>
#include <memory>
#include <tf2_geometry_msgs/tf2_geometry_msgs.hpp>


794  bool  plan_only =  false  );


double moveit::planning_interface::MoveGroupInterface::computeCartesianPath  |
(  |  const std::vector< [ geometry_msgs::Pose
](../../../api/tf/html/c++/namespacetf.html#af31f272a1879787c24c3decb07cdb361)
> & |  _waypoints_ ,
---|---|---|---
|  |  double  |  _eef_step_ ,
|  |  double  |  _jump_threshold_ ,
|  |  moveit_msgs::RobotTrajectory & |  _trajectory_ ,
|  |  const moveit_msgs::Constraints & |  _path_constraints_ ,
|  |  bool  |  _avoid_collisions_ = ` true ` ,
|  |  moveit_msgs::MoveItErrorCodes *  |  _error_code_ = ` NULL `
|  )  |  |

Compute a Cartesian path that follows specified waypoints with a step size of
at most _eef_step_ meters between end effector configurations of consecutive
points in the result _trajectory_ . The reference frame for the waypoints is
that specified by [ setPoseReferenceFrame()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#aac4b6f7cb3c3257001ccbd64c6d14f46
"Specify which reference frame to assume for poses specified without a
reference frame. ") . No more than _jump_threshold_ is allowed as change in
distance in the configuration space of the robot (this is to prevent 'jumps'
in IK solutions). Kinematic constraints for the path given by
_path_constraints_ will be met for every point along the trajectory, if they
are not met, a partial solution will be returned. Constraints are checked
(collision and kinematic) if _avoid_collisions_ is set to true. If constraints
cannot be met, the function fails. Return a value that is between 0.0 and 1.0
indicating the fraction of the path achieved as described by the waypoints.
Return -1.0 in case of error.


    Eigen::Isometry3d text_pose = Eigen::Isometry3d::Identity();
    text_pose.translation().z() = 1.0;
    visual_tools.publishText(text_pose, "MoveGroupInterface Demo", rvt::WHITE, rvt::XLARGE);


    visual_tools.deleteAllMarkers();
    visual_tools.publishText(text_pose, "Joint Space Goal", rvt::WHITE, rvt::XLARGE);
    visual_tools.publishTrajectoryLine(my_plan.trajectory_, joint_model_group);
    visual_tools.trigger();
    visual_tools.prompt("Press 'next' in the RvizVisualToolsGui window to continue the demo");


* [ move_group_interface.h ](move__group__interface_8h_source.html)


Definition at line [ 1800 ](move__group__interface_8cpp_source.html#l01800) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


bool moveit::planning_interface::MoveGroupInterface::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 target functions when end_effector_link is not
explicitly specified.


54  #include <boost/shared_ptr.hpp>


bool moveit::planning_interface::MoveGroupInterface::setPoseTargets  |  (  |
const [ EigenSTL::vector_Affine3d
](../../../api/eigen_stl_containers/html/namespaceEigenSTL.html#a14f080ffb504c39aeeafc3e1c7590801)
& |  _end_effector_pose_ ,
---|---|---|---
|  |  const std::string & |  _end_effector_link_ = ` "" `
|  )  |  |

Set goal poses for _end_effector_link_ .


MoveItErrorCode()


After a short moment, the RViz window should appear and look similar to the
one at the top of this page. To progress through each demo step either press
the **Next** button in the **RvizVisualToolsGui** panel at the bottom of the
screen or select **Key Tool** in the **Tools** panel at the top of the screen
and then press **N** on your keyboard while RViz is focused.


778  [ MoveItErrorCode
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html)
planGraspsAndPick(  const  std::string& object  =  ""  ,  bool  plan_only =
false  );


Visualize the plan in RViz


  moveit::core::RobotModelConstPtr robot_model_;
  planning_scene_monitor::CurrentStateMonitorPtr current_state_monitor_;
  std::shared_ptr<rclcpp_action::Client<moveit_msgs::action::MoveGroup>> move_action_client_;
  // std::shared_ptr<rclcpp_action::Client<moveit_msgs::action::Pickup>> pick_action_client_;
  // std::shared_ptr<rclcpp_action::Client<moveit_msgs::action::Place>> place_action_client_;
  std::shared_ptr<rclcpp_action::Client<moveit_msgs::action::ExecuteTrajectory>> execute_action_client_;
  // general planning params
  moveit::core::RobotStatePtr considered_start_state_;
  moveit_msgs::msg::WorkspaceParameters workspace_parameters_;
  double allowed_planning_time_;
  std::string planning_pipeline_id_;
  std::string planner_id_;
  unsigned int num_planning_attempts_;
  double max_velocity_scaling_factor_;
  double max_acceleration_scaling_factor_;
  double goal_joint_tolerance_;
  double goal_position_tolerance_;
  double goal_orientation_tolerance_;
  bool can_look_;
  int32_t look_around_attempts_;
  bool can_replan_;
  int32_t replan_attempts_;
  double replan_delay_;
  // joint state goal
  moveit::core::RobotStatePtr joint_state_target_;
  const moveit::core::JointModelGroup* joint_model_group_;
  // pose goal;
  // for each link we have a set of possible goal locations;
  std::map<std::string, std::vector<geometry_msgs::msg::PoseStamped>> pose_targets_;
  // common properties for goals
  ActiveTargetType active_target_;
  std::unique_ptr<moveit_msgs::msg::Constraints> path_constraints_;
  std::unique_ptr<moveit_msgs::msg::TrajectoryConstraints> trajectory_constraints_;
  std::string end_effector_link_;
  std::string pose_reference_frame_;
  std::string support_surface_;
  // ROS communication
  rclcpp::Publisher<std_msgs::msg::String>::SharedPtr trajectory_event_publisher_;
  rclcpp::Publisher<moveit_msgs::msg::AttachedCollisionObject>::SharedPtr attached_object_publisher_;
  rclcpp::Client<moveit_msgs::srv::QueryPlannerInterfaces>::SharedPtr query_service_;


Open Source Feedback


206  const  std::vector<std::string>& getActiveJoints()  const  ;


[ 137
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Plan.html#ab479de7a2494a40891cc7baf51a202a8)
double  [ planning_time_
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Plan.html#ab479de7a2494a40891cc7baf51a202a8)
;


###  Visualization  ¶


873  void  rememberJointValues(  const  std::string& name);


The id of the object is used to identify it.


This class includes many default settings to make things easy to use.


void moveit::planning_interface::MoveGroupInterface::setNumPlanningAttempts  |
(  |  unsigned int  |  _num_planning_attempts_ |  )  |
---|---|---|---|---|---

Set the number of times the motion plan is to be computed from scratch before
the shortest solution is returned. The default value is 1.


###  Cartesian Paths  ¶


void moveit::planning_interface::MoveGroupInterface::clearPoseTargets  |  (  |
|  )  |
---|---|---|---|---

Forget any poses specified for all end-effectors.


    {
      const std::vector<std::string>& possible_eefs =
          getRobotModel()->getJointModelGroup(opt_.group_name)->getAttachedEndEffectorNames();
      for (const std::string& possible_eef : possible_eefs)
      {
        if (getRobotModel()->getEndEffector(possible_eef)->hasLinkModel(end_effector_link_))
          return possible_eef;
      }
    }
    static std::string empty;
    return empty;
  }
  bool setPoseTargets(const std::vector<geometry_msgs::msg::PoseStamped>& poses, const std::string& end_effector_link)
  {
    const std::string& eef = end_effector_link.empty() ? end_effector_link_ : end_effector_link;
    if (eef.empty())
    {
      RCLCPP_ERROR(logger_, "No end-effector to set the pose for");
      return false;
    }
    else
    {
      pose_targets_[eef] = poses;
      // make sure we don't store an actual stamp, since that will become stale can potentially cause tf errors
      std::vector<geometry_msgs::msg::PoseStamped>& stored_poses = pose_targets_[eef];
      for (geometry_msgs::msg::PoseStamped& stored_pose : stored_poses)
        stored_pose.header.stamp = rclcpp::Time(0);
    }
    return true;
  }
  bool hasPoseTarget(const std::string& end_effector_link) const
  {
    const std::string& eef = end_effector_link.empty() ? end_effector_link_ : end_effector_link;
    return pose_targets_.find(eef) != pose_targets_.end();
  }
  const geometry_msgs::msg::PoseStamped& getPoseTarget(const std::string& end_effector_link) const
  {
    const std::string& eef = end_effector_link.empty() ? end_effector_link_ : end_effector_link;
    // if multiple pose targets are set, return the first one
    std::map<std::string, std::vector<geometry_msgs::msg::PoseStamped>>::const_iterator jt = pose_targets_.find(eef);


280  void  setGoalJointTolerance(  double  tolerance);


Depending on the planning problem MoveIt chooses between ` joint  space  ` and
` cartesian  space  ` for problem representation. Setting the group parameter
` enforce_joint_model_state_space:true  ` in the ompl_planning.yaml file
enforces the use of ` joint  space  ` for all plans.


123  };


[ moveit::planning_interface::MoveItErrorCode
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html)
moveit::planning_interface::MoveGroupInterface::place  |  (  |  const
std::string & |  _object_ ,
---|---|---|---
|  |  bool  |  _plan_only_ = ` false `
|  )  |  |

Place an object somewhere safe in the world (a safe location will be detected)


bool MoveGroupInterface::setApproximateJointValueTarget(const geometry_msgs::msg::PoseStamped& eef_pose,
                                                        const std::string& end_effector_link)
{
  return impl_->setJointValueTarget(eef_pose.pose, end_effector_link, eef_pose.header.frame_id, true);
}
bool MoveGroupInterface::setApproximateJointValueTarget(const Eigen::Isometry3d& eef_pose,
                                                        const std::string& end_effector_link)
{
  geometry_msgs::msg::Pose msg = tf2::toMsg(eef_pose);
  return setApproximateJointValueTarget(msg, end_effector_link);
}
const moveit::core::RobotState& MoveGroupInterface::getTargetRobotState() const
{
  return impl_->getTargetRobotState();
}
const std::string& MoveGroupInterface::getEndEffectorLink() const
{
  return impl_->getEndEffectorLink();
}
const std::string& MoveGroupInterface::getEndEffector() const
{
  return impl_->getEndEffector();
}
bool MoveGroupInterface::setEndEffectorLink(const std::string& link_name)
{
  if (impl_->getEndEffectorLink().empty() || link_name.empty())
    return false;
  impl_->setEndEffectorLink(link_name);
  impl_->setTargetType(POSE);
  return true;
}
bool MoveGroupInterface::setEndEffector(const std::string& eef_name)
{
  const moveit::core::JointModelGroup* jmg = impl_->getRobotModel()->getEndEffector(eef_name);
  if (jmg)
    return setEndEffectorLink(jmg->getEndEffectorParentGroup().second);
  return false;
}
void MoveGroupInterface::clearPoseTarget(const std::string& end_effector_link)
{


75  val = code.val;


Definition at line [ 2079 ](move__group__interface_8cpp_source.html#l02079) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


719  double  computeCartesianPath(  const  std::vector<geometry_msgs::Pose>&
waypoints,  double  eef_step,  double  jump_threshold,


748  void  allowReplanning(  bool  flag);


772  [ MoveItErrorCode
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html) pick(  const
std::string& object  ,  const  std::vector<moveit_msgs::Grasp>& grasps,


To start, we’ll create an pointer that references the current robot’s state.
RobotState is the object that contains all the current
position/velocity/acceleration data.


    }
    req->group_name = opt_.group_name;
    req->header.frame_id = getPoseReferenceFrame();
    req->header.stamp = getClock()->now();
    req->waypoints = waypoints;
    req->max_step = step;
    req->jump_threshold = jump_threshold;
    req->path_constraints = path_constraints;
    req->avoid_collisions = avoid_collisions;
    req->link_name = getEndEffectorLink();
    req->max_velocity_scaling_factor = max_velocity_scaling_factor_;
    req->max_acceleration_scaling_factor = max_acceleration_scaling_factor_;
    auto future_response = cartesian_path_service_->async_send_request(req);
    if (future_response.valid())
    {
      response = future_response.get();
      error_code = response->error_code;
      if (response->error_code.val == moveit_msgs::msg::MoveItErrorCodes::SUCCESS)
      {
        msg = response->solution;
        return response->fraction;
      }
      else
        return -1.0;
    }
    else
    {
      error_code.val = error_code.FAILURE;
      return -1.0;
    }
  }
  void stop()
  {
    if (trajectory_event_publisher_)
    {
      std_msgs::msg::String event;
      event.data = "stop";
      trajectory_event_publisher_->publish(event);
    }
  }


Client class to conveniently use the ROS interfaces provided by the move_group
node.


We can plan a motion for this group to a desired pose for the end-effector.


bool moveit::planning_interface::MoveGroupInterface::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_ ).


The full starting state used for planning.


[ 929
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a1dbc2672b6abc380e425b06e1d282c88)
std::map<std::string, std::vector<double> > [ remembered_joint_values_
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a1dbc2672b6abc380e425b06e1d282c88)
;


    geometry_msgs::Pose target_pose1;
    target_pose1.orientation.w = 1.0;
    target_pose1.position.x = 0.28;
    target_pose1.position.y = -0.2;
    target_pose1.position.z = 0.5;
    move_group_interface.setPoseTarget(target_pose1);


      * [ Check the plugin ](../creating_moveit_plugins/plugin_tutorial.html#check-the-plugin)
      * [ Plugin usage ](../creating_moveit_plugins/plugin_tutorial.html#plugin-usage)
    * [ Example Controller Manager Plugin ](../creating_moveit_plugins/plugin_tutorial.html#example-controller-manager-plugin)
    * [ Example Constraint Sampler Plugin ](../creating_moveit_plugins/plugin_tutorial.html#example-constraint-sampler-plugin)
  * [ Visualizing Collisions ](../visualizing_collisions/visualizing_collisions_tutorial.html)
    * [ Getting Started ](../visualizing_collisions/visualizing_collisions_tutorial.html#getting-started)
    * [ Running the Code ](../visualizing_collisions/visualizing_collisions_tutorial.html#running-the-code)
    * [ Classes ](../visualizing_collisions/visualizing_collisions_tutorial.html#classes)
    * [ Interacting ](../visualizing_collisions/visualizing_collisions_tutorial.html#interacting)
    * [ Relevant Code ](../visualizing_collisions/visualizing_collisions_tutorial.html#relevant-code)
      * [ Initializing the Planning Scene and Markers ](../visualizing_collisions/visualizing_collisions_tutorial.html#initializing-the-planning-scene-and-markers)
      * [ Collision Requests ](../visualizing_collisions/visualizing_collisions_tutorial.html#collision-requests)
      * [ Checking for Collisions ](../visualizing_collisions/visualizing_collisions_tutorial.html#checking-for-collisions)
      * [ Displaying Collision Contact Points ](../visualizing_collisions/visualizing_collisions_tutorial.html#displaying-collision-contact-points)
    * [ Launch file ](../visualizing_collisions/visualizing_collisions_tutorial.html#launch-file)
  * [ Time Parameterization ](../time_parameterization/time_parameterization_tutorial.html)
    * [ Speed Control ](../time_parameterization/time_parameterization_tutorial.html#speed-control)
      * [ From File ](../time_parameterization/time_parameterization_tutorial.html#from-file)
      * [ During Runtime ](../time_parameterization/time_parameterization_tutorial.html#during-runtime)
    * [ Time Parameterization Algorithms ](../time_parameterization/time_parameterization_tutorial.html#time-parameterization-algorithms)
    * [ Jerk-Limited Trajectory Smoothing ](../time_parameterization/time_parameterization_tutorial.html#jerk-limited-trajectory-smoothing)
  * [ Planning with Approximated Constraint Manifolds ](../planning_with_approximated_constraint_manifolds/planning_with_approximated_constraint_manifolds_tutorial.html)
    * [ Creating the Constraint Database ](../planning_with_approximated_constraint_manifolds/planning_with_approximated_constraint_manifolds_tutorial.html#creating-the-constraint-database)
      * [ Defining constraints ](../planning_with_approximated_constraint_manifolds/planning_with_approximated_constraint_manifolds_tutorial.html#defining-constraints)
        * [ JointConstraint ](../planning_with_approximated_constraint_manifolds/planning_with_approximated_constraint_manifolds_tutorial.html#jointconstraint)
        * [ PositionConstraint ](../planning_with_approximated_constraint_manifolds/planning_with_approximated_constraint_manifolds_tutorial.html#positionconstraint)
        * [ OrientationConstraint ](../planning_with_approximated_constraint_manifolds/planning_with_approximated_constraint_manifolds_tutorial.html#orientationconstraint)
        * [ VisibilityConstraint ](../planning_with_approximated_constraint_manifolds/planning_with_approximated_constraint_manifolds_tutorial.html#visibilityconstraint)
      * [ Running the database generator ](../planning_with_approximated_constraint_manifolds/planning_with_approximated_constraint_manifolds_tutorial.html#running-the-database-generator)
      * [ Internals ](../planning_with_approximated_constraint_manifolds/planning_with_approximated_constraint_manifolds_tutorial.html#internals)
      * [ Constraints message ](../planning_with_approximated_constraint_manifolds/planning_with_approximated_constraint_manifolds_tutorial.html#constraints-message)
      * [ Construction Options ](../planning_with_approximated_constraint_manifolds/planning_with_approximated_constraint_manifolds_tutorial.html#construction-options)
        * [ Graph size ](../planning_with_approximated_constraint_manifolds/planning_with_approximated_constraint_manifolds_tutorial.html#graph-size)
        * [ Edges ](../planning_with_approximated_constraint_manifolds/planning_with_approximated_constraint_manifolds_tutorial.html#edges)
      * [ Database Construction ](../planning_with_approximated_constraint_manifolds/planning_with_approximated_constraint_manifolds_tutorial.html#database-construction)
    * [ Database Loading and Usage ](../planning_with_approximated_constraint_manifolds/planning_with_approximated_constraint_manifolds_tutorial.html#database-loading-and-usage)
  * [ Pick and Place ](../pick_place/pick_place_tutorial.html)
    * [ Getting Started ](../pick_place/pick_place_tutorial.html#getting-started)
    * [ Running The Demo ](../pick_place/pick_place_tutorial.html#running-the-demo)
    * [ Understanding ` moveit_msgs::Grasp  ` ](../pick_place/pick_place_tutorial.html#understanding-moveit-msgs-grasp)


const std::vector< geometry_msgs::PoseStamped > &
moveit::planning_interface::MoveGroupInterface::getPoseTargets  |  (  |  const
std::string & |  _end_effector_link_ = ` "" ` |  )  |  const
---|---|---|---|---|---

Get the currently set pose goal for the end-effector _end_effector_link_ . The
pose goal can consist of multiple poses, if corresponding [ setPoseTarget()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a5747a91e791f0089b784e3af2dbf4260
"Set the goal pose of the end-effector end_effector_link. ") calls were made.
Otherwise, only one pose is returned in the vector. If _end_effector_link_ is
empty (the default value) then the end-effector reported by [
getEndEffectorLink()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#aa329d5256a3fdf52911f2bdcfe3e31bc
"Get the current end-effector link. This returns the value set by
setEndEffectorLink\(\) \(or indirectly ...") is assumed


In the second shell, run the launch file:


286  void  setGoalOrientationTolerance(  double  tolerance);


##  Running the Code  ¶


22  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS


group


45  #include <moveit_msgs/RobotState.h>


If _end_effector_link_ is empty then [ getEndEffectorLink()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#aa329d5256a3fdf52911f2bdcfe3e31bc
"Get the current end-effector link. This returns the value set by
setEndEffectorLink\(\) \(or indirectly ...") is used.


Definition at line [ 102 ](move__group__interface_8h_source.html#l00102) of
file [ move_group_interface.h ](move__group__interface_8h_source.html) .


Definition at line [ 1541 ](move__group__interface_8cpp_source.html#l01541) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


773  bool  plan_only =  false  );


double moveit::planning_interface::MoveGroupInterface::getPlanningTime  |  (
|  |  )  |  const
---|---|---|---|---

Get the number of seconds set by [ setPlanningTime()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#af4631a849c750b4c1428242475c8988d
"Specify the maximum amount of time to use when planning. ")


418  bool  setJointValueTarget(  const  geometry_msgs::Pose& eef_pose,  const
std::string& end_effector_link =  ""  );


void moveit::planning_interface::MoveGroupInterface::allowLooking  |  (  |
bool  |  _flag_ |  )  |
---|---|---|---|---|---

Specify whether the robot is allowed to look around before moving if it
determines it should (default is true)


  * [ moveit ](namespacemoveit.html)
  * [ planning_interface ](namespacemoveit_1_1planning__interface.html)
  * [ MoveGroupInterface ](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html)
  * [ Plan ](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Plan.html)


Parameters


[ moveit::planning_interface::MoveGroupInterface::Plan::start_state_
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Plan.html#ac9333762e84a22da5879866413dec8c6)


std::vector< double >
moveit::planning_interface::MoveGroupInterface::getCurrentRPY  |  (  |  const
std::string & |  _end_effector_link_ = ` "" ` |  )  |
---|---|---|---|---|---

Get the roll-pitch-yaw (XYZ) for the end-effector _end_effector_link_ . If
_end_effector_link_ is empty (the default value) then the end-effector
reported by [ getEndEffectorLink()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#aa329d5256a3fdf52911f2bdcfe3e31bc
"Get the current end-effector link. This returns the value set by
setEndEffectorLink\(\) \(or indirectly ...") is assumed.


MOVEIT_STRUCT_FORWARD(CollisionGeometryData)


In MoveIt, the simplest user interface is through the [ MoveGroupInterface
](http://docs.ros.org/noetic/api/moveit_ros_planning_interface/html/classmoveit_1_1planning__interface_1_1MoveGroupInterface.html)
class. It provides easy to use functionality for most operations that a user
may want to carry out, specifically setting joint or pose goals, creating
motion plans, moving the robot, adding objects into the environment and
attaching/detaching objects from the robot. This interface communicates over
ROS topics, services, and actions to the [ MoveGroup Node
](http://docs.ros.org/noetic/api/moveit_ros_move_group/html/annotated.html) .


##  Expected Output  ¶


153  const  [ ros::Duration
](../../../api/rostime/html/classros_1_1Duration.html) & wait_for_servers);


  * [ moveit ](namespacemoveit.html)
  * [ planning_interface ](namespacemoveit_1_1planning__interface.html)
  * [ MoveGroupInterface ](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html)


void moveit::planning_interface::MoveGroupInterface::setGoalPositionTolerance
|  (  |  double  |  _tolerance_ |  )  |
---|---|---|---|---|---

Set the position tolerance that is used for reaching the goal when moving to a
pose.


**Definition:** [ move_group_interface.h:117
](move__group__interface_8h_source.html#l00117)


603  bool  setPoseTargets(  const  std::vector<geometry_msgs::Pose>& target,
const  std::string& end_effector_link =  ""  );


const std::vector< std::string > &
moveit::planning_interface::MoveGroupInterface::getLinkNames  |  (  |  |  )  |
---|---|---|---|---

Get vector of names of links available in move group.


[ 930
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a64ddb8064073c6e9ed50b0a448362052)
class  [ MoveGroupInterfaceImpl
](classmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1MoveGroupInterfaceImpl.html)
;


    }
    aco.object.operation = moveit_msgs::msg::CollisionObject::REMOVE;
    if (aco.link_name.empty() && aco.object.id.empty())
    {
      // we only want to detach objects for this group
      const std::vector<std::string>& lnames = joint_model_group_->getLinkModelNames();
      for (const std::string& lname : lnames)
      {
        aco.link_name = lname;
        attached_object_publisher_->publish(aco);
      }
    }
    else
    {
      attached_object_publisher_->publish(aco);
    }
    return true;
  }
  double getGoalPositionTolerance() const
  {
    return goal_position_tolerance_;
  }
  double getGoalOrientationTolerance() const
  {
    return goal_orientation_tolerance_;
  }
  double getGoalJointTolerance() const
  {
    return goal_joint_tolerance_;
  }
  void setGoalJointTolerance(double tolerance)
  {
    goal_joint_tolerance_ = tolerance;
  }
  void setGoalPositionTolerance(double tolerance)
  {
    goal_position_tolerance_ = tolerance;
  }
  void setGoalOrientationTolerance(double tolerance)
  {


[ 122
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Options.html#a4d5aa2c0acde1db173173f4878ee3e27)
[ ros::NodeHandle
](../../../api/roscpp/html/structros_1_1NodeHandle_1_1no__validate.html) [
node_handle_
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Options.html#a4d5aa2c0acde1db173173f4878ee3e27)
;


     opt.  |  [ A ](../../../api/moveit_experimental/html/classA.html) [ MoveGroupInterface::Options ](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Options.html "Specification of options to use when constructing the MoveGroupInterface class. ") structure, if you pass a [ ros::NodeHandle ](../../../api/roscpp/html/classros_1_1NodeHandle.html) with a specific callback queue, it has to be of type [ ros::CallbackQueue ](../../../api/roscpp/html/classros_1_1CallbackQueue.html) (which is the default type of callback queues used in ROS)
---|---
tf.  |  Specify a TF instance to use. If not specified, one will be
constructed internally.
wait_for_servers.  |  Timeout for connecting to action servers. Zero time
means unlimited waiting.

Definition at line [ 1383 ](move__group__interface_8cpp_source.html#l01383) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


223  const  std::map<std::string, std::string>& params,  bool  bReplace =
false  );


  impl_->clearPoseTarget(end_effector_link);
}
void MoveGroupInterface::clearPoseTargets()
{
  impl_->clearPoseTargets();
}
bool MoveGroupInterface::setPoseTarget(const Eigen::Isometry3d& pose, const std::string& end_effector_link)
{
  std::vector<geometry_msgs::msg::PoseStamped> pose_msg(1);
  pose_msg[0].pose = tf2::toMsg(pose);
  pose_msg[0].header.frame_id = getPoseReferenceFrame();
  pose_msg[0].header.stamp = impl_->getClock()->now();
  return setPoseTargets(pose_msg, end_effector_link);
}
bool MoveGroupInterface::setPoseTarget(const geometry_msgs::msg::Pose& target, const std::string& end_effector_link)
{
  std::vector<geometry_msgs::msg::PoseStamped> pose_msg(1);
  pose_msg[0].pose = target;
  pose_msg[0].header.frame_id = getPoseReferenceFrame();
  pose_msg[0].header.stamp = impl_->getClock()->now();
  return setPoseTargets(pose_msg, end_effector_link);
}
bool MoveGroupInterface::setPoseTarget(const geometry_msgs::msg::PoseStamped& target,
                                       const std::string& end_effector_link)
{
  std::vector<geometry_msgs::msg::PoseStamped> targets(1, target);
  return setPoseTargets(targets, end_effector_link);
}
bool MoveGroupInterface::setPoseTargets(const EigenSTL::vector_Isometry3d& target, const std::string& end_effector_link)
{
  std::vector<geometry_msgs::msg::PoseStamped> pose_out(target.size());
  rclcpp::Time tm = impl_->getClock()->now();
  const std::string& frame_id = getPoseReferenceFrame();
  for (std::size_t i = 0; i < target.size(); ++i)
  {
    pose_out[i].pose = tf2::toMsg(target[i]);
    pose_out[i].header.stamp = tm;
    pose_out[i].header.frame_id = frame_id;
  }
  return setPoseTargets(pose_out, end_effector_link);


        goal_count = std::max(goal_count, pose_target.second.size());
      // start filling the goals;
      // each end effector has a number of possible poses (K) as valid goals
      // but there could be multiple end effectors specified, so we want each end effector
      // to reach the goal that corresponds to the goals of the other end effectors
      request.goal_constraints.resize(goal_count);
      for (const auto& pose_target : pose_targets_)
      {
        for (std::size_t i = 0; i < pose_target.second.size(); ++i)
        {
          moveit_msgs::msg::Constraints c = kinematic_constraints::constructGoalConstraints(
              pose_target.first, pose_target.second[i], goal_position_tolerance_, goal_orientation_tolerance_);
          if (active_target_ == ORIENTATION)
            c.position_constraints.clear();
          if (active_target_ == POSITION)
            c.orientation_constraints.clear();
          request.goal_constraints[i] = kinematic_constraints::mergeConstraints(request.goal_constraints[i], c);
        }
      }
    }
    else
      RCLCPP_ERROR(logger_, "Unable to construct MotionPlanRequest representation");
    if (path_constraints_)
      request.path_constraints = *path_constraints_;
    if (trajectory_constraints_)
      request.trajectory_constraints = *trajectory_constraints_;
  }
  void constructGoal(moveit_msgs::action::MoveGroup::Goal& goal) const
  {
    constructMotionPlanRequest(goal.request);
  }
  //  moveit_msgs::action::Pickup::Goal constructPickupGoal(const std::string& object,
  //                                                      std::vector<moveit_msgs::msg::Grasp>&& grasps,
  //                                                      bool plan_only = false) const
  //  {
  //    moveit_msgs::action::Pickup::Goal goal;
  //    goal.target_name = object;
  //    goal.group_name = opt_.group_name;
  //    goal.end_effector = getEndEffector();
  //    goal.support_surface_name = support_surface_;


If you want to configure the execution tolerances, you will have to edit the
controller.yaml  file if using a FollowJointTrajectory controller, or manually
add it into the generated trajectory message from the planner.


268  double  getGoalOrientationTolerance()  const  ;


Visualize the plan in RViz


[ moveit::planning_interface::MoveItErrorCode::MoveItErrorCode
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html#a1a3910a9fc60cb15ce5eec4a0444c60a)


Definition at line [ 2205 ](move__group__interface_8cpp_source.html#l02205) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


If _end_effector_link_ is empty then [ getEndEffectorLink()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#aa329d5256a3fdf52911f2bdcfe3e31bc
"Get the current end-effector link. This returns the value set by
setEndEffectorLink\(\) \(or indirectly ...") is used.


Define a box to add to the world.


885  }


12  * * Redistributions of source code must retain the above copyright


Definition at line [ 2062 ](move__group__interface_8cpp_source.html#l02062) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


**Definition:** [ move_group_interface.h:107
](move__group__interface_8h_source.html#l00107)


double
moveit::planning_interface::MoveGroupInterface::getGoalPositionTolerance  |  (
|  |  )  |  const
---|---|---|---|---

Get the tolerance that is used for reaching a position goal. This is be the
radius of a sphere where the end-effector must reach.


Definition at line [ 1503 ](move__group__interface_8cpp_source.html#l01503) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


double moveit::planning_interface::MoveGroupInterface::computeCartesianPath  |
(  |  const std::vector< [ geometry_msgs::Pose
](../../../api/tf/html/c++/namespacetf.html#af31f272a1879787c24c3decb07cdb361)
> & |  _waypoints_ ,
---|---|---|---
|  |  double  |  _eef_step_ ,
|  |  double  |  _jump_threshold_ ,
|  |  moveit_msgs::RobotTrajectory & |  _trajectory_ ,
|  |  bool  |  _avoid_collisions_ = ` true ` ,
|  |  moveit_msgs::MoveItErrorCodes *  |  _error_code_ = ` NULL `
|  )  |  |

Compute a Cartesian path that follows specified waypoints with a step size of
at most _eef_step_ meters between end effector configurations of consecutive
points in the result _trajectory_ . The reference frame for the waypoints is
that specified by [ setPoseReferenceFrame()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#aac4b6f7cb3c3257001ccbd64c6d14f46
"Specify which reference frame to assume for poses specified without a
reference frame. ") . No more than _jump_threshold_ is allowed as change in
distance in the configuration space of the robot (this is to prevent 'jumps'
in IK solutions). Collisions are avoided if _avoid_collisions_ is set to true.
If collisions cannot be avoided, the function fails. Return a value that is
between 0.0 and 1.0 indicating the fraction of the path achieved as described
by the waypoints. Return -1.0 in case of error.


The representation of a motion plan (as ROS messasges)


  * Move Group C++ Interface
    * Getting Started
    * Running the Code
    * Expected Output
    * The Entire Code
      * Setup
      * Visualization
      * Getting Basic Information
      * Start the demo
      * Planning to a Pose goal
      * Visualizing plans
      * Moving to a pose goal
      * Planning to a joint-space goal
      * Planning with Path Constraints
      * Enforce Planning in Joint Space
      * Cartesian Paths
      * Adding objects to the environment
      * Attaching objects to the robot
      * Detaching and Removing Objects
    * The Launch File
    * A Note on Setting Tolerances
  * [ Move Group Python Interface ](../move_group_python_interface/move_group_python_interface_tutorial.html)
    * [ Getting Started ](../move_group_python_interface/move_group_python_interface_tutorial.html#getting-started)
    * [ Start RViz and MoveGroup node ](../move_group_python_interface/move_group_python_interface_tutorial.html#start-rviz-and-movegroup-node)
    * [ Expected Output ](../move_group_python_interface/move_group_python_interface_tutorial.html#expected-output)
    * [ The Entire Code ](../move_group_python_interface/move_group_python_interface_tutorial.html#the-entire-code)
      * [ Getting Basic Information ](../move_group_python_interface/move_group_python_interface_tutorial.html#getting-basic-information)
      * [ Planning to a Joint Goal ](../move_group_python_interface/move_group_python_interface_tutorial.html#planning-to-a-joint-goal)
      * [ Planning to a Pose Goal ](../move_group_python_interface/move_group_python_interface_tutorial.html#planning-to-a-pose-goal)
      * [ Cartesian Paths ](../move_group_python_interface/move_group_python_interface_tutorial.html#cartesian-paths)
      * [ Displaying a Trajectory ](../move_group_python_interface/move_group_python_interface_tutorial.html#displaying-a-trajectory)
      * [ Executing a Plan ](../move_group_python_interface/move_group_python_interface_tutorial.html#executing-a-plan)
      * [ Adding Objects to the Planning Scene ](../move_group_python_interface/move_group_python_interface_tutorial.html#adding-objects-to-the-planning-scene)
      * [ Ensuring Collision Updates Are Received ](../move_group_python_interface/move_group_python_interface_tutorial.html#ensuring-collision-updates-are-received)
      * [ Attaching Objects to the Robot ](../move_group_python_interface/move_group_python_interface_tutorial.html#attaching-objects-to-the-robot)
      * [ Detaching Objects from the Robot ](../move_group_python_interface/move_group_python_interface_tutorial.html#detaching-objects-from-the-robot)
      * [ Removing Objects from the Planning Scene ](../move_group_python_interface/move_group_python_interface_tutorial.html#removing-objects-from-the-planning-scene)
    * [ The Launch File ](../move_group_python_interface/move_group_python_interface_tutorial.html#the-launch-file)
  * [ MoveIt Commander Scripting ](../moveit_commander_scripting/moveit_commander_scripting_tutorial.html)
    * [ Getting Started ](../moveit_commander_scripting/moveit_commander_scripting_tutorial.html#getting-started)


745  void  allowLooking(  bool  flag);


109  : group_name_(group_name), robot_description_( [ desc
](../../../api/moveit_kinematics/html/namespacecreate__ikfast__moveit__plugin.html#acea37eb824dcaa53b6a91f548ee1b5f7)
), node_handle_(node_handle)


Definition at line [ 882 ](move__group__interface_8h_source.html#l00882) of
file [ move_group_interface.h ](move__group__interface_8h_source.html) .


Definition at line [ 2129 ](move__group__interface_8cpp_source.html#l02129) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


Definition at line [ 2215 ](move__group__interface_8cpp_source.html#l02215) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


697  [ MoveItErrorCode
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html) move();


[ actionlib::SimpleActionClient
](../../../api/actionlib/html/classactionlib_1_1SimpleActionClient.html)


43  #include < [ moveit/robot_state/robot_state.h
](../../../api/moveit_core/html/robot__state_8h.html) >


    {
      return considered_start_state_;
    }
    else
    {
      moveit::core::RobotStatePtr s;
      getCurrentState(s);
      return s;
    }
  }
  bool setJointValueTarget(const geometry_msgs::msg::Pose& eef_pose, const std::string& end_effector_link,
                           const std::string& frame, bool approx)
  {
    const std::string& eef = end_effector_link.empty() ? getEndEffectorLink() : end_effector_link;
    // this only works if we have an end-effector
    if (!eef.empty())
    {
      // first we set the goal to be the same as the start state
      moveit::core::RobotStatePtr c = getStartState();
      if (c)
      {
        setTargetType(JOINT);
        c->enforceBounds();
        getTargetRobotState() = *c;
        if (!getTargetRobotState().satisfiesBounds(getGoalJointTolerance()))
          return false;
      }
      else
        return false;
      // we may need to do approximate IK
      kinematics::KinematicsQueryOptions o;
      o.return_approximate_solution = approx;
      // if no frame transforms are needed, call IK directly
      if (frame.empty() || moveit::core::Transforms::sameFrame(frame, getRobotModel()->getModelFrame()))
      {
        return getTargetRobotState().setFromIK(getJointModelGroup(), eef_pose, eef, 0.0,
                                               moveit::core::GroupStateValidityCallbackFn(), o);
      }
      else
      {


void
moveit::planning_interface::MoveGroupInterface::clearTrajectoryConstraints  |
(  |  |  )  |
---|---|---|---|---

Definition at line [ 2236 ](move__group__interface_8cpp_source.html#l02236) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


bool moveit::planning_interface::MoveGroupInterface::startStateMonitor  |  (
|  double  |  _wait_ = ` 1.0 ` |  )  |
---|---|---|---|---|---

When reasoning about the current state of a robot, a CurrentStateMonitor
instance is automatically constructed. This function allows triggering the
construction of that object from the beginning, so that future calls to
functions such as [ getCurrentState()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#aecbc1f0926edc654375c9125dbb2a16d
"Get the current state of the robot within the duration specified by wait. ")
will not take so long and are less likely to fail.


  * [ move_group_interface ](dir_86133b455f0071bfbc47e5fc4156271f.html)
  * [ include ](dir_3d22a3d18732584a197af2401e43fb95.html)
  * [ moveit ](dir_72c55768156a02b8ccde1113e4a6e412.html)
  * [ move_group_interface ](dir_fb80dfd8cc6e1dfc2d52978768ba8b2e.html)


167  ~ [ MoveGroupInterface
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html) ();


Definition at line [ 2220 ](move__group__interface_8cpp_source.html#l02220) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


Tutorials Version: Noetic


[ moveit::planning_interface::MoveItErrorCode
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html)
moveit::planning_interface::MoveGroupInterface::pick  |  (  |  const
std::string & |  _object_ ,
---|---|---|---
|  |  bool  |  _plan_only_ = ` false `
|  )  |  |

Pick up an object.


Definition at line [ 1817 ](move__group__interface_8cpp_source.html#l01817) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


moveit::planning_interface::MoveGroupInterface::MoveGroupInterface  |  (  |
const std::string & |  _group_ ,
---|---|---|---
|  |  const [ boost::shared_ptr
](../../../api/roscpp_traits/html/classboost_1_1shared__ptr.html) < [
tf::Transformer ](../../../api/tf/html/c++/classtf_1_1Transformer.html) > & |
_tf_ = ` [ boost::shared_ptr
](../../../api/roscpp_traits/html/classboost_1_1shared__ptr.html) < [
tf::Transformer ](../../../api/tf/html/c++/classtf_1_1Transformer.html) >() `
,
|  |  const [ ros::WallDuration
](../../../api/rostime/html/classros_1_1WallDuration.html) & |
_wait_for_servers_ = ` [ ros::WallDuration
](../../../api/rostime/html/classros_1_1WallDuration.html) () `
|  )  |  |

Construct a client for the [ MoveGroup
](classmoveit_1_1planning__interface_1_1MoveGroup.html "Deprecated Client
interface to access interfaces of the move_group node. ") action for a
particular _group_ .


181  const  std::string& [ getName
](../../../api/rosconsole/html/namespaceros_1_1console_1_1impl.html#a99d74e1500c0ebb7f3f3fb98ae77037f)
()  const  ;


You can attach objects to the robot, so that it moves with the robot geometry.
This simulates picking up the object for the purpose of manipulating it. The
motion planning should avoid collisions between the two objects as well.


111  }


431  bool  setJointValueTarget(  const  geometry_msgs::PoseStamped& eef_pose,
const  std::string& end_effector_link =  ""  );


When done with the path constraint be sure to clear it.


    move_group_interface.setPlanningTime(10.0);

    success = (move_group_interface.plan(my_plan) == moveit::core::MoveItErrorCode::SUCCESS);
    ROS_INFO_NAMED("tutorial", "Visualizing plan 3 (constraints) %s", success ? "" : "FAILED");


[ moveit::planning_interface::MoveItErrorCode
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html)
moveit::planning_interface::MoveGroupInterface::pick  |  (  |  const
std::string & |  _object_ ,
---|---|---|---
|  |  const moveit_msgs::Grasp & |  _grasp_ ,
|  |  bool  |  _plan_only_ = ` false `
|  )  |  |

Pick up an object given a grasp pose.


  * [ Gazebo Simulation Integration ](../gazebo_simulation/gazebo_simulation.html)
    * [ After MoveIt Setup Assistant ](../gazebo_simulation/gazebo_simulation.html#after-moveit-setup-assistant)
      * [ 1\. Fix the robot to the world coordinate system ](../gazebo_simulation/gazebo_simulation.html#fix-the-robot-to-the-world-coordinate-system)
      * [ 2\. Add damping to the joint specifications ](../gazebo_simulation/gazebo_simulation.html#add-damping-to-the-joint-specifications)
      * [ 3\. Add inertia matrices and masses to the links ](../gazebo_simulation/gazebo_simulation.html#add-inertia-matrices-and-masses-to-the-links)
      * [ 4\. Add friction and colorize the links ](../gazebo_simulation/gazebo_simulation.html#add-friction-and-colorize-the-links)
      * [ 5\. Configure gazebo_ros_control, transmissions and actuators ](../gazebo_simulation/gazebo_simulation.html#configure-gazebo-ros-control-transmissions-and-actuators)
      * [ 6\. Adjust auto-generated ros_controllers.yaml ](../gazebo_simulation/gazebo_simulation.html#adjust-auto-generated-ros-controllers-yaml)
      * [ 7\. Adjust auto-generated ` ros_controllers.launch  ` in the ` panda_moveit_config  ` package. ](../gazebo_simulation/gazebo_simulation.html#adjust-auto-generated-ros-controllers-launch-in-the-panda-moveit-config-package)
      * [ 8\. Change the way ` robot_description  ` is loaded to Parameter Server. ](../gazebo_simulation/gazebo_simulation.html#change-the-way-robot-description-is-loaded-to-parameter-server)
  * [ Joystick Control Teleoperation ](../joystick_control_teleoperation/joystick_control_teleoperation_tutorial.html)
    * [ Getting Started ](../joystick_control_teleoperation/joystick_control_teleoperation_tutorial.html#getting-started)
    * [ Running the Code ](../joystick_control_teleoperation/joystick_control_teleoperation_tutorial.html#running-the-code)
    * [ Joystick Command Mappings ](../joystick_control_teleoperation/joystick_control_teleoperation_tutorial.html#joystick-command-mappings)
    * [ Debugging ](../joystick_control_teleoperation/joystick_control_teleoperation_tutorial.html#debugging)
  * [ Realtime Arm Servoing ](../realtime_servo/realtime_servo_tutorial.html)
    * [ Getting Started ](../realtime_servo/realtime_servo_tutorial.html#getting-started)
    * [ Settings ](../realtime_servo/realtime_servo_tutorial.html#settings)
    * [ Changing Control Dimensions ](../realtime_servo/realtime_servo_tutorial.html#changing-control-dimensions)
    * [ Robot Requirements ](../realtime_servo/realtime_servo_tutorial.html#robot-requirements)
    * [ ROS Signals ](../realtime_servo/realtime_servo_tutorial.html#ros-signals)
    * [ Configuring Control Devices (Gamepads, Joysticks, etc) ](../realtime_servo/realtime_servo_tutorial.html#configuring-control-devices-gamepads-joysticks-etc)
    * [ Integration Testing ](../realtime_servo/realtime_servo_tutorial.html#integration-testing)
    * [ Debug Tips ](../realtime_servo/realtime_servo_tutorial.html#debug-tips)
  * [ Benchmarking ](../benchmarking/benchmarking_tutorial.html)
    * [ Getting Started ](../benchmarking/benchmarking_tutorial.html#getting-started)
    * [ Example ](../benchmarking/benchmarking_tutorial.html#example)
    * [ Viewing Results ](../benchmarking/benchmarking_tutorial.html#viewing-results)
    * [ Parameters of the BenchmarkOptions Class ](../benchmarking/benchmarking_tutorial.html#parameters-of-the-benchmarkoptions-class)
    * [ Parameters of the BenchmarkExecutor Class ](../benchmarking/benchmarking_tutorial.html#parameters-of-the-benchmarkexecutor-class)
    * [ Benchmarking of Different Motion Planners: CHOMP, STOMP and OMPL ](../benchmarking/benchmarking_tutorial.html#benchmarking-of-different-motion-planners-chomp-stomp-and-ompl)
      * [ Benchmarking in a scene without obstacles ](../benchmarking/benchmarking_tutorial.html#benchmarking-in-a-scene-without-obstacles)
      * [ Benchmarking in a scene with obstacles ](../benchmarking/benchmarking_tutorial.html#benchmarking-in-a-scene-with-obstacles)
  * [ Integration/Unit Tests ](../tests/tests_tutorial.html)
    * [ Getting Started ](../tests/tests_tutorial.html#getting-started)
    * [ Integration Tests ](../tests/tests_tutorial.html#integration-tests)
    * [ Running Unit Tests ](../tests/tests_tutorial.html#running-unit-tests)
    * [ Test Robots ](../tests/tests_tutorial.html#test-robots)
    * [ Writing Unit Tests ](../tests/tests_tutorial.html#writing-unit-tests)
    * [ Code Coverage ](../tests/tests_tutorial.html#code-coverage)


15  * copyright notice, this list of conditions and the following


Definition at line [ 1577 ](move__group__interface_8cpp_source.html#l01577) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


  * [ Main Page  ](index.html)
  * [ Related Pages  ](pages.html)
  * [ Namespaces  ](namespaces.html)
  * [ Classes  ](annotated.html)
  * [ Files  ](files.html)


ros::NodeHandle node_handle_


138  };


If these values are out of bounds then false is returned BUT THE VALUES ARE
STILL SET AS THE GOAL.


##  Member Function Documentation


bool moveit::planning_interface::MoveGroupInterface::setNamedTarget  |  (  |
const std::string & |  _name_ |  )  |
---|---|---|---|---|---

Set the current joint values to be ones previously remembered by [
rememberJointValues()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a9756c7e7248526382189ca7cc89fdddd
"Remember the current joint values \(of the robot being monitored\) under
name. These can be used by set...") or, if not found, that are specified in
the SRDF under the name _name_ as a group state.


163  const  [ ros::WallDuration
](../../../api/rostime/html/classros_1_1WallDuration.html) & wait_for_servers
= [ ros::WallDuration
](../../../api/rostime/html/classros_1_1WallDuration.html) ());


80  }


656  const  std::vector<geometry_msgs::PoseStamped>& getPoseTargets(  const
std::string& end_effector_link =  ""  )  const  ;


536  bool  setOrientationTarget(  double  x,  double  y,  double  z,  double
w,  const  std::string& end_effector_link =  ""  );


If _end_effector_link_ is empty then [ getEndEffectorLink()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#aa329d5256a3fdf52911f2bdcfe3e31bc
"Get the current end-effector link. This returns the value set by
setEndEffectorLink\(\) \(or indirectly ...") is used.


708  [ MoveItErrorCode
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html) [ execute
](../../../api/roscpp/html/namespaceros_1_1master.html#a6148ee923ef1602d2093daff82573043)
(  const  [ Plan
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Plan.html) &
plan);


void
moveit::planning_interface::MoveGroupInterface::setStartStateToCurrentState  |
(  |  |  )  |
---|---|---|---|---

Set the starting state for planning to be that reported by the robot's joint
state publication.


[ moveit::planning_interface::MoveGroupInterface::Options
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Options.html)


Definition at line [ 1497 ](move__group__interface_8cpp_source.html#l01497) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


Default ROS parameter name from where to read the robot's URDF. Set to
'robot_description'.


For groups that have multiple end effectors, a pose can be set for each end
effector in the group. End effectors which do not have a pose target set will
end up in arbitrary positions.

bool  |  [ setPositionTarget
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a417e37154a0f276de9ab70bae2fcad32)
(double [ x
](../../../api/tf/html/c++/Vector3_8h.html#aa1979c1f4c806bb7b59df92ea607a8e9)
, double [ y
](../../../api/tf/html/c++/Vector3_8h.html#a31016f11759938c0df4241edfe190861)
, double [ z
](../../../api/tf/html/c++/Vector3_8h.html#a5e0742b29b83c3b21c8f46477d554b96)
, const std::string &end_effector_link="")
|  Set the goal position of the end-effector _end_effector_link_ to be ( _x_ ,
_y_ , _z_ ).  More...

bool  |  [ setRPYTarget
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a7f43684b3ccf3788d758c2aafa887353)
(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.  More...

bool  |  [ setOrientationTarget
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a718268743cb7a60268803c8840d63a75)
(double [ x
](../../../api/tf/html/c++/Vector3_8h.html#aa1979c1f4c806bb7b59df92ea607a8e9)
, double [ y
](../../../api/tf/html/c++/Vector3_8h.html#a31016f11759938c0df4241edfe190861)
, double [ z
](../../../api/tf/html/c++/Vector3_8h.html#a5e0742b29b83c3b21c8f46477d554b96)
, double [ w
](../../../api/tf/html/c++/Vector3_8h.html#a34880980a0fc540180eea1323921c339)
, const std::string &end_effector_link="")
|  Set the goal orientation of the end-effector _end_effector_link_ to be the
quaternion ( _x_ , _y_ , _z_ , _w_ ).  More...

bool  |  [ setPoseTarget
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a5747a91e791f0089b784e3af2dbf4260)
(const Eigen::Affine3d &end_effector_pose, const std::string


moveit_msgs::RobotState
moveit::planning_interface::MoveGroupInterface::Plan::start_state_
---

The full starting state used for planning.


name


We can also visualize the plan as a line with markers in RViz.


**Definition:** [ move_group_interface.h:137
](move__group__interface_8h_source.html#l00137)


This new orientation target replaces any pre-existing JointValueTarget or pre-
existing Position, Orientation, or Pose target(s) for this _end_effector_link_
.


292  void  setWorkspace(  double  minx,  double  miny,  double  minz,  double
maxx,  double  maxy,  double  maxz);


[ moveit::planning_interface::MoveItErrorCode
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html)
moveit::planning_interface::MoveGroupInterface::planGraspsAndPick  |  (  |
const moveit_msgs::CollisionObject & |  _object_ ,
---|---|---|---
|  |  bool  |  _plan_only_ = ` false `
|  )  |  |

Pick up an object.


74  {


736  moveit_msgs::RobotTrajectory& trajectory,


264  double  getGoalPositionTolerance()  const  ;


82  {


###  Moving to a pose goal  ¶


{
  return impl_->attachObject(object, link, touch_links);
}
bool MoveGroupInterface::detachObject(const std::string& name)
{
  return impl_->detachObject(name);
}
void MoveGroupInterface::constructMotionPlanRequest(moveit_msgs::msg::MotionPlanRequest& goal_out)
{
  impl_->constructMotionPlanRequest(goal_out);
}
}  // namespace planning_interface
}  // namespace moveit


std::vector< Eigen::Affine3d, Eigen::aligned_allocator< Eigen::Affine3d > >
vector_Affine3d


[ moveit::planning_interface::MoveGroupInterface::Options::group_name_
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Options.html#a2cf3354acfc47c1708dd511be0bca347)


bool moveit::planning_interface::MoveGroupInterface::setPoseTarget  |  (  |
const Eigen::Affine3d & |  _end_effector_pose_ ,
---|---|---|---
|  |  const std::string & |  _end_effector_link_ = ` "" `
|  )  |  |

Set the goal pose of the end-effector _end_effector_link_ .


void moveit::planning_interface::MoveGroupInterface::stop  |  (  |  void  |  |
)  |
---|---|---|---|---|---

Stop any trajectory execution, if one is active.


const std::string &
moveit::planning_interface::MoveGroupInterface::getEndEffector  |  (  |  |  )
|  const
---|---|---|---|---

Get the current end-effector name. This returns the value set by [
setEndEffector()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#acd09831014016b69fef201a066560184
"Specify the name of the end-effector to use. This is equivalent to setting
the EndEffectorLink to the...") (or indirectly by [ setEndEffectorLink()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a344d714020cfbbfed36ccf7b3c5055da
"Specify the parent link of the end-effector. This end_effector_link will be
used in calls to pose tar...") ). If [ setEndEffector()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#acd09831014016b69fef201a066560184
"Specify the name of the end-effector to use. This is equivalent to setting
the EndEffectorLink to the...") was not called, this function reports an end-
effector attached to this group. If there are multiple end-effectors, one of
them is returned. If no end-effector is known, the empty string is returned.


This is different from [ setPoseTarget()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a5747a91e791f0089b784e3af2dbf4260
"Set the goal pose of the end-effector end_effector_link. ") in that a single
IK state (aka JointValueTarget) is computed using IK, and the resulting
JointValueTarget is used as the target for planning.


std::map< std::string, std::vector< double > > remembered_joint_values_


Definition at line [ 1765 ](move__group__interface_8cpp_source.html#l01765) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


194  const  std::string& getPlanningFrame()  const  ;


We want the Cartesian path to be interpolated at a resolution of 1 cm which is
why we will specify 0.01 as the max step in Cartesian translation. We will
specify the jump threshold as 0.0, effectively disabling it. Warning -
disabling the jump threshold while operating real hardware can cause large
unpredictable motions of redundant joints and could be a safety issue


If IK fails to find a solution then false is returned BUT THE PARTIAL RESULT
OF IK IS STILL SET AS THE GOAL.


This new pose target replaces any pre-existing JointValueTarget or pre-
existing Position, Orientation, or Pose target for this _end_effector_link_ .


move_group_interface.clearPathConstraints();


    {
      std::chrono::duration<double> d(0.01);
      rclcpp::sleep_for(std::chrono::duration_cast<std::chrono::nanoseconds>(d), rclcpp::Context::SharedPtr(nullptr));
    }
    std::vector<std::string> c;
    if (constraints_storage_)
      constraints_storage_->getKnownConstraints(c, robot_model_->getName(), opt_.group_name);
    return c;
  }
  moveit_msgs::msg::Constraints getPathConstraints() const
  {
    if (path_constraints_)
    {
      return *path_constraints_;
    }
    else
    {
      return moveit_msgs::msg::Constraints();
    }
  }
  moveit_msgs::msg::TrajectoryConstraints getTrajectoryConstraints() const
  {
    if (trajectory_constraints_)
    {
      return *trajectory_constraints_;
    }
    else
    {
      return moveit_msgs::msg::TrajectoryConstraints();
    }
  }
  void initializeConstraintsStorage(const std::string& host, unsigned int port)
  {
    initializing_constraints_ = true;
    if (constraints_init_thread_)
      constraints_init_thread_->join();
    constraints_init_thread_ =
        std::make_unique<std::thread>([this, host, port] { initializeConstraintsStorageThread(host, port); });
  }
  void setWorkspace(double minx, double miny, double minz, double maxx, double maxy, double maxz)


901  std::vector<std::string> getKnownConstraints()  const  ;


double
moveit::planning_interface::MoveGroupInterface::getGoalOrientationTolerance  |
(  |  |  )  |  const
---|---|---|---|---

Get the tolerance that is used for reaching an orientation goal. This is the
tolerance for roll, pitch and yaw, in radians.


23  * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT


Definition at line [ 1656 ](move__group__interface_8cpp_source.html#l01656) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


Definition at line [ 1571 ](move__group__interface_8cpp_source.html#l01571) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


Definition at line [ 1790 ](move__group__interface_8cpp_source.html#l01790) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


Definition at line [ 1785 ](move__group__interface_8cpp_source.html#l01785) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


14  * * Redistributions in binary form must reproduce the above


Definition at line [ 1900 ](move__group__interface_8cpp_source.html#l01900) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


###  Planning to a Pose goal  ¶


[ planning_interface ](http://wiki.ros.org/planning_interface)
Author(s): Ioan Sucan  autogenerated on Sun Oct 18 2020 13:18:50


Definition at line [ 1464 ](move__group__interface_8cpp_source.html#l01464) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


bool moveit::planning_interface::MoveGroupInterface::setJointValueTarget  |  (
|  const sensor_msgs::JointState & |  _state_ |  )  |
---|---|---|---|---|---

Set the JointValueTarget and use it for future planning requests.


[ 69
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html#a1a3910a9fc60cb15ce5eec4a0444c60a)
[ MoveItErrorCode
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html#a1a3910a9fc60cb15ce5eec4a0444c60a)
(  int  code)


235  void  setPlanningTime(  double  seconds);


174  [ MoveGroupInterface
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html) (  const  [
MoveGroupInterface
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html) &) =  delete
;


789  [ MoveItErrorCode
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html) place(  const
std::string& object  ,  const  std::vector<moveit_msgs::PlaceLocation>&
locations,


790  bool  plan_only =  false  );


[ robot_state.h ](../../../api/moveit_core/html/robot__state_8h.html)


      return moveit::core::MoveItErrorCode::FAILURE;
    }
    RCLCPP_INFO_STREAM(logger_, "MoveGroup action client/server ready");
    moveit_msgs::action::MoveGroup::Goal goal;
    constructGoal(goal);
    goal.planning_options.plan_only = true;
    goal.planning_options.look_around = false;
    goal.planning_options.replan = false;
    goal.planning_options.planning_scene_diff.is_diff = true;
    goal.planning_options.planning_scene_diff.robot_state.is_diff = true;
    bool done = false;
    rclcpp_action::ResultCode code = rclcpp_action::ResultCode::UNKNOWN;
    std::shared_ptr<moveit_msgs::action::MoveGroup::Result> res;
    auto send_goal_opts = rclcpp_action::Client<moveit_msgs::action::MoveGroup>::SendGoalOptions();
    send_goal_opts.goal_response_callback =
        [&](const rclcpp_action::ClientGoalHandle<moveit_msgs::action::MoveGroup>::SharedPtr& goal_handle) {
          if (!goal_handle)
          {
            done = true;
            RCLCPP_INFO(logger_, "Planning request rejected");
          }
          else
            RCLCPP_INFO(logger_, "Planning request accepted");
        };
    send_goal_opts.result_callback =
        [&](const rclcpp_action::ClientGoalHandle<moveit_msgs::action::MoveGroup>::WrappedResult& result) {
          res = result.result;
          code = result.code;
          done = true;
          switch (result.code)
          {
            case rclcpp_action::ResultCode::SUCCEEDED:
              RCLCPP_INFO(logger_, "Planning request complete!");
              break;
            case rclcpp_action::ResultCode::ABORTED:
              RCLCPP_INFO(logger_, "Planning request aborted");
              return;
            case rclcpp_action::ResultCode::CANCELED:
              RCLCPP_INFO(logger_, "Planning request canceled");
              return;


[ EigenSTL::vector_Affine3d
](../../../api/eigen_stl_containers/html/namespaceEigenSTL.html#a14f080ffb504c39aeeafc3e1c7590801)


Now we will plan to the earlier pose target from the new start state that we
have just created.


177  [ MoveGroupInterface
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html) ( [
MoveGroupInterface
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html) && other);


**Definition:** [ move_group_interface.h:114
](move__group__interface_8h_source.html#l00114)


  * [ MoveIt Setup Assistant ](../setup_assistant/setup_assistant_tutorial.html)
    * [ Overview ](../setup_assistant/setup_assistant_tutorial.html#overview)
    * [ Getting Started ](../setup_assistant/setup_assistant_tutorial.html#getting-started)
    * [ Step 1: Start ](../setup_assistant/setup_assistant_tutorial.html#step-1-start)
    * [ Step 2: Generate Self-Collision Matrix ](../setup_assistant/setup_assistant_tutorial.html#step-2-generate-self-collision-matrix)
    * [ Step 3: Add Virtual Joints ](../setup_assistant/setup_assistant_tutorial.html#step-3-add-virtual-joints)
    * [ Step 4: Add Planning Groups ](../setup_assistant/setup_assistant_tutorial.html#step-4-add-planning-groups)
    * [ Step 5: Add Robot Poses ](../setup_assistant/setup_assistant_tutorial.html#step-5-add-robot-poses)
    * [ Step 6: Label End Effectors ](../setup_assistant/setup_assistant_tutorial.html#step-6-label-end-effectors)
    * [ Step 7: Add Passive Joints ](../setup_assistant/setup_assistant_tutorial.html#step-7-add-passive-joints)
    * [ Step 8: 3D Perception ](../setup_assistant/setup_assistant_tutorial.html#step-8-3d-perception)
    * [ Step 9: Gazebo Simulation ](../setup_assistant/setup_assistant_tutorial.html#step-9-gazebo-simulation)
    * [ Step 10: ROS Control ](../setup_assistant/setup_assistant_tutorial.html#step-10-ros-control)
    * [ Step 11: Add Author Information ](../setup_assistant/setup_assistant_tutorial.html#step-11-add-author-information)
    * [ Step 12: Generate Configuration Files ](../setup_assistant/setup_assistant_tutorial.html#step-12-generate-configuration-files)
    * [ What’s Next ](../setup_assistant/setup_assistant_tutorial.html#what-s-next)
    * [ Additional Reading ](../setup_assistant/setup_assistant_tutorial.html#additional-reading)
  * [ URDF and SRDF ](../urdf_srdf/urdf_srdf_tutorial.html)
    * [ URDF ](../urdf_srdf/urdf_srdf_tutorial.html#urdf)
      * [ URDF Resources ](../urdf_srdf/urdf_srdf_tutorial.html#urdf-resources)
      * [ Important Tips ](../urdf_srdf/urdf_srdf_tutorial.html#important-tips)
        * [ Special Characters in Joint Names ](../urdf_srdf/urdf_srdf_tutorial.html#special-characters-in-joint-names)
        * [ Special Characters in Link Names ](../urdf_srdf/urdf_srdf_tutorial.html#special-characters-in-link-names)
        * [ Safety Limits ](../urdf_srdf/urdf_srdf_tutorial.html#safety-limits)
        * [ Collision Checking ](../urdf_srdf/urdf_srdf_tutorial.html#collision-checking)
        * [ Test your URDF ](../urdf_srdf/urdf_srdf_tutorial.html#test-your-urdf)
      * [ URDF Examples ](../urdf_srdf/urdf_srdf_tutorial.html#urdf-examples)
    * [ SRDF ](../urdf_srdf/urdf_srdf_tutorial.html#srdf)
      * [ Virtual Joints ](../urdf_srdf/urdf_srdf_tutorial.html#virtual-joints)
      * [ Passive Joints ](../urdf_srdf/urdf_srdf_tutorial.html#passive-joints)
      * [ Groups ](../urdf_srdf/urdf_srdf_tutorial.html#groups)
        * [ Collection of Joints ](../urdf_srdf/urdf_srdf_tutorial.html#collection-of-joints)
        * [ Collection of Links ](../urdf_srdf/urdf_srdf_tutorial.html#collection-of-links)
        * [ Serial Chain ](../urdf_srdf/urdf_srdf_tutorial.html#serial-chain)
        * [ Collection of Sub-Groups ](../urdf_srdf/urdf_srdf_tutorial.html#collection-of-sub-groups)
      * [ End-Effectors ](../urdf_srdf/urdf_srdf_tutorial.html#end-effectors)
      * [ Self-Collisions ](../urdf_srdf/urdf_srdf_tutorial.html#self-collisions)
      * [ Robot Poses ](../urdf_srdf/urdf_srdf_tutorial.html#robot-poses)
      * [ SRDF Documentation ](../urdf_srdf/urdf_srdf_tutorial.html#srdf-documentation)
  * [ Low Level Controllers ](../controller_configuration/controller_configuration_tutorial.html)


See something that needs improvement? Please open a pull request on this [
GitHub page ](https://github.com/ros-
planning/moveit_tutorials/blob/master/doc/move_group_interface/move_group_interface_tutorial.rst)


**Definition:** [ move_group_interface.h:62
](move__group__interface_8h_source.html#l00062)


    moveit_msgs::OrientationConstraint ocm;
    ocm.link_name = "panda_link7";
    ocm.header.frame_id = "panda_link0";
    ocm.orientation.w = 1.0;
    ocm.absolute_x_axis_tolerance = 0.1;
    ocm.absolute_y_axis_tolerance = 0.1;
    ocm.absolute_z_axis_tolerance = 0.1;
    ocm.weight = 1.0;


  * [ Kinematics Configuration ](../kinematics_configuration/kinematics_configuration_tutorial.html)
    * [ The kinematics.yaml file ](../kinematics_configuration/kinematics_configuration_tutorial.html#the-kinematics-yaml-file)
      * [ Parameters ](../kinematics_configuration/kinematics_configuration_tutorial.html#parameters)
      * [ The KDL Kinematics Plugin ](../kinematics_configuration/kinematics_configuration_tutorial.html#the-kdl-kinematics-plugin)
      * [ The LMA Kinematics Plugin ](../kinematics_configuration/kinematics_configuration_tutorial.html#the-lma-kinematics-plugin)
      * [ The Cached IK Plugin ](../kinematics_configuration/kinematics_configuration_tutorial.html#the-cached-ik-plugin)
    * [ Position Only IK ](../kinematics_configuration/kinematics_configuration_tutorial.html#position-only-ik)
  * [ Custom Constraint Samplers ](../custom_constraint_samplers/custom_constraint_samplers_tutorial.html)
    * [ Overview ](../custom_constraint_samplers/custom_constraint_samplers_tutorial.html#overview)
    * [ Getting Started ](../custom_constraint_samplers/custom_constraint_samplers_tutorial.html#getting-started)
    * [ Creating a constraint sampler ](../custom_constraint_samplers/custom_constraint_samplers_tutorial.html#creating-a-constraint-sampler)
  * [ Representation and Evaluation of Constraints ](../planning_constraints/planning_constraints.html)
    * [ See Also ](../planning_constraints/planning_constraints.html#see-also)
  * [ OMPL Planner ](../ompl_interface/ompl_interface_tutorial.html)
    * [ OMPL Settings ](../ompl_interface/ompl_interface_tutorial.html#ompl-settings)
      * [ Longest Valid Segment Fraction ](../ompl_interface/ompl_interface_tutorial.html#longest-valid-segment-fraction)
      * [ Projection Evaluator ](../ompl_interface/ompl_interface_tutorial.html#projection-evaluator)
      * [ Enforce Planning in Joint Space ](../ompl_interface/ompl_interface_tutorial.html#enforce-planning-in-joint-space)
      * [ Other Settings ](../ompl_interface/ompl_interface_tutorial.html#other-settings)
    * [ Trade-offs in speed and optimality ](../ompl_interface/ompl_interface_tutorial.html#trade-offs-in-speed-and-optimality)
      * [ OMPL Optimization Objectives ](../ompl_interface/ompl_interface_tutorial.html#ompl-optimization-objectives)
      * [ OMPL Planner Termination Conditions ](../ompl_interface/ompl_interface_tutorial.html#ompl-planner-termination-conditions)
      * [ Post-Processing Smoothing ](../ompl_interface/ompl_interface_tutorial.html#post-processing-smoothing)
    * [ Persistent Roadmaps ](../ompl_interface/ompl_interface_tutorial.html#persistent-roadmaps)
  * [ CHOMP Planner ](../chomp_planner/chomp_planner_tutorial.html)
    * [ Getting Started ](../chomp_planner/chomp_planner_tutorial.html#getting-started)
    * [ Prerequisites ](../chomp_planner/chomp_planner_tutorial.html#prerequisites)
    * [ Using CHOMP with Your Robot ](../chomp_planner/chomp_planner_tutorial.html#using-chomp-with-your-robot)
    * [ Running the Demo ](../chomp_planner/chomp_planner_tutorial.html#running-the-demo)
      * [ Running CHOMP with Obstacles in the Scene ](../chomp_planner/chomp_planner_tutorial.html#running-chomp-with-obstacles-in-the-scene)
    * [ Tweaking some of the parameters for CHOMP ](../chomp_planner/chomp_planner_tutorial.html#tweaking-some-of-the-parameters-for-chomp)
    * [ Difference between plans obtained by CHOMP and OMPL ](../chomp_planner/chomp_planner_tutorial.html#difference-between-plans-obtained-by-chomp-and-ompl)
    * [ Using CHOMP as a post-processor for OMPL ](../chomp_planner/chomp_planner_tutorial.html#using-chomp-as-a-post-processor-for-ompl)
  * [ STOMP Planner ](../stomp_planner/stomp_planner_tutorial.html)
    * [ Getting Started ](../stomp_planner/stomp_planner_tutorial.html#getting-started)
    * [ Prerequisites ](../stomp_planner/stomp_planner_tutorial.html#prerequisites)
    * [ Installing STOMP from Source ](../stomp_planner/stomp_planner_tutorial.html#installing-stomp-from-source)
    * [ Using STOMP with Your Robot ](../stomp_planner/stomp_planner_tutorial.html#using-stomp-with-your-robot)
    * [ Running the Demo ](../stomp_planner/stomp_planner_tutorial.html#running-the-demo)
      * [ Running STOMP with Obstacles in the Scene ](../stomp_planner/stomp_planner_tutorial.html#running-stomp-with-obstacles-in-the-scene)


moveit::planning_interface::MoveGroup MOVEIT_DEPRECATED


18  * * Neither the name of Willow Garage nor the names of its


###  Attaching objects to the robot  ¶


    * [ Starting RViz and the Command Line Tool ](../moveit_commander_scripting/moveit_commander_scripting_tutorial.html#starting-rviz-and-the-command-line-tool)
    * [ Using the MoveIt Commander Command Line Tool ](../moveit_commander_scripting/moveit_commander_scripting_tutorial.html#using-the-moveit-commander-command-line-tool)


calls the external moveit_msgs::GraspPlanning service "plan_grasps" to compute
possible grasps


Optionally, an instance of the RobotModel to use can be also specified.


    success = (move_group_interface.plan(my_plan) == moveit::core::MoveItErrorCode::SUCCESS);
    ROS_INFO_NAMED("tutorial", "Visualizing plan 6 (pose goal move around cuboid) %s", success ? "" : "FAILED");
    visual_tools.publishText(text_pose, "Obstacle Goal", rvt::WHITE, rvt::XLARGE);
    visual_tools.publishTrajectoryLine(my_plan.trajectory_, joint_model_group);
    visual_tools.trigger();
    visual_tools.prompt("Press 'next' in the RvizVisualToolsGui window once the plan is complete");


visual_tools.prompt("Press 'next' in the RvizVisualToolsGui window to start the demo");


    moveit_msgs::Constraints test_constraints;
    test_constraints.orientation_constraints.push_back(ocm);
    move_group_interface.setPathConstraints(test_constraints);


Definition at line [ 1854 ](move__group__interface_8cpp_source.html#l01854) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


Definition at line [ 1442 ](move__group__interface_8cpp_source.html#l01442) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


66  {


487  void  setRandomTarget();


  std::vector<double> values(1, value);
  return setJointValueTarget(joint_name, values);
}
bool MoveGroupInterface::setJointValueTarget(const std::string& joint_name, const std::vector<double>& values)
{
  impl_->setTargetType(JOINT);
  const moveit::core::JointModel* jm = impl_->getJointModelGroup()->getJointModel(joint_name);
  if (jm && jm->getVariableCount() == values.size())
  {
    impl_->getTargetRobotState().setJointPositions(jm, values);
    return impl_->getTargetRobotState().satisfiesBounds(jm, impl_->getGoalJointTolerance());
  }
  RCLCPP_ERROR_STREAM(logger_,
                      "joint " << joint_name << " is not part of group " << impl_->getJointModelGroup()->getName());
  return false;
}
bool MoveGroupInterface::setJointValueTarget(const sensor_msgs::msg::JointState& state)
{
  return setJointValueTarget(state.name, state.position);
}
bool MoveGroupInterface::setJointValueTarget(const geometry_msgs::msg::Pose& eef_pose,
                                             const std::string& end_effector_link)
{
  return impl_->setJointValueTarget(eef_pose, end_effector_link, "", false);
}
bool MoveGroupInterface::setJointValueTarget(const geometry_msgs::msg::PoseStamped& eef_pose,
                                             const std::string& end_effector_link)
{
  return impl_->setJointValueTarget(eef_pose.pose, end_effector_link, eef_pose.header.frame_id, false);
}
bool MoveGroupInterface::setJointValueTarget(const Eigen::Isometry3d& eef_pose, const std::string& end_effector_link)
{
  geometry_msgs::msg::Pose msg = tf2::toMsg(eef_pose);
  return setJointValueTarget(msg, end_effector_link);
}
bool MoveGroupInterface::setApproximateJointValueTarget(const geometry_msgs::msg::Pose& eef_pose,
                                                        const std::string& end_effector_link)
{
  return impl_->setJointValueTarget(eef_pose, end_effector_link, "", true);
}


Definition at line [ 1530 ](move__group__interface_8cpp_source.html#l01530) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


307  void  setSupportSurfaceName(  const  std::string& name);


void moveit::planning_interface::MoveGroupInterface::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.


    move_group_interface.setMaxVelocityScalingFactor(0.05);
    move_group_interface.setMaxAccelerationScalingFactor(0.05);

    success = (move_group_interface.plan(my_plan) == moveit::core::MoveItErrorCode::SUCCESS);
    ROS_INFO_NAMED("tutorial", "Visualizing plan 2 (joint space goal) %s", success ? "" : "FAILED");


283  void  setGoalPositionTolerance(  double  tolerance);


void moveit::planning_interface::MoveGroupInterface::forgetJointValues  |  (
|  const std::string & |  _name_ |  )  |
---|---|---|---|---|---

Forget the joint values remebered under _name_ .


213  unsigned  int  getVariableCount()  const  ;


    * [ Tweaking some of the parameters for STOMP ](../stomp_planner/stomp_planner_tutorial.html#tweaking-some-of-the-parameters-for-stomp)
    * [ Difference between plans obtained by STOMP, CHOMP and OMPL ](../stomp_planner/stomp_planner_tutorial.html#difference-between-plans-obtained-by-stomp-chomp-and-ompl)
    * [ Running STOMP Unit Tests ](../stomp_planner/stomp_planner_tutorial.html#running-stomp-unit-tests)
  * [ TrajOpt Planner ](../trajopt_planner/trajopt_planner_tutorial.html)
    * [ Getting Started ](../trajopt_planner/trajopt_planner_tutorial.html#getting-started)
    * [ Prerequisites ](../trajopt_planner/trajopt_planner_tutorial.html#prerequisites)
    * [ Running the Demo ](../trajopt_planner/trajopt_planner_tutorial.html#running-the-demo)
    * [ How TrajOpt works ](../trajopt_planner/trajopt_planner_tutorial.html#how-trajopt-works)
    * [ How to use TrajOpt ](../trajopt_planner/trajopt_planner_tutorial.html#how-to-use-trajopt)
    * [ References ](../trajopt_planner/trajopt_planner_tutorial.html#references)
  * [ Pilz Industrial Motion Planner ](../pilz_industrial_motion_planner/pilz_industrial_motion_planner.html)
    * [ User Interface MoveGroup ](../pilz_industrial_motion_planner/pilz_industrial_motion_planner.html#user-interface-movegroup)
    * [ Joint Limits ](../pilz_industrial_motion_planner/pilz_industrial_motion_planner.html#joint-limits)
    * [ Cartesian Limits ](../pilz_industrial_motion_planner/pilz_industrial_motion_planner.html#cartesian-limits)
    * [ Planning Interface ](../pilz_industrial_motion_planner/pilz_industrial_motion_planner.html#planning-interface)
    * [ The PTP motion command ](../pilz_industrial_motion_planner/pilz_industrial_motion_planner.html#the-ptp-motion-command)
      * [ Input parameters in ` moveit_msgs::MotionPlanRequest  ` ](../pilz_industrial_motion_planner/pilz_industrial_motion_planner.html#input-parameters-in-moveit-msgs-motionplanrequest)
      * [ Planning results in ` moveit_msg::MotionPlanResponse  ` ](../pilz_industrial_motion_planner/pilz_industrial_motion_planner.html#planning-results-in-moveit-msg-motionplanresponse)
    * [ The LIN motion command ](../pilz_industrial_motion_planner/pilz_industrial_motion_planner.html#the-lin-motion-command)
      * [ Input parameters in ` moveit_msgs::MotionPlanRequest  ` ](../pilz_industrial_motion_planner/pilz_industrial_motion_planner.html#id1)
      * [ Planning results in ` moveit_msg::MotionPlanResponse  ` ](../pilz_industrial_motion_planner/pilz_industrial_motion_planner.html#id2)
    * [ The CIRC motion command ](../pilz_industrial_motion_planner/pilz_industrial_motion_planner.html#the-circ-motion-command)
      * [ Input parameters in ` moveit_msgs::MotionPlanRequest  ` ](../pilz_industrial_motion_planner/pilz_industrial_motion_planner.html#id3)
      * [ Planning results in ` moveit_msg::MotionPlanResponse  ` ](../pilz_industrial_motion_planner/pilz_industrial_motion_planner.html#id4)
    * [ Example ](../pilz_industrial_motion_planner/pilz_industrial_motion_planner.html#example)
    * [ Using the planner ](../pilz_industrial_motion_planner/pilz_industrial_motion_planner.html#using-the-planner)
  * [ Sequence of multiple segments ](../pilz_industrial_motion_planner/pilz_industrial_motion_planner.html#sequence-of-multiple-segments)
    * [ User interface sequence capability ](../pilz_industrial_motion_planner/pilz_industrial_motion_planner.html#user-interface-sequence-capability)
      * [ Restrictions for ` MotionSequenceRequest  ` ](../pilz_industrial_motion_planner/pilz_industrial_motion_planner.html#restrictions-for-motionsequencerequest)
      * [ Action interface ](../pilz_industrial_motion_planner/pilz_industrial_motion_planner.html#action-interface)
      * [ Service interface ](../pilz_industrial_motion_planner/pilz_industrial_motion_planner.html#service-interface)
  * [ Planning Adapter Tutorials ](../planning_adapters/planning_adapters_tutorial.html)
    * [ Getting Started ](../planning_adapters/planning_adapters_tutorial.html#getting-started)
    * [ Prerequisites ](../planning_adapters/planning_adapters_tutorial.html#prerequisites)
    * [ Installing MoveIt from Source ](../planning_adapters/planning_adapters_tutorial.html#installing-moveit-from-source)
    * [ Using Planning Request Adapter with Your Motion Planner ](../planning_adapters/planning_adapters_tutorial.html#using-planning-request-adapter-with-your-motion-planner)
      * [ Running OMPL as a pre-processor for CHOMP ](../planning_adapters/planning_adapters_tutorial.html#running-ompl-as-a-pre-processor-for-chomp)
      * [ Running CHOMP as a post-processor for STOMP ](../planning_adapters/planning_adapters_tutorial.html#running-chomp-as-a-post-processor-for-stomp)
      * [ Running OMPL as a pre-processor for STOMP ](../planning_adapters/planning_adapters_tutorial.html#running-ompl-as-a-pre-processor-for-stomp)
      * [ Running STOMP as a post-processor for CHOMP ](../planning_adapters/planning_adapters_tutorial.html#running-stomp-as-a-post-processor-for-chomp)


57  namespace  [ moveit ](namespacemoveit.html)


906  moveit_msgs::Constraints getPathConstraints()  const  ;


839  std::vector<double> getCurrentJointValues();


void
moveit::planning_interface::MoveGroupInterface::setMaxVelocityScalingFactor  |
(  |  double  |  _max_velocity_scaling_factor_ |  )  |
---|---|---|---|---|---

Set a scaling factor for optionally reducing the maximum joint velocity.
Allowed values are in (0,1]. The maximum joint velocity specified in the robot
model is multiplied by the factor. If outside valid range (imporantly, this
includes it being set to 0.0), the factor is set to a default value of 1.0
internally (i.e. maximum joint velocity)


](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Plan.html)
&plan)
|  Compute a motion plan that takes the group declared in the constructor from
the current state to the specified target. No execution is performed. The
resulting plan is stored in _plan_ .  More...

[ MoveItErrorCode
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html) |  [
asyncExecute
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a07227c4302a2a4d423ba413bde4deab7)
(const [ Plan
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Plan.html) & [
plan
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#ad72e3d9367374e388546c8e81f26035a)
)
|  Given a _plan_ , execute it without waiting for completion. Return true on
success.  More...

[ MoveItErrorCode
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html) |  [ execute
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#add236df4ab9ba7b7011ec53f8aa9c026)
(const [ Plan
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Plan.html) & [
plan
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#ad72e3d9367374e388546c8e81f26035a)
)
|  Given a _plan_ , execute it while waiting for completion. Return true on
success.  More...

double  |  [ computeCartesianPath
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#afd29c4dc55b10564102cf393cd38c71d)
(const std::vector< [ geometry_msgs::Pose
](../../../api/tf/html/c++/namespacetf.html#af31f272a1879787c24c3decb07cdb361)
> &waypoints, double eef_step, double jump_threshold,
moveit_msgs::RobotTrajectory & [ trajectory
](../../../api/moveit_core/html/test__time__parameterization_8cpp.html#aff2c23e0aa6bda064cbd69854f36e75f)
, bool avoid_collisions=true, moveit_msgs::MoveItErrorCodes *error_code=NULL)
|  Compute a Cartesian path that follows specified waypoints with a step size
of at most _eef_step_ meters between end effector configurations of
consecutive points in the result _trajectory_ . The reference frame for the


//{
//  return impl_->constructPlaceGoal(object, std::move(locations), plan_only);
//}
//
// std::vector<moveit_msgs::msg::PlaceLocation>
// MoveGroupInterface::posesToPlaceLocations(const std::vector<geometry_msgs::msg::PoseStamped>& poses) const
//{
//  return impl_->posesToPlaceLocations(poses);
//}
//
// moveit::core::MoveItErrorCode MoveGroupInterface::pick(const moveit_msgs::action::Pickup::Goal& goal)
//{
//  return impl_->pick(goal);
//}
//
// moveit::core::MoveItErrorCode MoveGroupInterface::planGraspsAndPick(const std::string& object, bool plan_only)
//{
//  return impl_->planGraspsAndPick(object, plan_only);
//}
//
// moveit::core::MoveItErrorCode MoveGroupInterface::planGraspsAndPick(const moveit_msgs::msg::CollisionObject& object,
// bool plan_only)
//{
//  return impl_->planGraspsAndPick(object, plan_only);
//}
//
// moveit::core::MoveItErrorCode MoveGroupInterface::place(const moveit_msgs::action::Place::Goal& goal)
//{
//  return impl_->place(goal);
//}
double MoveGroupInterface::computeCartesianPath(const std::vector<geometry_msgs::msg::Pose>& waypoints, double eef_step,
                                                double jump_threshold, moveit_msgs::msg::RobotTrajectory& trajectory,
                                                bool avoid_collisions, moveit_msgs::msg::MoveItErrorCodes* error_code)
{
  moveit_msgs::msg::Constraints path_constraints_tmp;
  return computeCartesianPath(waypoints, eef_step, jump_threshold, trajectory, moveit_msgs::msg::Constraints(),
                              avoid_collisions, error_code);
}
double MoveGroupInterface::computeCartesianPath(const std::vector<geometry_msgs::msg::Pose>& waypoints, double eef_step,
                                                double jump_threshold, moveit_msgs::msg::RobotTrajectory& trajectory,


bool
moveit::planning_interface::MoveGroupInterface::setApproximateJointValueTarget
|  (  |  const Eigen::Affine3d & |  _eef_pose_ ,
---|---|---|---
|  |  const std::string & |  _end_effector_link_ = ` "" `
|  )  |  |

Set the joint state goal for a particular joint by computing IK.


[ 65
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html#af155da6133976a737823585a12b6aaf6)
[ MoveItErrorCode
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html#af155da6133976a737823585a12b6aaf6)
()


[ tf ](../../../api/eigen_conversions/html/namespacetf.html)