](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Plan.html) )
[ MoveGroupInterface
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html) & |  [
operator=
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a4eca5e2ea652130969e913bdeeb1a2a7)
(const [ MoveGroupInterface
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html) &)=delete
[ MoveGroupInterface
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html) & |  [
operator=
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#ab005fbe8dce758069ea6351870d903a3)
( [ MoveGroupInterface
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html) &&other)
void  |  [ setGoalJointTolerance
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a8ec9d8fa132c8d807a5e48d18c579187)
(double tolerance)
|  Set the joint tolerance (for each joint) that is used for reaching the goal
when moving to a joint value target.  More...

void  |  [ setGoalOrientationTolerance
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a7f803a9f365c5c37801c04611d1db933)
(double tolerance)
|  Set the orientation tolerance that is used for reaching the goal when
moving to a pose.  More...

void  |  [ setGoalPositionTolerance
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a25e58a6cc1c120409cfa5f256716ffca)
(double tolerance)
|  Set the position tolerance that is used for reaching the goal when moving
to a pose.  More...

void  |  [ setGoalTolerance
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a255288edd356098b0b16bcbac8fd5f65)
(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


    moveit_msgs::CollisionObject collision_object;
    collision_object.header.frame_id = move_group_interface.getPlanningFrame();


51  #include <moveit_msgs/MoveGroupAction.h>


Define a pose for the box (specified relative to frame_id)


[ 882
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a7da7361401c0810970a6b69105c5ee01)
const  std::map<std::string, std::vector<double> >& [ getRememberedJointValues
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a7da7361401c0810970a6b69105c5ee01)
()  const


  rclcpp_action::Client<moveit_msgs::action::MoveGroup>& getMoveGroupClient() const
  {
    return *move_action_client_;
  }
  bool getInterfaceDescription(moveit_msgs::msg::PlannerInterfaceDescription& desc)
  {
    auto req = std::make_shared<moveit_msgs::srv::QueryPlannerInterfaces::Request>();
    auto future_response = query_service_->async_send_request(req);
    if (future_response.valid())
    {
      const auto& response = future_response.get();
      if (!response->planner_interfaces.empty())
      {
        desc = response->planner_interfaces.front();
        return true;
      }
    }
    return false;
  }
  bool getInterfaceDescriptions(std::vector<moveit_msgs::msg::PlannerInterfaceDescription>& desc)
  {
    auto req = std::make_shared<moveit_msgs::srv::QueryPlannerInterfaces::Request>();
    auto future_response = query_service_->async_send_request(req);
    if (future_response.valid())
    {
      const auto& response = future_response.get();
      if (!response->planner_interfaces.empty())
      {
        desc = response->planner_interfaces;
        return true;
      }
    }
    return false;
  }
  std::map<std::string, std::string> getPlannerParams(const std::string& planner_id, const std::string& group = "")
  {
    auto req = std::make_shared<moveit_msgs::srv::GetPlannerParams::Request>();
    moveit_msgs::srv::GetPlannerParams::Response::SharedPtr response;
    req->planner_config = planner_id;
    req->group = group;


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

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


After this call, the JointValueTarget is used **instead** of any previously
set Position, Orientation, or Pose targets.


Planning with constraints can be slow because every sample must call an
inverse kinematics solver. Lets increase the planning time from the default 5
seconds to be sure the planner has enough time to succeed.


2  * Software License Agreement (BSD License)


move_group_interface.setPoseTarget(target_pose1);


Definition at line [ 1956 ](move__group__interface_8cpp_source.html#l01956) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


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.


Then, we “attach” the object to the robot at the given link and allow
collisions between the object and the listed links. You could also use
applyAttachedCollisionObject to attach an object to the robot directly.


9  * modification, are permitted provided that the following conditions


First, we add the object to the world (without using a vector)


**Definition:** [ move_group_interface.h:69
](move__group__interface_8h_source.html#l00069)


    * [ Planning Insights for different motion planners and planners with planning adapters ](../planning_adapters/planning_adapters_tutorial.html#planning-insights-for-different-motion-planners-and-planners-with-planning-adapters)
  * [ Warehouse - Persistent Scenes and States ](../persistent_scenes_and_states/persistent_scenes_and_states.html)
    * [ Storage plugin selection ](../persistent_scenes_and_states/persistent_scenes_and_states.html#storage-plugin-selection)
    * [ Connecting to the storage backend ](../persistent_scenes_and_states/persistent_scenes_and_states.html#connecting-to-the-storage-backend)
    * [ Saving/Loading scenes and states ](../persistent_scenes_and_states/persistent_scenes_and_states.html#saving-loading-scenes-and-states)


  bool attachObject(const std::string& object, const std::string& link, const std::vector<std::string>& touch_links)
  {
    std::string l = link.empty() ? getEndEffectorLink() : link;
    if (l.empty())
    {
      const std::vector<std::string>& links = joint_model_group_->getLinkModelNames();
      if (!links.empty())
        l = links[0];
    }
    if (l.empty())
    {
      RCLCPP_ERROR(logger_, "No known link to attach object '%s' to", object.c_str());
      return false;
    }
    moveit_msgs::msg::AttachedCollisionObject aco;
    aco.object.id = object;
    aco.link_name.swap(l);
    if (touch_links.empty())
    {
      aco.touch_links.push_back(aco.link_name);
    }
    else
    {
      aco.touch_links = touch_links;
    }
    aco.object.operation = moveit_msgs::msg::CollisionObject::ADD;
    attached_object_publisher_->publish(aco);
    return true;
  }
  bool detachObject(const std::string& name)
  {
    moveit_msgs::msg::AttachedCollisionObject aco;
    // if name is a link
    if (!name.empty() && joint_model_group_->hasLinkModel(name))
    {
      aco.link_name = name;
    }
    else
    {
      aco.object.id = name;


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

Remember the current joint values (of the robot being monitored) under _name_
. These can be used by [ setNamedTarget()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a5262ff42a454b499d3608b384957a5e4
"Set the current joint values to be ones previously remembered by
rememberJointValues\(\) or...") . These values are remembered locally in the
client. Other clients will not have access to them.


860  geometry_msgs::PoseStamped getRandomPose(  const  std::string&
end_effector_link =  ""  );


    const moveit::core::JointModelGroup* joint_model_group =
        move_group_interface.getCurrentState()->getJointModelGroup(PLANNING_GROUP);


923  void  setTrajectoryConstraints(  const
moveit_msgs::TrajectoryConstraints& constraint);


Definition at line [ 1725 ](move__group__interface_8cpp_source.html#l01725) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


bool moveit::planning_interface::MoveGroupInterface::setPoseTargets  |  (  |
const std::vector< [ geometry_msgs::Pose
](../../../api/tf/html/c++/namespacetf.html#af31f272a1879787c24c3decb07cdb361)
> & |  _target_ ,
---|---|---|---
|  |  const std::string & |  _end_effector_link_ = ` "" `
|  )  |  |

Set goal poses for _end_effector_link_ .


If IK fails to find a solution then an approximation is used.


bool moveit::planning_interface::MoveGroupInterface::attachObject  |  (  |
const std::string & |  _object_ ,
---|---|---|---
|  |  const std::string & |  _link_ = ` "" `
|  )  |  |

Given the name of an object in the planning scene, make the object attached to
a link of the robot. If no link name is specified, the end-effector is used.
If there is no end-effector, the first link in the group is used. If the
object name does not exist an error will be produced in [ move_group
](../../../api/moveit_ros_manipulation/html/namespacemove__group.html) , but
the request made by this interface will succeed.


  * a JointValueTarget (aka JointStateTarget) specifies an absolute value for each joint (angle for rotational joints or position for prismatic joints).
  * a PoseTarget (Position, Orientation, or Pose) specifies the pose of one or more end effectors (and the planner can use any joint values that reaches the pose(s)).


916  void  setPathConstraints(  const  moveit_msgs::Constraints& constraint);


The entire launch file is [ here ](https://github.com/ros-
planning/moveit_tutorials/blob/master/doc/move_group_interface/launch/move_group_interface_tutorial.launch)
on GitHub. All the code in this tutorial can be run from the
**moveit_tutorials** package that you have as part of your MoveIt setup.


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

Get only the active (actuated) joints this instance operates on.


924  void  clearTrajectoryConstraints();


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

Set goal poses for _end_effector_link_ .


|  const std::string
moveit::planning_interface::MoveGroupInterface::ROBOT_DESCRIPTION
---
static

**Initial value:**


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


[ moveit::planning_interface::MoveGroupInterface::ROBOT_DESCRIPTION
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a11613e2bc76eb2b956d7c6eb9357139d)


229  void  setPlannerId(  const  std::string& planner_id);


**Definition:** [ move_group_interface.h:122
](move__group__interface_8h_source.html#l00122)


  void setMaxScalingFactor(double& variable, const double target_value, const char* factor_name, double fallback_value)
  {
    if (target_value > 1.0)
    {
      RCLCPP_WARN(logger_, "Limiting max_%s (%.2f) to 1.0.", factor_name, target_value);
      variable = 1.0;
    }
    else if (target_value <= 0.0)
    {
      node_->get_parameter_or<double>(std::string("robot_description_planning.default_") + factor_name, variable,
                                      fallback_value);
      if (target_value < 0.0)
      {
        RCLCPP_WARN(logger_, "max_%s < 0.0! Setting to default: %.2f.", factor_name, variable);
      }
    }
    else
    {
      variable = target_value;
    }
  }
  moveit::core::RobotState& getTargetRobotState()
  {
    return *joint_state_target_;
  }
  const moveit::core::RobotState& getTargetRobotState() const
  {
    return *joint_state_target_;
  }
  void setStartState(const moveit::core::RobotState& start_state)
  {
    considered_start_state_ = std::make_shared<moveit::core::RobotState>(start_state);
  }
  void setStartStateToCurrentState()
  {
    considered_start_state_.reset();
  }
  moveit::core::RobotStatePtr getStartState()
  {
    if (considered_start_state_)


void  |  [ allowLooking
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#ae33718102a4542366b43a6a763031d52)
(bool flag)
|  Specify whether the robot is allowed to look around before moving if it
determines it should (default is true)  More...

void  |  [ allowReplanning
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a683a78bcefe1207e71a1354f0189bcc8)
(bool flag)
|  Specify whether the robot is allowed to replan if it detects changes in the
environment.  More...

void  |  [ constructMotionPlanRequest
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a51b1e296f0508b0c879755d3acb96c21)
( [ moveit_msgs::MotionPlanRequest
](../../../api/moveit_core/html/namespaceplanning__interface.html#a66b7da9ae05ece3dbde7605d89208ae8)
&request)
|  Build the MotionPlanRequest that would be sent to the [ move_group
](../../../api/moveit_ros_manipulation/html/namespacemove__group.html) action
with [ plan()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#ad72e3d9367374e388546c8e81f26035a
"Compute a motion plan that takes the group declared in the constructor from
the current state to the ...") or [ move()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a3513c41b0c73400fc6713b25bc6b1637
"Plan and execute a trajectory that takes the group of joints declared in the
constructor to the speci...") and store it in _request_ .  More...

High level actions that trigger a sequence of plans and actions.

[ MoveItErrorCode
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html) |  [ pick
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a1e34378bf0b55cb6d07fab5d4d3ae12d)
(const std::string &object, bool plan_only=false)
|  Pick up an object.  More...

[ MoveItErrorCode
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html) |  [ pick
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a814bbccdb54f56eeedf1bc64c1c72791)
(const std::string &object, const moveit_msgs::Grasp &grasp, bool


Definition at line [ 2020 ](move__group__interface_8cpp_source.html#l02020) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


303  void  setStartStateToCurrentState();


###  Enforce Planning in Joint Space  ¶


Definition at line [ 1621 ](move__group__interface_8cpp_source.html#l01621) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


void MoveGroupInterface::setReplanDelay(double delay)
{
  if (delay < 0.0)
  {
    RCLCPP_ERROR(logger_, "Tried to set negative replan delay");
  }
  else
  {
    RCLCPP_DEBUG_STREAM(logger_, "Replan Delay: " << delay);
    impl_->replan_delay_ = delay;
  }
}
std::vector<std::string> MoveGroupInterface::getKnownConstraints() const
{
  return impl_->getKnownConstraints();
}
moveit_msgs::msg::Constraints MoveGroupInterface::getPathConstraints() const
{
  return impl_->getPathConstraints();
}
bool MoveGroupInterface::setPathConstraints(const std::string& constraint)
{
  return impl_->setPathConstraints(constraint);
}
void MoveGroupInterface::setPathConstraints(const moveit_msgs::msg::Constraints& constraint)
{
  impl_->setPathConstraints(constraint);
}
void MoveGroupInterface::clearPathConstraints()
{
  impl_->clearPathConstraints();
}
moveit_msgs::msg::TrajectoryConstraints MoveGroupInterface::getTrajectoryConstraints() const
{
  return impl_->getTrajectoryConstraints();
}
void MoveGroupInterface::setTrajectoryConstraints(const moveit_msgs::msg::TrajectoryConstraints& constraint)
{
  impl_->setTrajectoryConstraints(constraint);
}


Definition at line [ 1566 ](move__group__interface_8cpp_source.html#l01566) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


674  const  std::string& getPoseReferenceFrame()  const  ;


Definition at line [ 2071 ](move__group__interface_8cpp_source.html#l02071) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


You can plan a Cartesian path directly by specifying a list of waypoints for
the end-effector to go through. Note that we are starting from the new start
state above. The initial pose (start state) does not need to be added to the
waypoint list but adding it can help with visualizations


931  [ MoveGroupInterfaceImpl
](classmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1MoveGroupInterfaceImpl.html)
* [ impl_
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a64ddb8064073c6e9ed50b0a448362052)
;


"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...") .  More...

void  |  [ setMaxAccelerationScalingFactor
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a3e2bd2edccca8aa49a6bec9d039d5bf3)
(double max_acceleration_scaling_factor)
|  Set a scaling factor for optionally reducing the maximum joint
acceleration. Allowed values are in (0,1]. The maximum joint acceleration
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 acceleration)  More...

void  |  [ setMaxVelocityScalingFactor
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a0eec941ccbfa23260196196ce7a8dd17)
(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)  More...

void  |  [ setNumPlanningAttempts
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a4a65f96a405ab39f2e58714b7f349612)
(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.  More...

void  |  [ setPlannerId
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#acab185ec950fe45dad9781eca3c71cc2)
(const std::string &planner_id)
|  Specify a planner to be used for further planning.  More...

void  |  [ setPlannerParams
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#af6adaecfa21a4b0ca1c4eac30b7269b1)


**Definition:** [ move_group_interface.h:120
](move__group__interface_8h_source.html#l00120)


Definition at line [ 1822 ](move__group__interface_8cpp_source.html#l01822) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


    ROS_INFO_NAMED("tutorial", "Available Planning Groups:");
    std::copy(move_group_interface.getJointModelGroupNames().begin(),
              move_group_interface.getJointModelGroupNames().end(), std::ostream_iterator<std::string>(std::cout, ", "));


geometry_msgs::PoseStamped
moveit::planning_interface::MoveGroupInterface::getRandomPose  |  (  |  const
std::string & |  _end_effector_link_ = ` "" ` |  )  |
---|---|---|---|---|---

Get a random reachable pose 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.


222  void  setPlannerParams(  const  std::string& planner_id,  const
std::string& group,


29  * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER


879  void  rememberJointValues(  const  std::string& name,  const
std::vector<double>& values);


Now, let’s modify one of the joints, plan to the new joint space goal and
visualize the plan.


}
bool MoveGroupInterface::setPoseTargets(const std::vector<geometry_msgs::msg::Pose>& target,
                                        const std::string& end_effector_link)
{
  std::vector<geometry_msgs::msg::PoseStamped> target_stamped(target.size());
  rclcpp::Time tm = impl_->getClock()->now();
  const std::string& frame_id = getPoseReferenceFrame();
  for (std::size_t i = 0; i < target.size(); ++i)
  {
    target_stamped[i].pose = target[i];
    target_stamped[i].header.stamp = tm;
    target_stamped[i].header.frame_id = frame_id;
  }
  return setPoseTargets(target_stamped, end_effector_link);
}
bool MoveGroupInterface::setPoseTargets(const std::vector<geometry_msgs::msg::PoseStamped>& target,
                                        const std::string& end_effector_link)
{
  if (target.empty())
  {
    RCLCPP_ERROR(logger_, "No pose specified as goal target");
    return false;
  }
  else
  {
    impl_->setTargetType(POSE);
    return impl_->setPoseTargets(target, end_effector_link);
  }
}
const geometry_msgs::msg::PoseStamped& MoveGroupInterface::getPoseTarget(const std::string& end_effector_link) const
{
  return impl_->getPoseTarget(end_effector_link);
}
const std::vector<geometry_msgs::msg::PoseStamped>&
MoveGroupInterface::getPoseTargets(const std::string& end_effector_link) const
{
  return impl_->getPoseTargets(end_effector_link);
}
namespace
{


|  std::map<std::string, std::vector<double> >
moveit::planning_interface::MoveGroupInterface::remembered_joint_values_
---
private

Definition at line [ 929 ](move__group__interface_8h_source.html#l00929) of
file [ move_group_interface.h ](move__group__interface_8h_source.html) .


Definition at line [ 1589 ](move__group__interface_8cpp_source.html#l01589) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


      std::string error = "Group '" + opt.group_name + "' was not found.";
      RCLCPP_FATAL_STREAM(logger_, error);
      throw std::runtime_error(error);
    }
    joint_model_group_ = getRobotModel()->getJointModelGroup(opt.group_name);
    joint_state_target_ = std::make_shared<moveit::core::RobotState>(getRobotModel());
    joint_state_target_->setToDefaultValues();
    active_target_ = JOINT;
    can_look_ = false;
    look_around_attempts_ = 0;
    can_replan_ = false;
    replan_delay_ = 2.0;
    replan_attempts_ = 1;
    goal_joint_tolerance_ = 1e-4;
    goal_position_tolerance_ = 1e-4;     // 0.1 mm
    goal_orientation_tolerance_ = 1e-3;  // ~0.1 deg
    allowed_planning_time_ = 5.0;
    num_planning_attempts_ = 1;
    node_->get_parameter_or<double>("robot_description_planning.default_velocity_scaling_factor",
                                    max_velocity_scaling_factor_, 0.1);
    node_->get_parameter_or<double>("robot_description_planning.default_acceleration_scaling_factor",
                                    max_acceleration_scaling_factor_, 0.1);
    initializing_constraints_ = false;
    if (joint_model_group_->isChain())
      end_effector_link_ = joint_model_group_->getLinkModelNames().back();
    pose_reference_frame_ = getRobotModel()->getModelFrame();
    // Append the slash between two topic components
    trajectory_event_publisher_ = node_->create_publisher<std_msgs::msg::String>(
        rclcpp::names::append(opt_.move_group_namespace,
                              trajectory_execution_manager::TrajectoryExecutionManager::EXECUTION_EVENT_TOPIC),
        1);
    attached_object_publisher_ = node_->create_publisher<moveit_msgs::msg::AttachedCollisionObject>(
        rclcpp::names::append(opt_.move_group_namespace,
                              planning_scene_monitor::PlanningSceneMonitor::DEFAULT_ATTACHED_COLLISION_OBJECT_TOPIC),
        1);
    current_state_monitor_ = getSharedStateMonitor(node_, robot_model_, tf_buffer_);
    move_action_client_ = rclcpp_action::create_client<moveit_msgs::action::MoveGroup>(
        node_, rclcpp::names::append(opt_.move_group_namespace, move_group::MOVE_ACTION), callback_group_);
    move_action_client_->wait_for_action_server(wait_for_servers.to_chrono<std::chrono::duration<double>>());
    execute_action_client_ = rclcpp_action::create_client<moveit_msgs::action::ExecuteTrajectory>(


MoveIt operates on sets of joints called “planning groups” and stores them in
an object called the  JointModelGroup  . Throughout MoveIt the terms “planning
group” and “joint model group” are used interchangeably.


[ desc
](../../../api/moveit_kinematics/html/namespacecreate__ikfast__moveit__plugin.html#acea37eb824dcaa53b6a91f548ee1b5f7)


[ attachObject ](demo_8cpp.html#a7b9e3632e33ade1fb91f781cf2a349b8)


    move_group_interface.setStartStateToCurrentState();
    success = (move_group_interface.plan(my_plan) == moveit::core::MoveItErrorCode::SUCCESS);
    ROS_INFO_NAMED("tutorial", "Visualizing plan 7 (move around cuboid with cylinder) %s", success ? "" : "FAILED");
    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");


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


110  {


    moveit::core::RobotState start_state(*move_group_interface.getCurrentState());
    geometry_msgs::Pose start_pose2;
    start_pose2.orientation.w = 1.0;
    start_pose2.position.x = 0.55;
    start_pose2.position.y = -0.05;
    start_pose2.position.z = 0.8;
    start_state.setFromIK(joint_model_group, start_pose2);
    move_group_interface.setStartState(start_state);


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.


moveit::planning_interface::MoveGroupInterface Class Reference


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


[ 85
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html#a8abfea59c8baf37e4a649a09c0483f59)
bool  [ operator!=
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html#a8abfea59c8baf37e4a649a09c0483f59)
(  const  int  c)  const


  ActiveTargetType getTargetType() const
  {
    return active_target_;
  }
  bool startStateMonitor(double wait)
  {
    if (!current_state_monitor_)
    {
      RCLCPP_ERROR(logger_, "Unable to monitor current robot state");
      return false;
    }
    // if needed, start the monitor and wait up to 1 second for a full robot state
    if (!current_state_monitor_->isActive())
      current_state_monitor_->startStateMonitor();
    current_state_monitor_->waitForCompleteState(opt_.group_name, wait);
    return true;
  }
  bool getCurrentState(moveit::core::RobotStatePtr& current_state, double wait_seconds = 1.0)
  {
    if (!current_state_monitor_)
    {
      RCLCPP_ERROR(logger_, "Unable to get current robot state");
      return false;
    }
    // if needed, start the monitor and wait up to 1 second for a full robot state
    if (!current_state_monitor_->isActive())
      current_state_monitor_->startStateMonitor();
    if (!current_state_monitor_->waitForCurrentState(node_->now(), wait_seconds))
    {
      RCLCPP_ERROR(logger_, "Failed to fetch current robot state");
      return false;
    }
    current_state = current_state_monitor_->getCurrentState();
    return true;
  }
  moveit::core::MoveItErrorCode plan(Plan& plan)
  {
    if (!move_action_client_ || !move_action_client_->action_server_is_ready())
    {
      RCLCPP_INFO_STREAM(logger_, "MoveGroup action client/server not ready");


  {
    return planning_pipeline_id_;
  }
  std::string getDefaultPlannerId(const std::string& group) const
  {
    // Check what planning pipeline config should be used
    std::string pipeline_id = getDefaultPlanningPipelineId();
    if (!planning_pipeline_id_.empty())
      pipeline_id = planning_pipeline_id_;
    std::stringstream param_name;
    param_name << "move_group";
    if (!pipeline_id.empty())
      param_name << "/planning_pipelines/" << pipeline_id;
    if (!group.empty())
      param_name << '.' << group;
    param_name << ".default_planner_config";
    std::string default_planner_config;
    node_->get_parameter(param_name.str(), default_planner_config);
    return default_planner_config;
  }
  void setPlannerId(const std::string& planner_id)
  {
    planner_id_ = planner_id;
  }
  const std::string& getPlannerId() const
  {
    return planner_id_;
  }
  void setNumPlanningAttempts(unsigned int num_planning_attempts)
  {
    num_planning_attempts_ = num_planning_attempts;
  }
  void setMaxVelocityScalingFactor(double value)
  {
    setMaxScalingFactor(max_velocity_scaling_factor_, value, "velocity_scaling_factor", 0.1);
  }
  void setMaxAccelerationScalingFactor(double value)
  {
    setMaxScalingFactor(max_acceleration_scaling_factor_, value, "acceleration_scaling_factor", 0.1);
  }


Show text in RViz of status and wait for MoveGroup to receive and process the
collision object message


##  Constructor & Destructor Documentation


    move_group_interface.setStartState(*move_group_interface.getCurrentState());
    geometry_msgs::Pose another_pose;
    another_pose.orientation.x = 1.0;
    another_pose.position.x = 0.7;
    another_pose.position.y = 0.0;
    another_pose.position.z = 0.59;
    move_group_interface.setPoseTarget(another_pose);

    success = (move_group_interface.plan(my_plan) == moveit::core::MoveItErrorCode::SUCCESS);
    ROS_INFO_NAMED("tutorial", "Visualizing plan 5 (with no obstacles) %s", success ? "" : "FAILED");

    visual_tools.deleteAllMarkers();
    visual_tools.publishText(text_pose, "Clear Goal", rvt::WHITE, rvt::XLARGE);
    visual_tools.publishTrajectoryLine(my_plan.trajectory_, joint_model_group);
    visual_tools.trigger();
    visual_tools.prompt("next step");


    std::vector<double> joint_group_positions;
    current_state->copyJointGroupPositions(joint_model_group, joint_group_positions);


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

Specify whether the robot is allowed to replan if it detects changes in the
environment.


_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.  More...

std::vector< double > |  [ getCurrentRPY
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a830c4ad88ec226c239fbb54882588d5b)
(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.  More...

std::vector< double > |  [ getRandomJointValues
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a946f05ae9494c21436e7794bad60c274)
()
|  Get random joint values for the joints planned for by this instance (see [
getJoints()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#ad70dc7e2c5554d63d66fb9ccf1bfa36c
"Get all the joints this instance operates on \(including fixed joints\) ") )
More...

geometry_msgs::PoseStamped  |  [ getRandomPose
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a12c22f64ed1ed79fbca3f425c8f1855c)
(const std::string &end_effector_link="")
|  Get a random reachable pose 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.  More...

Manage named joint configurations

void  |  [ rememberJointValues
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a9756c7e7248526382189ca7cc89fdddd)


52  #include <geometry_msgs/PoseStamped.h>


Definition at line [ 2105 ](move__group__interface_8cpp_source.html#l02105) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


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


Definition at line [ 1827 ](move__group__interface_8cpp_source.html#l01827) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


Get time allowed to planner to solve problem before aborting.


If you haven’t already done so, make sure you’ve completed the steps in [
Getting Started ](../getting_started/getting_started.html) .


Definition at line [ 2037 ](move__group__interface_8cpp_source.html#l02037) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


Definition at line [ 2172 ](move__group__interface_8cpp_source.html#l02172) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


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


[ moveit::planning_interface::MoveGroupInterface::impl_
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a64ddb8064073c6e9ed50b0a448362052)


robot_state::RobotStatePtr
moveit::planning_interface::MoveGroupInterface::getCurrentState  |  (  |
double  |  _wait_ = ` 1 ` |  )  |
---|---|---|---|---|---

Get the current state of the robot within the duration specified by wait.


  1. The robot moves its arm to the pose goal to its front.
  2. The robot moves its arm to the joint goal at its side.
  3. The robot moves its arm back to a new pose goal while maintaining the end-effector level.
  4. The robot moves its arm along the desired Cartesian path (a triangle down, right, up+left).
  5. A box object is added into the environment to the right of the arm. ![B](../../_images/move_group_interface_tutorial_robot_with_box.png)
  6. The robot moves its arm to the pose goal, avoiding collision with the box.
  7. The object is attached to the wrist (its color will change to purple/orange/green).
  8. The object is detached from the wrist (its color will change back to green).
  9. The object is removed from the environment.


Note that the [ MoveGroupInterface’s
](http://docs.ros.org/noetic/api/moveit_ros_planning_interface/html/classmoveit_1_1planning__interface_1_1MoveGroupInterface.html)
setGoalTolerance()  and related methods sets the tolerance for **planning** ,
not execution.


std::string getName(void *handle)


16  * disclaimer in the documentation and/or other materials provided


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


void moveit::planning_interface::MoveGroupInterface::rememberJointValues  |  (
|  const std::string & |  _name_ ,
---|---|---|---
|  |  const std::vector< double > & |  _values_
|  )  |  |

Remember the specified joint values under _name_ . These can be used by [
setNamedTarget()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a5262ff42a454b499d3608b384957a5e4
"Set the current joint values to be ones previously remembered by
rememberJointValues\(\) or...") . These values are remembered locally in the
client. Other clients will not have access to them.


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


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


563  bool  setPoseTarget(  const  geometry_msgs::PoseStamped& target,  const
std::string& end_effector_link =  ""  );


239  void  setNumPlanningAttempts(  unsigned  int  num_planning_attempts);


752  void  constructMotionPlanRequest(moveit_msgs::MotionPlanRequest&
request);


[ 131
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Plan.html#ac9333762e84a22da5879866413dec8c6)
moveit_msgs::RobotState [ start_state_
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Plan.html#ac9333762e84a22da5879866413dec8c6)
;


888  void  forgetJointValues(  const  std::string& [ name
](../../../api/eigenpy/html/namespacecompile.html#a46be63463291fe312cb52b5643ad6c3a)
);


##  The Entire Code  ¶


Now, let’s add the collision object into the world (using a vector that could
contain additional objects)


883  {


**Definition:** [ demo.cpp:104 ](demo_8cpp_source.html#l00104)


  {
    workspace_parameters_.header.frame_id = getRobotModel()->getModelFrame();
    workspace_parameters_.header.stamp = getClock()->now();
    workspace_parameters_.min_corner.x = minx;
    workspace_parameters_.min_corner.y = miny;
    workspace_parameters_.min_corner.z = minz;
    workspace_parameters_.max_corner.x = maxx;
    workspace_parameters_.max_corner.y = maxy;
    workspace_parameters_.max_corner.z = maxz;
  }
  rclcpp::Clock::SharedPtr getClock()
  {
    return node_->get_clock();
  }
private:
  void initializeConstraintsStorageThread(const std::string& host, unsigned int port)
  {
    // Set up db
    try
    {
      warehouse_ros::DatabaseConnection::Ptr conn = moveit_warehouse::loadDatabase(node_);
      conn->setParams(host, port);
      if (conn->connect())
      {
        constraints_storage_ = std::make_unique<moveit_warehouse::ConstraintsStorage>(conn);
      }
    }
    catch (std::exception& ex)
    {
      RCLCPP_ERROR(logger_, "%s", ex.what());
    }
    initializing_constraints_ = false;
  }
  Options opt_;
  rclcpp::Node::SharedPtr node_;
  rclcpp::Logger logger_;
  rclcpp::CallbackGroup::SharedPtr callback_group_;
  rclcpp::executors::SingleThreadedExecutor callback_executor_;
  std::thread callback_thread_;
  std::shared_ptr<tf2_ros::Buffer> tf_buffer_;


The trajectory of the robot (may not contain joints that are the same as for
the start_state_) ...


[
![../../_images/move_group_interface_tutorial_start_screen.png](../../_images/move_group_interface_tutorial_start_screen.png)
](../../_images/move_group_interface_tutorial_start_screen.png)


moveit_msgs::Constraints
moveit::planning_interface::MoveGroupInterface::getPathConstraints  |  (  |  |
)  |  const
---|---|---|---|---

Get the actual set of constraints in use with this [ MoveGroupInterface
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html "Client class
to conveniently use the ROS interfaces provided by the move_group node. ") .


Definition at line [ 1771 ](move__group__interface_8cpp_source.html#l01771) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


55  #include < [ tf/tf.h ](../../../api/tf/html/c++/tf_8h.html) >


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


[ 73
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html#adeb720f484d065de44084139fcc54401)
[ MoveItErrorCode
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html#adeb720f484d065de44084139fcc54401)
(  const  moveit_msgs::MoveItErrorCodes& code)


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

Place an object at one of the specified possible locations.


226  std::string getDefaultPlannerId(  const  std::string& group =  ""  )
const  ;


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

Get all the joints this instance operates on (including fixed joints)


691  [ actionlib::SimpleActionClient<moveit_msgs::MoveGroupAction>
](../../../api/actionlib/html/classactionlib_1_1SimpleActionClient.html) &
getMoveGroupClient()  const  ;


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


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.


[ planning_interface
](../../../api/moveit_core/html/namespaceplanning__interface.html)


36  /* Author: Ioan Sucan, Sachin Chitta */


24  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS


[ moveit::planning_interface::MoveItErrorCode::operator!=
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html#a8abfea59c8baf37e4a649a09c0483f59)


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.


356  bool  setJointValueTarget(  const  std::map<std::string, double>&
variable_values);


unsigned int moveit::planning_interface::MoveGroupInterface::getVariableCount
|  (  |  |  )  |  const
---|---|---|---|---

Get the number of variables used to describe the state of this group. This is
larger or equal to the number of DOF.


[ ![](../../_static/logo.png) ](http://moveit.ros.org)


&end_effector_link="")
|  Set the goal pose of the end-effector _end_effector_link_ .  More...

bool  |  [ setPoseTarget
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a7751b5fd0a6a2011e1b7f2f5e9338261)
(const [ geometry_msgs::Pose
](../../../api/tf/html/c++/namespacetf.html#af31f272a1879787c24c3decb07cdb361)
&target, const std::string &end_effector_link="")
|  Set the goal pose of the end-effector _end_effector_link_ .  More...

bool  |  [ setPoseTarget
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#abf206356ab21737fa6e045d08509696c)
(const geometry_msgs::PoseStamped &target, const std::string
&end_effector_link="")
|  Set the goal pose of the end-effector _end_effector_link_ .  More...

bool  |  [ setPoseTargets
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#ad15adff583ce62e0a51ea6907e53a903)
(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_ .  More...

bool  |  [ setPoseTargets
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#ac135bf61e119f8ecd3b2e6010b54ebf8)
(const std::vector< [ geometry_msgs::Pose
](../../../api/tf/html/c++/namespacetf.html#af31f272a1879787c24c3decb07cdb361)
> &target, const std::string &end_effector_link="")
|  Set goal poses for _end_effector_link_ .  More...

bool  |  [ setPoseTargets
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a05f560f83c601ed70d74d2269bedafe8)
(const std::vector< geometry_msgs::PoseStamped > &target, const std::string
&end_effector_link="")
|  Set goal poses for _end_effector_link_ .  More...

void  |  [ setPoseReferenceFrame
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#aac4b6f7cb3c3257001ccbd64c6d14f46)
(const std::string &pose_reference_frame)
|  Specify which reference frame to assume for poses specified without a


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


Definition at line [ 1745 ](move__group__interface_8cpp_source.html#l01745) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


bool moveit::planning_interface::MoveGroupInterface::setJointValueTarget  |  (
|  const std::string & |  _joint_name_ ,
---|---|---|---
|  |  double  |  _value_
|  )  |  |

Set the JointValueTarget and use it for future planning requests.


MoveGroupInterfaceImpl * impl_


393  bool  setJointValueTarget(  const  std::string& joint_name,  double
value);


std::vector< std::string > |  [ getKnownConstraints
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a10b304e11e9744061689853b5ee5413a)
() const
|  Get the names of the known constraints as read from the Mongo database, if
a connection was achieved.  More...

moveit_msgs::Constraints  |  [ getPathConstraints
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a2c41c4a1449cc1ed9eb085cbf84c3852)
() const
|  Get the actual set of constraints in use with this [ MoveGroupInterface
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html "Client class
to conveniently use the ROS interfaces provided by the move_group node. ") .
More...

bool  |  [ setPathConstraints
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#ac74ec94967a06f6b1da8ea6e060b7444)
(const std::string &constraint)
|  Specify a set of path constraints to use. The constraints are looked up by
name from the Mongo 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...") .  More...

void  |  [ setPathConstraints
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a92c66e91248f923eb71b2eacf088512b)
(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...") .  More...

void  |  [ clearPathConstraints
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a4530a0e30683a0d1ae47de1424a5a992)
()
|  Specify that no path constraints are to be used. This removes any path
constraints set in previous calls to [ setPathConstraints()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#ac74ec94967a06f6b1da8ea6e060b7444


The representation of a motion plan (as ROS messasges)


[ boost::shared_ptr< tf::Transformer >
](../../../api/roscpp_traits/html/classboost_1_1shared__ptr.html)


[ moveit ](namespacemoveit.html)


741  void  stop();


[ moveit::planning_interface::MoveGroupInterface::Plan::planning_time_
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Plan.html#ab479de7a2494a40891cc7baf51a202a8)


After this call, the JointValueTarget is used **instead** of any previously
set Position, Orientation, or Pose targets.


[ moveit::planning_interface::MoveGroupInterface::getRememberedJointValues
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a7da7361401c0810970a6b69105c5ee01)


"Specify a set of path constraints to use. The constraints are looked up by
name from the Mongo databa...") .  More...

moveit_msgs::TrajectoryConstraints  |  [ getTrajectoryConstraints
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a0dd3fdfefc37bf65454988da7ff8ef20)
() const
void  |  [ setTrajectoryConstraints
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a977cf44d1977f69e5dd95bb3433df79a)
(const moveit_msgs::TrajectoryConstraints &constraint)
void  |  [ clearTrajectoryConstraints
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a73852e166972bcc924c828e6fc8a8f4b)
()

##  Static Public Attributes

---
static const std::string  |  [ ROBOT_DESCRIPTION
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a11613e2bc76eb2b956d7c6eb9357139d)
|  Default ROS parameter name from where to read the robot's URDF. Set to
'robot_description'.  More...

##  Private Attributes

---
[ MoveGroupInterfaceImpl
](classmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1MoveGroupInterfaceImpl.html)
*  |  [ impl_
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a64ddb8064073c6e9ed50b0a448362052)
std::map< std::string, std::vector< double > > |  [ remembered_joint_values_
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a1dbc2672b6abc380e425b06e1d282c88)

##  Detailed Description


Definition at line [ 1482 ](move__group__interface_8cpp_source.html#l01482) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


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


###  Planning with Path Constraints  ¶


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


|  const std::map<std::string, std::vector<double> >&
moveit::planning_interface::MoveGroupInterface::getRememberedJointValues  |  (
|  |  )  |  const
---|---|---|---|---
inline

Get the currently remembered map of names to joint values.


Show text in RViz of status


705  [ MoveItErrorCode
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html) asyncExecute(
const  [ Plan
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Plan.html) &
plan);


###  Planning to a joint-space goal  ¶


     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 [ 1367 ](move__group__interface_8cpp_source.html#l01367) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


Definition at line [ 1634 ](move__group__interface_8cpp_source.html#l01634) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


178  [ MoveGroupInterface
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html) & operator=(
[ MoveGroupInterface
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html) && other);


() const
|  Get the RobotModel object.  More...

unsigned int  |  [ getVariableCount
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a92db8965d5c2a93dfd591ed0fe7cc7d1)
() const
|  Get the number of variables used to describe the state of this group. This
is larger or equal to the number of DOF.  More...

|  [ MoveGroupInterface
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a1402a7eadad1d4529f541f34b6e03128)
(const [ Options
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Options.html)
&opt, 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 [ MoveGroupInterface
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html "Client class
to conveniently use the ROS interfaces provided by the move_group node. ")
instance call using a specified set of options _opt_ .  More...

[ MOVEIT_DEPRECATED
](namespacemoveit_1_1planning__interface.html#a706399608538b81b2936e34817260537)
|  [ MoveGroupInterface
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a97641cb3ef0ec41b73b641b65449d0cb)
(const [ Options
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Options.html)
&opt, const [ boost::shared_ptr
](../../../api/roscpp_traits/html/classboost_1_1shared__ptr.html) < [
tf::Transformer ](../../../api/tf/html/c++/classtf_1_1Transformer.html) > &tf,
const [ ros::Duration ](../../../api/rostime/html/classros_1_1Duration.html)
&wait_for_servers)
|  [ MoveGroupInterface


Remote control is an introspection tool that allows users to step through a
high level script via buttons and keyboard shortcuts in RViz


](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a72dcd81bac96af0cb69aa966eca0eb2f)
(const Eigen::Affine3d &eef_pose, const std::string &end_effector_link="")
|  Set the joint state goal for a particular joint by computing IK.  More...

void  |  [ setRandomTarget
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a9244c9fa2f08747a3bd00c9a040e1cd6)
()
|  Set the joint state goal to a random joint configuration.  More...

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

const robot_state::RobotState & |  [ getJointValueTarget
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a3b3e2106b7506f4e6c8b66ec0b914bc4)
() const
|  Get the currently set joint state goal.  More...

Setting a pose target (goal)

Setting a Pose (or Position or Orientation) target disables any previously set
JointValueTarget.


805  bool  [ attachObject ](demo_8cpp.html#a7b9e3632e33ade1fb91f781cf2a349b8)
(  const  std::string& object  ,  const  std::string& link =  ""  );


![animation showing the arm moving avoiding the new
obstacle](../../_images/move_group_interface_tutorial_avoid_path.gif)


    moveit_msgs::RobotTrajectory trajectory;
    const double jump_threshold = 0.0;
    const double eef_step = 0.01;
    double fraction = move_group_interface.computeCartesianPath(waypoints, eef_step, jump_threshold, trajectory);
    ROS_INFO_NAMED("tutorial", "Visualizing plan 4 (Cartesian path) (%.2f%% achieved)", fraction * 100.0);


moveit::planning_interface::PlanningSceneInterface planning_scene_interface;


    * [ Expected Output ](../planning_scene_ros_api/planning_scene_ros_api_tutorial.html#expected-output)
    * [ The entire code ](../planning_scene_ros_api/planning_scene_ros_api_tutorial.html#the-entire-code)
      * [ Visualization ](../planning_scene_ros_api/planning_scene_ros_api_tutorial.html#visualization)
      * [ ROS API ](../planning_scene_ros_api/planning_scene_ros_api_tutorial.html#ros-api)
      * [ Advertise the required topic ](../planning_scene_ros_api/planning_scene_ros_api_tutorial.html#advertise-the-required-topic)
      * [ Define the attached object message ](../planning_scene_ros_api/planning_scene_ros_api_tutorial.html#define-the-attached-object-message)
      * [ Add an object into the environment ](../planning_scene_ros_api/planning_scene_ros_api_tutorial.html#add-an-object-into-the-environment)
      * [ Interlude: Synchronous vs Asynchronous updates ](../planning_scene_ros_api/planning_scene_ros_api_tutorial.html#interlude-synchronous-vs-asynchronous-updates)
      * [ Attach an object to the robot ](../planning_scene_ros_api/planning_scene_ros_api_tutorial.html#attach-an-object-to-the-robot)
      * [ Detach an object from the robot ](../planning_scene_ros_api/planning_scene_ros_api_tutorial.html#detach-an-object-from-the-robot)
      * [ Remove the object from the collision world ](../planning_scene_ros_api/planning_scene_ros_api_tutorial.html#remove-the-object-from-the-collision-world)
    * [ The launch file ](../planning_scene_ros_api/planning_scene_ros_api_tutorial.html#the-launch-file)
    * [ Debugging the Planning Scene Monitor ](../planning_scene_ros_api/planning_scene_ros_api_tutorial.html#debugging-the-planning-scene-monitor)
  * [ Motion Planning API ](../motion_planning_api/motion_planning_api_tutorial.html)
    * [ Getting Started ](../motion_planning_api/motion_planning_api_tutorial.html#getting-started)
    * [ Running the Demo ](../motion_planning_api/motion_planning_api_tutorial.html#running-the-demo)
    * [ Expected Output ](../motion_planning_api/motion_planning_api_tutorial.html#expected-output)
    * [ The Entire Code ](../motion_planning_api/motion_planning_api_tutorial.html#the-entire-code)
      * [ Start ](../motion_planning_api/motion_planning_api_tutorial.html#start)
      * [ Visualization ](../motion_planning_api/motion_planning_api_tutorial.html#visualization)
      * [ Pose Goal ](../motion_planning_api/motion_planning_api_tutorial.html#pose-goal)
      * [ Visualize the result ](../motion_planning_api/motion_planning_api_tutorial.html#visualize-the-result)
      * [ Joint Space Goals ](../motion_planning_api/motion_planning_api_tutorial.html#joint-space-goals)
      * [ Adding Path Constraints ](../motion_planning_api/motion_planning_api_tutorial.html#adding-path-constraints)
    * [ The Launch File ](../motion_planning_api/motion_planning_api_tutorial.html#the-launch-file)
  * [ Motion Planning Pipeline ](../motion_planning_pipeline/motion_planning_pipeline_tutorial.html)
    * [ Getting Started ](../motion_planning_pipeline/motion_planning_pipeline_tutorial.html#getting-started)
    * [ Running the Code ](../motion_planning_pipeline/motion_planning_pipeline_tutorial.html#running-the-code)
    * [ Expected Output ](../motion_planning_pipeline/motion_planning_pipeline_tutorial.html#expected-output)
    * [ The Entire Code ](../motion_planning_pipeline/motion_planning_pipeline_tutorial.html#the-entire-code)
      * [ Start ](../motion_planning_pipeline/motion_planning_pipeline_tutorial.html#start)
      * [ Visualization ](../motion_planning_pipeline/motion_planning_pipeline_tutorial.html#visualization)
      * [ Pose Goal ](../motion_planning_pipeline/motion_planning_pipeline_tutorial.html#pose-goal)
      * [ Visualize the result ](../motion_planning_pipeline/motion_planning_pipeline_tutorial.html#visualize-the-result)
      * [ Joint Space Goals ](../motion_planning_pipeline/motion_planning_pipeline_tutorial.html#joint-space-goals)
      * [ Using a Planning Request Adapter ](../motion_planning_pipeline/motion_planning_pipeline_tutorial.html#using-a-planning-request-adapter)
    * [ The Launch File ](../motion_planning_pipeline/motion_planning_pipeline_tutorial.html#the-launch-file)
  * [ Creating MoveIt Plugins ](../creating_moveit_plugins/plugin_tutorial.html)
    * [ Motion Planner Plugin ](../creating_moveit_plugins/plugin_tutorial.html#motion-planner-plugin)
      * [ Export the plugin ](../creating_moveit_plugins/plugin_tutorial.html#export-the-plugin)


670  const  std::string& getEndEffector()  const  ;


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

Specify that no path constraints are to be used. This removes 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...") .


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

Pick up an object given possible grasp poses.


**Definition:** [ move_group_interface.h:930
](move__group__interface_8h_source.html#l00930)


###  Detaching and Removing Objects  ¶


Definition at line [ 2005 ](move__group__interface_8cpp_source.html#l02005) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


Definition at line [ 2259 ](move__group__interface_8cpp_source.html#l02259) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


After this call, the JointValueTarget is used **instead** of any previously
set Position, Orientation, or Pose targets.


Definition at line [ 1738 ](move__group__interface_8cpp_source.html#l01738) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


[ 107
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Options.html#acd2d919de7135c86cb0127ec3cd82ee6)
[ Options
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Options.html#acd2d919de7135c86cb0127ec3cd82ee6)
(  const  std::string& group_name,  const  std::string& desc =
ROBOT_DESCRIPTION,


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


48  #include <moveit_msgs/Grasp.h>


197  const  std::vector<std::string>& getJointNames();


    * [ The Entire Code ](../pick_place/pick_place_tutorial.html#the-entire-code)
      * [ Creating Environment ](../pick_place/pick_place_tutorial.html#creating-environment)
      * [ Pick Pipeline ](../pick_place/pick_place_tutorial.html#pick-pipeline)
        * [ Setting grasp pose ](../pick_place/pick_place_tutorial.html#setting-grasp-pose)
        * [ Setting pre-grasp approach ](../pick_place/pick_place_tutorial.html#setting-pre-grasp-approach)
        * [ Setting post-grasp retreat ](../pick_place/pick_place_tutorial.html#setting-post-grasp-retreat)
        * [ Setting posture of eef before grasp ](../pick_place/pick_place_tutorial.html#setting-posture-of-eef-before-grasp)
        * [ Setting posture of eef during grasp ](../pick_place/pick_place_tutorial.html#setting-posture-of-eef-during-grasp)
      * [ Place Pipeline ](../pick_place/pick_place_tutorial.html#place-pipeline)
        * [ Setting place location pose ](../pick_place/pick_place_tutorial.html#setting-place-location-pose)
        * [ Setting pre-place approach ](../pick_place/pick_place_tutorial.html#setting-pre-place-approach)
        * [ Setting post-grasp retreat ](../pick_place/pick_place_tutorial.html#id2)
        * [ Setting posture of eef after placing object ](../pick_place/pick_place_tutorial.html#setting-posture-of-eef-after-placing-object)
  * [ MoveIt Grasps ](../moveit_grasps/moveit_grasps_tutorial.html)
    * [ Getting Started ](../moveit_grasps/moveit_grasps_tutorial.html#getting-started)
    * [ Installing MoveIt Grasps ](../moveit_grasps/moveit_grasps_tutorial.html#installing-moveit-grasps)
      * [ Install From Source ](../moveit_grasps/moveit_grasps_tutorial.html#install-from-source)
      * [ Install From Debian ](../moveit_grasps/moveit_grasps_tutorial.html#install-from-debian)
    * [ Demo Scripts ](../moveit_grasps/moveit_grasps_tutorial.html#demo-scripts)
      * [ 1) The Entire MoveIt Grasps Pipeline ](../moveit_grasps/moveit_grasps_tutorial.html#the-entire-moveit-grasps-pipeline)
      * [ 2) Visualize Gripper Parameters ](../moveit_grasps/moveit_grasps_tutorial.html#visualize-gripper-parameters)
      * [ 3) Visualize Grasp Generation ](../moveit_grasps/moveit_grasps_tutorial.html#visualize-grasp-generation)
      * [ 4) Grasp Filter ](../moveit_grasps/moveit_grasps_tutorial.html#grasp-filter)
      * [ 5) Suction Grasp Pipeline ](../moveit_grasps/moveit_grasps_tutorial.html#suction-grasp-pipeline)
    * [ Conceptual Overview ](../moveit_grasps/moveit_grasps_tutorial.html#conceptual-overview)
      * [ Robot-Agnostic Configuration ](../moveit_grasps/moveit_grasps_tutorial.html#robot-agnostic-configuration)
      * [ Applying Robot-Agnostic Configuration ](../moveit_grasps/moveit_grasps_tutorial.html#applying-robot-agnostic-configuration)
      * [ Additional Configuration Notes ](../moveit_grasps/moveit_grasps_tutorial.html#additional-configuration-notes)
    * [ Tested Robots ](../moveit_grasps/moveit_grasps_tutorial.html#tested-robots)
  * [ MoveIt Task Constructor ](../moveit_task_constructor/moveit_task_constructor_tutorial.html)
    * [ Getting Started ](../moveit_task_constructor/moveit_task_constructor_tutorial.html#getting-started)
    * [ Installing MoveIt Task Constructor ](../moveit_task_constructor/moveit_task_constructor_tutorial.html#installing-moveit-task-constructor)
      * [ Install From Source ](../moveit_task_constructor/moveit_task_constructor_tutorial.html#install-from-source)
    * [ Running the Demo ](../moveit_task_constructor/moveit_task_constructor_tutorial.html#running-the-demo)
    * [ Basic Concepts ](../moveit_task_constructor/moveit_task_constructor_tutorial.html#basic-concepts)
  * [ MoveIt Deep Grasps ](../moveit_deep_grasps/moveit_deep_grasps_tutorial.html)
    * [ Getting Started ](../moveit_deep_grasps/moveit_deep_grasps_tutorial.html#getting-started)
    * [ Conceptual Overview ](../moveit_deep_grasps/moveit_deep_grasps_tutorial.html#conceptual-overview)
    * [ Grasp Pose Detection ](../moveit_deep_grasps/moveit_deep_grasps_tutorial.html#grasp-pose-detection)
    * [ Dex-Net ](../moveit_deep_grasps/moveit_deep_grasps_tutorial.html#id2)


moveit::planning_interface::MoveGroupInterface::Plan Struct Reference


The robot description parameter name (if different from default)


Client class to conveniently use the ROS interfaces provided by the [
move_group
](../../../api/moveit_ros_manipulation/html/namespacemove__group.html) node.


desc


5  * Copyright (c) 2012, Willow Garage, Inc.


61  {


852  std::vector<double> getCurrentRPY(  const  std::string& end_effector_link
=  ""  );


We define the frame/pose for this cylinder so that it appears in the gripper


21  *


491  bool  setNamedTarget(  const  std::string& name);


13  * notice, this list of conditions and the following disclaimer.


* [ References ](../mesh_filter/mesh_filter_tutorial.html#references)


100  public  :


**Definition:** [ move_group_interface.h:128
](move__group__interface_8h_source.html#l00128)


Definition at line [ 1487 ](move__group__interface_8cpp_source.html#l01487) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


Definition at line [ 2179 ](move__group__interface_8cpp_source.html#l02179) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


geometry_msgs::PoseStamped
moveit::planning_interface::MoveGroupInterface::getCurrentPose  |  (  |  const
std::string & |  _end_effector_link_ = ` "" ` |  )  |
---|---|---|---|---|---

Get the pose 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.


](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#adba657c6f0ac9fc72bbb220698371234)
(const std::string &object, const std::vector< geometry_msgs::PoseStamped >
&poses, bool plan_only=false)
|  Place an object at one of the specified possible locations.  More...

[ MoveItErrorCode
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html) |  [ place
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a8daaa39330a3f65aa794dbd89c29dfb2)
(const std::string &object, const geometry_msgs::PoseStamped &pose, bool
plan_only=false)
|  Place an object at one of the specified possible location.  More...

bool  |  [ attachObject
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a459f644ad3c7b8a07a3d0c2bd454b844)
(const std::string &object, const std::string &link="")
|  Given the name of an object in the planning scene, make the object attached
to a link of the robot. If no link name is specified, the end-effector is
used. If there is no end-effector, the first link in the group is used. If the
object name does not exist an error will be produced in [ move_group
](../../../api/moveit_ros_manipulation/html/namespacemove__group.html) , but
the request made by this interface will succeed.  More...

bool  |  [ attachObject
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#aa37519f35cbed12eaa398d6391872898)
(const std::string &object, const std::string &link, const std::vector<
std::string > &touch_links)
|  Given the name of an object in the planning scene, make the object attached
to a link of the robot. The set of links the object is allowed to touch
without considering that a collision is specified by _touch_links_ . If _link_
is empty, the end-effector link is used. If there is no end-effector, the
first link in the group is used. If the object name does not exist an error
will be produced in [ move_group
](../../../api/moveit_ros_manipulation/html/namespacemove__group.html) , but
the request made by this interface will succeed.  More...

bool  |  [ detachObject
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#aa99896b1fcca049803ec4015d6dd8f03)
(const std::string &name="")
|  Detach an object. _name_ specifies the name of the object attached to this
group, or the name of the link the object is attached to. If there is no name


  //    goal.planning_options.planning_scene_diff.is_diff = true;
  //    goal.planning_options.planning_scene_diff.robot_state.is_diff = true;
  //    return goal;
  //  }
  void setPathConstraints(const moveit_msgs::msg::Constraints& constraint)
  {
    path_constraints_ = std::make_unique<moveit_msgs::msg::Constraints>(constraint);
  }
  bool setPathConstraints(const std::string& constraint)
  {
    if (constraints_storage_)
    {
      moveit_warehouse::ConstraintsWithMetadata msg_m;
      if (constraints_storage_->getConstraints(msg_m, constraint, robot_model_->getName(), opt_.group_name))
      {
        path_constraints_ =
            std::make_unique<moveit_msgs::msg::Constraints>(static_cast<moveit_msgs::msg::Constraints>(*msg_m));
        return true;
      }
      else
        return false;
    }
    else
      return false;
  }
  void clearPathConstraints()
  {
    path_constraints_.reset();
  }
  void setTrajectoryConstraints(const moveit_msgs::msg::TrajectoryConstraints& constraint)
  {
    trajectory_constraints_ = std::make_unique<moveit_msgs::msg::TrajectoryConstraints>(constraint);
  }
  void clearTrajectoryConstraints()
  {
    trajectory_constraints_.reset();
  }
  std::vector<std::string> getKnownConstraints() const
  {
    while (initializing_constraints_)


185  const  std::vector<std::string> getNamedTargets();


After this call, the JointValueTarget is used **instead** of any previously
set Position, Orientation, or Pose targets.


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


    std::vector<geometry_msgs::Pose> waypoints;
    waypoints.push_back(start_pose2);

    geometry_msgs::Pose target_pose3 = start_pose2;

    target_pose3.position.z -= 0.2;
    waypoints.push_back(target_pose3);  // down

    target_pose3.position.y -= 0.2;
    waypoints.push_back(target_pose3);  // right

    target_pose3.position.z += 0.2;
    target_pose3.position.y += 0.2;
    target_pose3.position.x -= 0.2;
    waypoints.push_back(target_pose3);  // up and left


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


884  return  remembered_joint_values_;


If IK fails to find a solution then an approximation is used.


    visual_tools.publishText(text_pose, "Add object", rvt::WHITE, rvt::XLARGE);
    visual_tools.trigger();
    visual_tools.prompt("Press 'next' in the RvizVisualToolsGui window to once the collision object appears in RViz");


![Inheritance
graph](classmoveit_1_1planning__interface_1_1MoveGroupInterface__inherit__graph.png)


The result may look like this:


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.


63  {


[ moveit::planning_interface::MoveGroupInterface::Plan::trajectory_
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Plan.html#af974e387daa3c09c4e19f29657a2b7cb)


[ MoveItErrorCode
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html) |  [ asyncMove
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#ac6a5bd3175b0a702050148d96955b5e8)
()
|  [ Plan
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Plan.html "The
representation of a motion plan \(as ROS messasges\) ") and execute a
trajectory that takes the group of joints declared in the constructor to the
specified target. This call is not blocking (does not wait for the execution
of the trajectory to complete).  More...

[ actionlib::SimpleActionClient
](../../../api/actionlib/html/classactionlib_1_1SimpleActionClient.html) <
moveit_msgs::MoveGroupAction > & |  [ getMoveGroupClient
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a6ceac66242f835415855595d41354139)
() const
|  Get the [ move_group
](../../../api/moveit_ros_manipulation/html/namespacemove__group.html) action
client used by the _[ MoveGroupInterface
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html "Client class
to conveniently use the ROS interfaces provided by the move_group node. ") _ .
The client can be used for querying the execution state of the trajectory and
abort trajectory execution during asynchronous execution.  More...

[ MoveItErrorCode
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html) |  [ move
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a3513c41b0c73400fc6713b25bc6b1637)
()
|  [ Plan
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Plan.html "The
representation of a motion plan \(as ROS messasges\) ") and execute a
trajectory that takes the group of joints declared in the constructor to the
specified target. This call is always blocking (waits for the execution of the
trajectory to complete) and requires an asynchronous spinner to be started.
More...

[ MoveItErrorCode
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html) |  [ plan
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#ad72e3d9367374e388546c8e81f26035a)
( [ Plan


276  void  setGoalTolerance(  double  tolerance);


Definition at line [ 2030 ](move__group__interface_8cpp_source.html#l02030) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


void moveit::planning_interface::MoveGroupInterface::setTrajectoryConstraints
|  (  |  const moveit_msgs::TrajectoryConstraints & |  _constraint_ |  )  |
---|---|---|---|---|---

Definition at line [ 2230 ](move__group__interface_8cpp_source.html#l02230) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


ROSCPP_DECL bool execute(const std::string &method, const XmlRpc::XmlRpcValue
&request, XmlRpc::XmlRpcValue &response, XmlRpc::XmlRpcValue &payload, bool
wait_for_master)


Definition at line [ 1809 ](move__group__interface_8cpp_source.html#l01809) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


[ [ legend ](graph_legend.html) ]


Now let’s define a collision object ROS message for the robot to avoid.


367  bool  setJointValueTarget(  const  robot_state::RobotState& robot_state);


Definition at line [ 1616 ](move__group__interface_8cpp_source.html#l01616) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


60  namespace  [ planning_interface
](../../../api/moveit_core/html/namespaceplanning__interface.html)


static const std::string PLANNING_GROUP = "panda_arm";


    * [ Running the Demos ](../moveit_deep_grasps/moveit_deep_grasps_tutorial.html#running-the-demos)
      * [ Fake Controllers ](../moveit_deep_grasps/moveit_deep_grasps_tutorial.html#fake-controllers)
      * [ Gazebo ](../moveit_deep_grasps/moveit_deep_grasps_tutorial.html#gazebo)
  * [ Subframes ](../subframes/subframes_tutorial.html)
    * [ Running The Demo ](../subframes/subframes_tutorial.html#running-the-demo)
    * [ The Code ](../subframes/subframes_tutorial.html#the-code)
      * [ Defining two CollisionObjects with subframes ](../subframes/subframes_tutorial.html#defining-two-collisionobjects-with-subframes)
      * [ Creating the planning request ](../subframes/subframes_tutorial.html#creating-the-planning-request)
      * [ Preparing the scene ](../subframes/subframes_tutorial.html#preparing-the-scene)
      * [ Interactively testing the robot ](../subframes/subframes_tutorial.html#interactively-testing-the-robot)
      * [ Setting the orientation ](../subframes/subframes_tutorial.html#setting-the-orientation)
    * [ Technical notes ](../subframes/subframes_tutorial.html#technical-notes)
    * [ Visualizing subframes ](../subframes/subframes_tutorial.html#visualizing-subframes)
    * [ Troubleshooting ](../subframes/subframes_tutorial.html#troubleshooting)
  * [ MoveItCpp Tutorial ](../moveit_cpp/moveitcpp_tutorial.html)
    * [ Introduction ](../moveit_cpp/moveitcpp_tutorial.html#introduction)
    * [ Getting Started ](../moveit_cpp/moveitcpp_tutorial.html#getting-started)
    * [ Running the Code ](../moveit_cpp/moveitcpp_tutorial.html#running-the-code)
    * [ The Entire Code ](../moveit_cpp/moveitcpp_tutorial.html#the-entire-code)
      * [ Setup ](../moveit_cpp/moveitcpp_tutorial.html#setup)
      * [ Visualization ](../moveit_cpp/moveitcpp_tutorial.html#visualization)
      * [ Start the demo ](../moveit_cpp/moveitcpp_tutorial.html#start-the-demo)
      * [ Planning with MoveItCpp ](../moveit_cpp/moveitcpp_tutorial.html#planning-with-moveitcpp)
      * [ Plan #1 ](../moveit_cpp/moveitcpp_tutorial.html#plan-1)
      * [ Plan #2 ](../moveit_cpp/moveitcpp_tutorial.html#plan-2)
      * [ Plan #3 ](../moveit_cpp/moveitcpp_tutorial.html#plan-3)
      * [ Plan #4 ](../moveit_cpp/moveitcpp_tutorial.html#plan-4)
    * [ The Launch File ](../moveit_cpp/moveitcpp_tutorial.html#the-launch-file)
  * [ Using Bullet for Collision Checking ](../bullet_collision_checker/bullet_collision_checker.html)
    * [ Getting Started ](../bullet_collision_checker/bullet_collision_checker.html#getting-started)
    * [ Running the Code ](../bullet_collision_checker/bullet_collision_checker.html#running-the-code)
      * [ Continuous Collision Detection ](../bullet_collision_checker/bullet_collision_checker.html#continuous-collision-detection)
    * [ Relevant Code ](../bullet_collision_checker/bullet_collision_checker.html#relevant-code)
      * [ Changing the collision detector to Bullet ](../bullet_collision_checker/bullet_collision_checker.html#changing-the-collision-detector-to-bullet)
      * [ Continuous Collision Detection ](../bullet_collision_checker/bullet_collision_checker.html#id3)
    * [ Launch file ](../bullet_collision_checker/bullet_collision_checker.html#launch-file)
  * [ Mesh Filter with UR5 and Kinect ](../mesh_filter/mesh_filter_tutorial.html)
    * [ Getting Started ](../mesh_filter/mesh_filter_tutorial.html#getting-started)
    * [ Running the Demo ](../mesh_filter/mesh_filter_tutorial.html#running-the-demo)
    * [ How to add sensor to arm in simulation ](../mesh_filter/mesh_filter_tutorial.html#how-to-add-sensor-to-arm-in-simulation)


855  std::vector<double> getRandomJointValues();


339  bool  setJointValueTarget(  const  std::vector<double>&
group_variable_values);


const geometry_msgs::PoseStamped &
moveit::planning_interface::MoveGroupInterface::getPoseTarget  |  (  |  const
std::string & |  _end_effector_link_ = ` "" ` |  )  |  const
---|---|---|---|---|---

Get the currently set pose goal 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. If multiple targets
are set for _end_effector_link_ this will return the first one. If no pose
target is set for this _end_effector_link_ then an empty pose will be returned
(check for orientation.xyzw == 0).


203  std::map<std::string, double> getNamedTargetValues(  const  std::string&
name);


Definition at line [ 1757 ](move__group__interface_8cpp_source.html#l01757) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


526  bool  setRPYTarget(  double  roll,  double  pitch,  double  yaw,  const
std::string& end_effector_link =  ""  );


The result may look something like this:


void moveit::planning_interface::MoveGroupInterface::setPlanningTime  |  (  |
double  |  _seconds_ |  )  |
---|---|---|---|---|---

Specify the maximum amount of time to use when planning.


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

Get the names of the named robot states available as targets, both either
remembered states or default states from srdf.


76  }


First let’s plan to another simple goal with no objects in the way.


26  * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,


200  const  std::vector<std::string>& getLinkNames();


static const std::string ROBOT_DESCRIPTION


246  void  setMaxVelocityScalingFactor(  double  max_velocity_scaling_factor);


Definition at line [ 1751 ](move__group__interface_8cpp_source.html#l01751) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


Definition at line [ 2157 ](move__group__interface_8cpp_source.html#l02157) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


84  }


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

Pick up an object.


moveit::planning_interface::MoveGroupInterface::MoveGroupInterface  |  (  |
const [ Options
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Options.html) &
|  _opt_ ,
---|---|---|---
|  |  const [ boost::shared_ptr
](../../../api/roscpp_traits/html/classboost_1_1shared__ptr.html) < [
tf::Transformer ](../../../api/tf/html/c++/classtf_1_1Transformer.html) > & |
_tf_ ,
|  |  const [ ros::Duration
](../../../api/rostime/html/classros_1_1Duration.html) & |  _wait_for_servers_
|  )  |  |

Definition at line [ 1390 ](move__group__interface_8cpp_source.html#l01390) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


    moveit::planning_interface::MoveGroupInterface::Plan my_plan;

    bool success = (move_group_interface.plan(my_plan) == moveit::core::MoveItErrorCode::SUCCESS);

    ROS_INFO_NAMED("tutorial", "Visualizing plan 1 (pose goal) %s", success ? "" : "FAILED");


702  [ MoveItErrorCode
](classmoveit_1_1planning__interface_1_1MoveItErrorCode.html) plan( [ Plan
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Plan.html) &
plan);


663  const  std::string& getEndEffectorLink()  const  ;


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

Get the current end-effector link. This returns the value set 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...") (or indirectly 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...") ). If [ 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...") was not called, this function reports the link
name that serves as parent of an end-effector attached to this group. If there
are multiple end-effectors, one of them is returned. If no such link is known,
the empty string is returned.


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.  More...

double  |  [ computeCartesianPath
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#ac33e8c239dead1e1ffb3cfb7e629a626)
(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)
, 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.  More...

void  |  [ stop
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a16ad2dbf427bddba1c9c4ba20e0a2f05)
()
|  Stop any trajectory execution, if one is active.  More...


**Definition:** [ move_group_interface.h:105
](move__group__interface_8h_source.html#l00105)


Definition at line [ 1492 ](move__group__interface_8cpp_source.html#l01492) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


31  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN


The result may look like this:


[ movegroup_interface.group
](namespacemovegroup__interface.html#abd91430536f622d99cd24987c32c6d55)


[ getName
](../../../api/rosconsole/html/namespaceros_1_1console_1_1impl.html#a99d74e1500c0ebb7f3f3fb98ae77037f)


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


Classes  |  Public Member Functions  |  Static Public Attributes  |  Private
Attributes  | [ List of all members
](classmoveit_1_1planning__interface_1_1MoveGroupInterface-members.html)


87  return  val != c;


Next get the current set of joint values for the group.


38  #ifndef MOVEIT_MOVE_GROUP_INTERFACE_MOVE_GROUP_INTERFACE_


  remembered_joint_values_[name] = values;
}
void MoveGroupInterface::forgetJointValues(const std::string& name)
{
  remembered_joint_values_.erase(name);
}
void MoveGroupInterface::allowLooking(bool flag)
{
  impl_->can_look_ = flag;
  RCLCPP_DEBUG(logger_, "Looking around: %s", flag ? "yes" : "no");
}
void MoveGroupInterface::setLookAroundAttempts(int32_t attempts)
{
  if (attempts < 0)
  {
    RCLCPP_ERROR(logger_, "Tried to set negative number of look-around attempts");
  }
  else
  {
    RCLCPP_DEBUG_STREAM(logger_, "Look around attempts: " << attempts);
    impl_->look_around_attempts_ = attempts;
  }
}
void MoveGroupInterface::allowReplanning(bool flag)
{
  impl_->can_replan_ = flag;
  RCLCPP_DEBUG(logger_, "Replanning: %s", flag ? "yes" : "no");
}
void MoveGroupInterface::setReplanAttempts(int32_t attempts)
{
  if (attempts < 0)
  {
    RCLCPP_ERROR(logger_, "Tried to set negative number of replan attempts");
  }
  else
  {
    RCLCPP_DEBUG_STREAM(logger_, "Replan Attempts: " << attempts);
    impl_->replan_attempts_ = attempts;
  }
}


Definition at line [ 2274 ](move__group__interface_8cpp_source.html#l02274) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


moveit::core::RobotStatePtr current_state = move_group_interface.getCurrentState();


_group_variable_values_ MUST contain exactly one value per joint variable in
the same order as returned by [ getJointValueTarget()
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a3b3e2106b7506f4e6c8b66ec0b914bc4
"Get the currently set joint state goal. ")
.getJointModelGroup(getName())->getVariableNames().


Cartesian motions should often be slow, e.g. when approaching objects. The
speed of cartesian plans cannot currently be set through the
maxVelocityScalingFactor, but requires you to time the trajectory manually, as
described [ here ](https://groups.google.com/forum/#!topic/moveit-
users/MOoFxy2exT4) . Pull requests are welcome.


#  Move Group C++ Interface  ¶


[ A ](../../../api/moveit_experimental/html/classA.html) copy of the current path constraints set for this interface


296  void  setStartState(  const  moveit_msgs::RobotState& start_state);


4  * Copyright (c) 2014, SRI International


moveit::planning_interface::MoveGroupInterface::MoveGroupInterface  |  (  |
const [ Options
](structmoveit_1_1planning__interface_1_1MoveGroupInterface_1_1Options.html) &
|  _opt_ ,
---|---|---|---
|  |  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 [ MoveGroupInterface
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html "Client class
to conveniently use the ROS interfaces provided by the move_group node. ")
instance call using a specified set of options _opt_ .


[ 102
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a11613e2bc76eb2b956d7c6eb9357139d)
static  const  std::string [ ROBOT_DESCRIPTION
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a11613e2bc76eb2b956d7c6eb9357139d)
;


Definition at line [ 1452 ](move__group__interface_8cpp_source.html#l01452) of
file [ move_group_interface.cpp ](move__group__interface_8cpp_source.html) .


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


    object_to_attach.header.frame_id = move_group_interface.getEndEffectorLink();
    geometry_msgs::Pose grab_pose;
    grab_pose.orientation.w = 1.0;
    grab_pose.position.z = 0.2;


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

double  |  [ getGoalPositionTolerance
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a4eb3a6c9c374de2fe71d2f5a8bc7629d)
() 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.  More...

bool  |  [ getInterfaceDescription
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a070f0d4500decb3a557814ce5a952dd8)
(moveit_msgs::PlannerInterfaceDescription & [ desc
](../../../api/moveit_kinematics/html/namespacecreate__ikfast__moveit__plugin.html#acea37eb824dcaa53b6a91f548ee1b5f7)
)
|  Get the description of the planning plugin loaded by the action server.
More...

const std::vector< std::string > & |  [ getJointNames
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a899ffaae0d4fd36295bea6d72c122562)
()
|  Get vector of names of joints available in move group.  More...

const std::vector< std::string > & |  [ getJoints
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#ad70dc7e2c5554d63d66fb9ccf1bfa36c)
() const
|  Get all the joints this instance operates on (including fixed joints)
More...

const std::vector< std::string > & |  [ getLinkNames
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a692a257f9c0a7863e8c38adfa80cca58)
()
|  Get vector of names of links available in move group.  More...

const std::string & |  [ getName
](classmoveit_1_1planning__interface_1_1MoveGroupInterface.html#a42fb1ebcff890806dd5c1f82e2a18055)
() const
|  Get the name of the group this instance operates on.  More...

const std::vector< std::string > |  [ getNamedTargets


{
  rememberJointValues(name, getCurrentJointValues());
}
bool MoveGroupInterface::startStateMonitor(double wait)
{
  return impl_->startStateMonitor(wait);
}
std::vector<double> MoveGroupInterface::getCurrentJointValues() const
{
  moveit::core::RobotStatePtr current_state;
  std::vector<double> values;
  if (impl_->getCurrentState(current_state))
    current_state->copyJointGroupPositions(getName(), values);
  return values;
}
std::vector<double> MoveGroupInterface::getRandomJointValues() const
{
  std::vector<double> r;
  impl_->getJointModelGroup()->getVariableRandomPositions(impl_->getTargetRobotState().getRandomNumberGenerator(), r);
  return r;
}
geometry_msgs::msg::PoseStamped MoveGroupInterface::getRandomPose(const std::string& end_effector_link) const
{
  const std::string& eef = end_effector_link.empty() ? getEndEffectorLink() : end_effector_link;
  Eigen::Isometry3d pose;
  pose.setIdentity();
  if (eef.empty())
  {
    RCLCPP_ERROR(logger_, "No end-effector specified");
  }
  else
  {
    moveit::core::RobotStatePtr current_state;
    if (impl_->getCurrentState(current_state))
    {
      current_state->setToRandomPositions(impl_->getJointModelGroup());
      const moveit::core::LinkModel* lm = current_state->getLinkModel(eef);
      if (lm)
        pose = current_state->getGlobalLinkTransform(lm);
    }


42  #include < [ moveit/macros/deprecation.h
](../../../api/moveit_core/html/deprecation_8h.html) >


bool moveit::planning_interface::MoveGroupInterface::attachObject  |  (  |
const std::string & |  _object_ ,
---|---|---|---
|  |  const std::string & |  _link_ ,
|  |  const std::vector< std::string > & |  _touch_links_
|  )  |  |

Given the name of an object in the planning scene, make the object attached to
a link of the robot. The set of links the object is allowed to touch without
considering that a collision is specified by _touch_links_ . If _link_ is
empty, the end-effector link is used. If there is no end-effector, the first
link in the group is used. If the object name does not exist an error will be
produced in [ move_group
](../../../api/moveit_ros_manipulation/html/namespacemove__group.html) , but
the request made by this interface will succeed.