Classes | Public Member Functions | Static Public Attributes | Private Attributes
moveit::planning_interface::MoveGroup Class Reference

Client class for the MoveGroup action. This class includes many default settings to make things easy to use. More...

#include <move_group.h>

List of all members.

Classes

class  MoveGroupImpl
struct  Options
 Specification of options to use when constructing the MoveGroup client class. More...
struct  Plan
 The representation of a motion plan (as ROS messasges) More...

Public Member Functions

const std::vector< std::string > & getActiveJoints () const
 Get only the active (actuated) joints this instance operates on.
double getGoalJointTolerance () const
 Get the tolerance that is used for reaching a joint goal. This is distance for each joint in configuration space.
double getGoalOrientationTolerance () const
 Get the tolerance that is used for reaching an orientation goal. This is the tolerance for roll, pitch and yaw, in radians.
double getGoalPositionTolerance () const
 Get the tolerance that is used for reaching a position goal. This is be the radius of a sphere where the end-effector must reach.
bool getInterfaceDescription (moveit_msgs::PlannerInterfaceDescription &desc)
 Get the description of the planning plugin loaded by the action server.
const std::vector< std::string > & getJoints () const
 Get all the joints this instance operates on (including fixed joints)
const std::string & getName () const
 Get the name of the group this instance operates on.
const std::string & getPlanningFrame () const
 Get the name of the frame in which the robot is planning.
double getPlanningTime () const
 Get the number of seconds set by setPlanningTime()
unsigned int 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.
 MoveGroup (const Options &opt, const boost::shared_ptr< tf::Transformer > &tf=boost::shared_ptr< tf::Transformer >(), const ros::Duration &wait_for_server=ros::Duration(0, 0))
 Construct a client for the MoveGroup action using a specified set of options opt. Optionally, specify a TF instance to use. If not specified, one will be constructed internally. A timeout for connecting to the action server can also be specified. If it is not specified, the wait time is unlimited.
 MoveGroup (const std::string &group, const boost::shared_ptr< tf::Transformer > &tf=boost::shared_ptr< tf::Transformer >(), const ros::Duration &wait_for_server=ros::Duration(0, 0))
 Construct a client for the MoveGroup action for a particular group. Optionally, specify a TF instance to use. If not specified, one will be constructed internally. A timeout for connecting to the action server can also be specified. If it is not specified, the wait time is unlimited.
void setGoalJointTolerance (double tolerance)
 Set the joint tolerance (for each joint) that is used for reaching the goal when moving to a joint value target.
void setGoalOrientationTolerance (double tolerance)
 Set the orientation tolerance that is used for reaching the goal when moving to a pose.
void setGoalPositionTolerance (double tolerance)
 Set the position tolerance that is used for reaching the goal when moving to a pose.
void setGoalTolerance (double tolerance)
 Set the tolerance that is used for reaching the goal. For joint state goals, this will be distance for each joint, in the configuration space (radians or meters depending on joint type). For pose goals this will be the radius of a sphere where the end-effector must reach. This function simply triggers calls to setGoalPositionTolerance(), setGoalOrientationTolerance() and setGoalJointTolerance().
void setNumPlanningAttempts (unsigned int num_planning_attempts)
 Set the number of times the motion plan is to be computed from scratch before the shortest solution is returned. The default value is 1.
void setPlannerId (const std::string &planner_id)
 Specify a planner to be used for further planning.
void setPlanningTime (double seconds)
 Specify the maximum amount of time to use when planning.
void setStartState (const moveit_msgs::RobotState &start_state)
 If a different start state should be considered instead of the current state of the robot, this function sets that state.
void setStartState (const robot_state::RobotState &start_state)
 If a different start state should be considered instead of the current state of the robot, this function sets that state.
void setStartStateToCurrentState ()
 Set the starting state for planning to be that reported by the robot's joint state publication.
void setSupportSurfaceName (const std::string &name)
 For pick/place operations, the name of the support surface is used to specify the fact that attached objects are allowed to touch the support surface.
void setWorkspace (double minx, double miny, double minz, double maxx, double maxy, double maxz)
 Specify the workspace bounding box. The box is specified in the planning frame (i.e. relative to the robot root link start position). This is useful when the MoveGroup's group contains the root joint of the robot -- i.e. when planning motion for the robot relative to the world.
 ~MoveGroup ()
Setting a joint state target (goal)

There are 2 types of goal targets:

  • 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)).

Only one or the other is used for planning. Calling any of the set*JointValueTarget() functions sets the current goal target to the JointValueTarget. Calling any of the setPoseTarget(), setOrientationTarget(), setRPYTarget(), setPositionTarget() functions sets the current goal target to the Pose target.

bool setJointValueTarget (const std::vector< double > &group_variable_values)
 Set the JointValueTarget and use it for future planning requests.
bool setJointValueTarget (const std::map< std::string, double > &variable_values)
 Set the JointValueTarget and use it for future planning requests.
bool setJointValueTarget (const robot_state::RobotState &robot_state)
 Set the JointValueTarget and use it for future planning requests.
bool setJointValueTarget (const std::string &joint_name, const std::vector< double > &values)
 Set the JointValueTarget and use it for future planning requests.
bool setJointValueTarget (const std::string &joint_name, double value)
 Set the JointValueTarget and use it for future planning requests.
bool setJointValueTarget (const sensor_msgs::JointState &state)
 Set the JointValueTarget and use it for future planning requests.
bool setJointValueTarget (const geometry_msgs::Pose &eef_pose, const std::string &end_effector_link="")
 Set the joint state goal for a particular joint by computing IK.
bool setJointValueTarget (const geometry_msgs::PoseStamped &eef_pose, const std::string &end_effector_link="")
 Set the joint state goal for a particular joint by computing IK.
bool setJointValueTarget (const Eigen::Affine3d &eef_pose, const std::string &end_effector_link="")
 Set the joint state goal for a particular joint by computing IK.
bool setApproximateJointValueTarget (const geometry_msgs::Pose &eef_pose, const std::string &end_effector_link="")
 Set the joint state goal for a particular joint by computing IK.
bool setApproximateJointValueTarget (const geometry_msgs::PoseStamped &eef_pose, const std::string &end_effector_link="")
 Set the joint state goal for a particular joint by computing IK.
bool setApproximateJointValueTarget (const Eigen::Affine3d &eef_pose, const std::string &end_effector_link="")
 Set the joint state goal for a particular joint by computing IK.
void setRandomTarget ()
 Set the joint state goal to a random joint configuration.
bool setNamedTarget (const std::string &name)
 Set the current joint values to be ones previously remembered by rememberJointValues() or, if not found, that are specified in the SRDF under the name name as a group state.
const robot_state::RobotState & getJointValueTarget () const
 Get the currently set joint state goal.
Setting a pose target (goal)

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

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

bool setPositionTarget (double x, double y, double z, const std::string &end_effector_link="")
 Set the goal position of the end-effector end_effector_link to be (x, y, z).
bool setRPYTarget (double roll, double pitch, double yaw, const std::string &end_effector_link="")
 Set the goal orientation of the end-effector end_effector_link to be (roll,pitch,yaw) radians.
bool setOrientationTarget (double x, double y, double z, double w, const std::string &end_effector_link="")
 Set the goal orientation of the end-effector end_effector_link to be the quaternion (x,y,z,w).
bool setPoseTarget (const Eigen::Affine3d &end_effector_pose, const std::string &end_effector_link="")
 Set the goal pose of the end-effector end_effector_link.
bool setPoseTarget (const geometry_msgs::Pose &target, const std::string &end_effector_link="")
 Set the goal pose of the end-effector end_effector_link.
bool setPoseTarget (const geometry_msgs::PoseStamped &target, const std::string &end_effector_link="")
 Set the goal pose of the end-effector end_effector_link.
bool setPoseTargets (const EigenSTL::vector_Affine3d &end_effector_pose, const std::string &end_effector_link="")
 Set goal poses for end_effector_link.
bool setPoseTargets (const std::vector< geometry_msgs::Pose > &target, const std::string &end_effector_link="")
 Set goal poses for end_effector_link.
bool setPoseTargets (const std::vector< geometry_msgs::PoseStamped > &target, const std::string &end_effector_link="")
 Set goal poses for end_effector_link.
void setPoseReferenceFrame (const std::string &pose_reference_frame)
 Specify which reference frame to assume for poses specified without a reference frame.
bool setEndEffectorLink (const std::string &end_effector_link)
 Specify the parent link of the end-effector. This end_effector_link will be used in calls to pose target functions when end_effector_link is not explicitly specified.
bool setEndEffector (const std::string &eef_name)
 Specify the name of the end-effector to use. This is equivalent to setting the EndEffectorLink to the parent link of this end effector.
void clearPoseTarget (const std::string &end_effector_link="")
 Forget pose(s) specified for end_effector_link.
void clearPoseTargets ()
 Forget any poses specified for all end-effectors.
const geometry_msgs::PoseStamped & getPoseTarget (const std::string &end_effector_link="") const
const std::vector
< geometry_msgs::PoseStamped > & 
getPoseTargets (const std::string &end_effector_link="") const
const std::string & getEndEffectorLink () const
 Get the current end-effector link. This returns the value set by setEndEffectorLink() (or indirectly by setEndEffector()). If setEndEffectorLink() 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.
const std::string & getEndEffector () const
 Get the current end-effector name. This returns the value set by setEndEffector() (or indirectly by setEndEffectorLink()). If setEndEffector() was not called, this function reports an end-effector attached to this group. If there are multiple end-effectors, one of them is returned. If no end-effector is known, the empty string is returned.
const std::string & getPoseReferenceFrame () const
 Get the reference frame set by setPoseReferenceFrame(). By default this is the reference frame of the robot model.
Planning a path from the start position to the Target (goal) position, and executing that plan.
MoveItErrorCode asyncMove ()
 Plan 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).
MoveItErrorCode move ()
 Plan 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).
MoveItErrorCode plan (Plan &plan)
 Compute a motion plan that takes the group declared in the constructor from the current state to the specified target. No execution is performed. The resulting plan is stored in plan.
MoveItErrorCode asyncExecute (const Plan &plan)
 Given a plan, execute it without waiting for completion. Return true on success.
MoveItErrorCode execute (const Plan &plan)
 Given a plan, execute it while waiting for completion. Return true on success.
double computeCartesianPath (const std::vector< geometry_msgs::Pose > &waypoints, double eef_step, double jump_threshold, moveit_msgs::RobotTrajectory &trajectory, bool avoid_collisions=true, moveit_msgs::MoveItErrorCodes *error_code=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(). 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.
void stop ()
 Stop any trajectory execution, if one is active.
void allowLooking (bool flag)
 Specify whether the robot is allowed to look around before moving if it determines it should (default is true)
void allowReplanning (bool flag)
 Specify whether the robot is allowed to replan if it detects changes in the environment.
High level actions that trigger a sequence of plans and actions.
MoveItErrorCode pick (const std::string &object)
 Pick up an object.
MoveItErrorCode pick (const std::string &object, const moveit_msgs::Grasp &grasp)
 Pick up an object given a grasp pose.
MoveItErrorCode pick (const std::string &object, const std::vector< moveit_msgs::Grasp > &grasps)
 Pick up an object given possible grasp poses.
MoveItErrorCode place (const std::string &object)
 Place an object somewhere safe in the world (a safe location will be detected)
MoveItErrorCode place (const std::string &object, const std::vector< moveit_msgs::PlaceLocation > &locations)
 Place an object at one of the specified possible locations.
MoveItErrorCode place (const std::string &object, const std::vector< geometry_msgs::PoseStamped > &poses)
 Place an object at one of the specified possible locations.
MoveItErrorCode place (const std::string &object, const geometry_msgs::PoseStamped &pose)
 Place an object at one of the specified possible location.
bool attachObject (const std::string &object, const std::string &link="")
 Given the name of an object in the planning scene, make the object attached to a link of the robot. 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, but the request made by this interface will succeed.
bool 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, but the request made by this interface will succeed.
bool detachObject (const std::string &name="")
 Detach an object. name specifies the name of the object attached to this group, or the name of the link the object is attached to. If there is no name specified, and there is only one attached object, that object is detached. An error is produced if no object to detach is identified.
Query current robot state
bool startStateMonitor (double wait=1.0)
 When reasoning about the current state of a robot, a CurrentStateMonitor instance is automatically constructed. This function allows triggering the construction of that object from the beginning, so that future calls to functions such as getCurrentState() will not take so long and are less likely to fail.
std::vector< double > getCurrentJointValues ()
 Get the current joint values for the joints planned for by this instance (see getJoints())
robot_state::RobotStatePtr getCurrentState ()
 Get the current state of the robot.
geometry_msgs::PoseStamped 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() is assumed.
std::vector< double > getCurrentRPY (const std::string &end_effector_link="")
 Get the roll-pitch-yaw (XYZ) for the end-effector end_effector_link. If end_effector_link is empty (the default value) then the end-effector reported by getEndEffectorLink() is assumed.
std::vector< double > getRandomJointValues ()
 Get random joint values for the joints planned for by this instance (see getJoints())
geometry_msgs::PoseStamped 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() is assumed.
Manage named joint configurations
void rememberJointValues (const std::string &name)
 Remember the current joint values (of the robot being monitored) under name. These can be used by setNamedTarget(). These values are remembered locally in the client. Other clients will not have access to them.
void rememberJointValues (const std::string &name, const std::vector< double > &values)
 Remember the specified joint values under name. These can be used by setNamedTarget(). These values are remembered locally in the client. Other clients will not have access to them.
const std::map< std::string,
std::vector< double > > & 
getRememberedJointValues () const
 Get the currently remembered map of names to joint values.
void forgetJointValues (const std::string &name)
 Forget the joint values remebered under name.
Manage planning constraints
void setConstraintsDatabase (const std::string &host, unsigned int port)
 Specify where the MongoDB server that holds known constraints resides.
std::vector< std::string > getKnownConstraints () const
 Get the names of the constraints known as read from the MongoDB server, if a connection was achieved.
moveit_msgs::Constraints getPathConstraints () const
 Get the actual set of constraints for this MoveGroup.
bool setPathConstraints (const std::string &constraint)
 Specify a set of path constraints to use. The constraints are looked up by name from the MongoDB server. This replaces any path constraints set in previous calls to setPathConstraints().
void setPathConstraints (const moveit_msgs::Constraints &constraint)
 Specify a set of path constraints to use. This version does not require a MongoDB server. This replaces any path constraints set in previous calls to setPathConstraints().
void clearPathConstraints ()
 Specify that no path constraints are to be used. This removes any path constraints set in previous calls to setPathConstraints().

Static Public Attributes

static const std::string ROBOT_DESCRIPTION = "robot_description"
 Default ROS parameter name from where to read the robot's URDF. Set to 'robot_description'.

Private Attributes

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

Detailed Description

Client class for the MoveGroup action. This class includes many default settings to make things easy to use.

Definition at line 69 of file move_group.h.


Constructor & Destructor Documentation

moveit::planning_interface::MoveGroup::MoveGroup ( const Options opt,
const boost::shared_ptr< tf::Transformer > &  tf = boost::shared_ptr<tf::Transformer>(),
const ros::Duration wait_for_server = ros::Duration(0, 0) 
)

Construct a client for the MoveGroup action using a specified set of options opt. Optionally, specify a TF instance to use. If not specified, one will be constructed internally. A timeout for connecting to the action server can also be specified. If it is not specified, the wait time is unlimited.

Definition at line 1051 of file move_group.cpp.

moveit::planning_interface::MoveGroup::MoveGroup ( const std::string &  group,
const boost::shared_ptr< tf::Transformer > &  tf = boost::shared_ptr<tf::Transformer>(),
const ros::Duration wait_for_server = ros::Duration(0, 0) 
)

Construct a client for the MoveGroup action for a particular group. Optionally, specify a TF instance to use. If not specified, one will be constructed internally. A timeout for connecting to the action server can also be specified. If it is not specified, the wait time is unlimited.

Definition at line 1044 of file move_group.cpp.

Definition at line 1056 of file move_group.cpp.


Member Function Documentation

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

Definition at line 1675 of file move_group.cpp.

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

Definition at line 1680 of file move_group.cpp.

Given a plan, execute it without waiting for completion. Return true on success.

Definition at line 1091 of file move_group.cpp.

Plan 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).

Definition at line 1081 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::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, but the request made by this interface will succeed.

Definition at line 1740 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::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, but the request made by this interface will succeed.

Definition at line 1745 of file move_group.cpp.

Specify that no path constraints are to be used. This removes any path constraints set in previous calls to setPathConstraints().

Definition at line 1705 of file move_group.cpp.

void moveit::planning_interface::MoveGroup::clearPoseTarget ( const std::string &  end_effector_link = "")

Forget pose(s) specified for end_effector_link.

Definition at line 1317 of file move_group.cpp.

Forget any poses specified for all end-effectors.

Definition at line 1322 of file move_group.cpp.

double moveit::planning_interface::MoveGroup::computeCartesianPath ( const std::vector< geometry_msgs::Pose > &  waypoints,
double  eef_step,
double  jump_threshold,
moveit_msgs::RobotTrajectory &  trajectory,
bool  avoid_collisions = true,
moveit_msgs::MoveItErrorCodes *  error_code = 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(). 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.

Definition at line 1141 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::detachObject ( 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 specified, and there is only one attached object, that object is detached. An error is produced if no object to detach is identified.

Definition at line 1750 of file move_group.cpp.

Given a plan, execute it while waiting for completion. Return true on success.

Definition at line 1096 of file move_group.cpp.

Forget the joint values remebered under name.

Definition at line 1670 of file move_group.cpp.

const std::vector< std::string > & moveit::planning_interface::MoveGroup::getActiveJoints ( ) const

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

Definition at line 1643 of file move_group.cpp.

Get the current joint values for the joints planned for by this instance (see getJoints())

Definition at line 1550 of file move_group.cpp.

geometry_msgs::PoseStamped moveit::planning_interface::MoveGroup::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() is assumed.

Definition at line 1591 of file move_group.cpp.

std::vector< double > moveit::planning_interface::MoveGroup::getCurrentRPY ( const std::string &  end_effector_link = "")

Get the roll-pitch-yaw (XYZ) for the end-effector end_effector_link. If end_effector_link is empty (the default value) then the end-effector reported by getEndEffectorLink() is assumed.

Definition at line 1615 of file move_group.cpp.

Get the current state of the robot.

Definition at line 1658 of file move_group.cpp.

Get the current end-effector name. This returns the value set by setEndEffector() (or indirectly by setEndEffectorLink()). If setEndEffector() was not called, this function reports an end-effector attached to this group. If there are multiple end-effectors, one of them is returned. If no end-effector is known, the empty string is returned.

Definition at line 1295 of file move_group.cpp.

Get the current end-effector link. This returns the value set by setEndEffectorLink() (or indirectly by setEndEffector()). If setEndEffectorLink() 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.

Definition at line 1290 of file move_group.cpp.

Get the tolerance that is used for reaching a joint goal. This is distance for each joint in configuration space.

Definition at line 1503 of file move_group.cpp.

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

Definition at line 1513 of file move_group.cpp.

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

Definition at line 1508 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::getInterfaceDescription ( moveit_msgs::PlannerInterfaceDescription &  desc)

Get the description of the planning plugin loaded by the action server.

Definition at line 1066 of file move_group.cpp.

const std::vector< std::string > & moveit::planning_interface::MoveGroup::getJoints ( ) const

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

Definition at line 1648 of file move_group.cpp.

const robot_state::RobotState & moveit::planning_interface::MoveGroup::getJointValueTarget ( ) const

Get the currently set joint state goal.

Definition at line 1285 of file move_group.cpp.

std::vector< std::string > moveit::planning_interface::MoveGroup::getKnownConstraints ( ) const

Get the names of the constraints known as read from the MongoDB server, if a connection was achieved.

Definition at line 1685 of file move_group.cpp.

const std::string & moveit::planning_interface::MoveGroup::getName ( void  ) const

Get the name of the group this instance operates on.

Definition at line 1061 of file move_group.cpp.

Get the actual set of constraints for this MoveGroup.

Returns:
A copy of the current path constraints set for this move_group

Definition at line 1690 of file move_group.cpp.

Get the name of the frame in which the robot is planning.

Definition at line 1735 of file move_group.cpp.

Get the number of seconds set by setPlanningTime()

Definition at line 1725 of file move_group.cpp.

Get the reference frame set by setPoseReferenceFrame(). By default this is the reference frame of the robot model.

Definition at line 1498 of file move_group.cpp.

const geometry_msgs::PoseStamped & moveit::planning_interface::MoveGroup::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() 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).

Definition at line 1393 of file move_group.cpp.

const std::vector< geometry_msgs::PoseStamped > & moveit::planning_interface::MoveGroup::getPoseTargets ( const std::string &  end_effector_link = "") const

Get the currently set pose goal for the end-effector end_effector_link. The pose goal can consist of multiple poses, if corresponding setPoseTarget() calls were made. Otherwise, only one pose is returned in the vector. If end_effector_link is empty (the default value) then the end-effector reported by getEndEffectorLink() is assumed

Definition at line 1398 of file move_group.cpp.

Get random joint values for the joints planned for by this instance (see getJoints())

Definition at line 1559 of file move_group.cpp.

geometry_msgs::PoseStamped moveit::planning_interface::MoveGroup::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() is assumed.

Definition at line 1566 of file move_group.cpp.

const std::map<std::string, std::vector<double> >& moveit::planning_interface::MoveGroup::getRememberedJointValues ( ) const [inline]

Get the currently remembered map of names to joint values.

Definition at line 710 of file move_group.h.

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

Definition at line 1653 of file move_group.cpp.

Plan 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).

Definition at line 1086 of file move_group.cpp.

Pick up an object.

Definition at line 1106 of file move_group.cpp.

moveit::planning_interface::MoveItErrorCode moveit::planning_interface::MoveGroup::pick ( const std::string &  object,
const moveit_msgs::Grasp &  grasp 
)

Pick up an object given a grasp pose.

Definition at line 1111 of file move_group.cpp.

moveit::planning_interface::MoveItErrorCode moveit::planning_interface::MoveGroup::pick ( const std::string &  object,
const std::vector< moveit_msgs::Grasp > &  grasps 
)

Pick up an object given possible grasp poses.

Definition at line 1116 of file move_group.cpp.

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

Definition at line 1121 of file move_group.cpp.

moveit::planning_interface::MoveItErrorCode moveit::planning_interface::MoveGroup::place ( const std::string &  object,
const std::vector< moveit_msgs::PlaceLocation > &  locations 
)

Place an object at one of the specified possible locations.

Definition at line 1126 of file move_group.cpp.

moveit::planning_interface::MoveItErrorCode moveit::planning_interface::MoveGroup::place ( const std::string &  object,
const std::vector< geometry_msgs::PoseStamped > &  poses 
)

Place an object at one of the specified possible locations.

Definition at line 1131 of file move_group.cpp.

moveit::planning_interface::MoveItErrorCode moveit::planning_interface::MoveGroup::place ( const std::string &  object,
const geometry_msgs::PoseStamped &  pose 
)

Place an object at one of the specified possible location.

Definition at line 1136 of file move_group.cpp.

Compute a motion plan that takes the group declared in the constructor from the current state to the specified target. No execution is performed. The resulting plan is stored in plan.

Definition at line 1101 of file move_group.cpp.

Remember the current joint values (of the robot being monitored) under name. These can be used by setNamedTarget(). These values are remembered locally in the client. Other clients will not have access to them.

Definition at line 1540 of file move_group.cpp.

void moveit::planning_interface::MoveGroup::rememberJointValues ( const std::string &  name,
const std::vector< double > &  values 
)

Remember the specified joint values under name. These can be used by setNamedTarget(). These values are remembered locally in the client. Other clients will not have access to them.

Definition at line 1665 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setApproximateJointValueTarget ( const geometry_msgs::Pose eef_pose,
const std::string &  end_effector_link = "" 
)

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

This is different from setPoseTarget() in that a single IK state (aka JointValueTarget) is computed using IK, and the resulting JointValueTarget is used as the target for planning.

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

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

Definition at line 1268 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setApproximateJointValueTarget ( const geometry_msgs::PoseStamped &  eef_pose,
const std::string &  end_effector_link = "" 
)

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

This is different from setPoseTarget() in that a single IK state (aka JointValueTarget) is computed using IK, and the resulting JointValueTarget is used as the target for planning.

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

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

Definition at line 1273 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setApproximateJointValueTarget ( const Eigen::Affine3d &  eef_pose,
const std::string &  end_effector_link = "" 
)

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

This is different from setPoseTarget() in that a single IK state (aka JointValueTarget) is computed using IK, and the resulting JointValueTarget is used as the target for planning.

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

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

Definition at line 1278 of file move_group.cpp.

void moveit::planning_interface::MoveGroup::setConstraintsDatabase ( const std::string &  host,
unsigned int  port 
)

Specify where the MongoDB server that holds known constraints resides.

Definition at line 1710 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setEndEffector ( const std::string &  eef_name)

Specify the name of the end-effector to use. This is equivalent to setting the EndEffectorLink to the parent link of this end effector.

Definition at line 1309 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setEndEffectorLink ( const std::string &  end_effector_link)

Specify the parent link of the end-effector. This end_effector_link will be used in calls to pose target functions when end_effector_link is not explicitly specified.

Definition at line 1300 of file move_group.cpp.

Set the joint tolerance (for each joint) that is used for reaching the goal when moving to a joint value target.

Definition at line 1525 of file move_group.cpp.

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

Definition at line 1535 of file move_group.cpp.

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

Definition at line 1530 of file move_group.cpp.

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(), setGoalOrientationTolerance() and setGoalJointTolerance().

Definition at line 1518 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setJointValueTarget ( const std::vector< double > &  group_variable_values)

Set the JointValueTarget and use it for future planning requests.

group_variable_values MUST contain exactly one value per joint variable in the same order as returned by getJointValueTarget().getJointModelGroup(getName())->getVariableNames().

This always sets all of the group's joint values.

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

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

Definition at line 1203 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setJointValueTarget ( const std::map< std::string, double > &  variable_values)

Set the JointValueTarget and use it for future planning requests.

variable_values is a map of joint variable names to values. Joints in the group are used to set the JointValueTarget. Joints in the model but not in the group are ignored. An exception is thrown if a joint name is not found in the model. Joint variables in the group that are missing from variable_values remain unchanged (to reset all target variables to their current values in the robot use setJointValueTarget(getCurrentJointValues())).

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

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

Definition at line 1212 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setJointValueTarget ( const robot_state::RobotState &  robot_state)

Set the JointValueTarget and use it for future planning requests.

The target for all joints in the group are set to the value in robot_state.

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

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

Definition at line 1219 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setJointValueTarget ( const std::string &  joint_name,
const std::vector< double > &  values 
)

Set the JointValueTarget and use it for future planning requests.

values MUST have one value for each variable in joint joint_name. values are set as the target for this joint. Other joint targets remain unchanged.

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

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

Definition at line 1232 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setJointValueTarget ( const std::string &  joint_name,
double  value 
)

Set the JointValueTarget and use it for future planning requests.

Joint joint_name must be a 1-DOF joint. value is set as the target for this joint. Other joint targets remain unchanged.

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

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

Definition at line 1226 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setJointValueTarget ( const sensor_msgs::JointState &  state)

Set the JointValueTarget and use it for future planning requests.

state is used to set the target joint state values. Values not specified in state remain unchanged.

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

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

Definition at line 1244 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setJointValueTarget ( const geometry_msgs::Pose eef_pose,
const std::string &  end_effector_link = "" 
)

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

This is different from setPoseTarget() in that a single IK state (aka JointValueTarget) is computed using IK, and the resulting JointValueTarget is used as the target for planning.

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

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

Definition at line 1251 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setJointValueTarget ( const geometry_msgs::PoseStamped &  eef_pose,
const std::string &  end_effector_link = "" 
)

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

This is different from setPoseTarget() in that a single IK state (aka JointValueTarget) is computed using IK, and the resulting JointValueTarget is used as the target for planning.

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

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

Definition at line 1256 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setJointValueTarget ( const Eigen::Affine3d &  eef_pose,
const std::string &  end_effector_link = "" 
)

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

This is different from setPoseTarget() in that a single IK state (aka JointValueTarget) is computed using IK, and the resulting JointValueTarget is used as the target for planning.

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

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

Definition at line 1261 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setNamedTarget ( const std::string &  name)

Set the current joint values to be ones previously remembered by rememberJointValues() or, if not found, that are specified in the SRDF under the name name as a group state.

Definition at line 1185 of file move_group.cpp.

void moveit::planning_interface::MoveGroup::setNumPlanningAttempts ( unsigned int  num_planning_attempts)

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

Definition at line 1076 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setOrientationTarget ( double  x,
double  y,
double  z,
double  w,
const std::string &  end_effector_link = "" 
)

Set the goal orientation of the end-effector end_effector_link to be the quaternion (x,y,z,w).

If end_effector_link is empty then getEndEffectorLink() is used.

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

Definition at line 1468 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setPathConstraints ( const std::string &  constraint)

Specify a set of path constraints to use. The constraints are looked up by name from the MongoDB server. This replaces any path constraints set in previous calls to setPathConstraints().

Definition at line 1695 of file move_group.cpp.

void moveit::planning_interface::MoveGroup::setPathConstraints ( const moveit_msgs::Constraints &  constraint)

Specify a set of path constraints to use. This version does not require a MongoDB server. This replaces any path constraints set in previous calls to setPathConstraints().

Definition at line 1700 of file move_group.cpp.

void moveit::planning_interface::MoveGroup::setPlannerId ( const std::string &  planner_id)

Specify a planner to be used for further planning.

Definition at line 1071 of file move_group.cpp.

Specify the maximum amount of time to use when planning.

Definition at line 1720 of file move_group.cpp.

void moveit::planning_interface::MoveGroup::setPoseReferenceFrame ( const std::string &  pose_reference_frame)

Specify which reference frame to assume for poses specified without a reference frame.

Definition at line 1493 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setPoseTarget ( const Eigen::Affine3d &  end_effector_pose,
const std::string &  end_effector_link = "" 
)

Set the goal pose of the end-effector end_effector_link.

If end_effector_link is empty then getEndEffectorLink() is used.

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

Definition at line 1327 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setPoseTarget ( const geometry_msgs::Pose target,
const std::string &  end_effector_link = "" 
)

Set the goal pose of the end-effector end_effector_link.

If end_effector_link is empty then getEndEffectorLink() is used.

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

Definition at line 1336 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setPoseTarget ( const geometry_msgs::PoseStamped &  target,
const std::string &  end_effector_link = "" 
)

Set the goal pose of the end-effector end_effector_link.

If end_effector_link is empty then getEndEffectorLink() is used.

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

Definition at line 1345 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setPoseTargets ( const EigenSTL::vector_Affine3d end_effector_pose,
const std::string &  end_effector_link = "" 
)

Set goal poses for end_effector_link.

If end_effector_link is empty then getEndEffectorLink() is used.

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

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 1351 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setPoseTargets ( const std::vector< geometry_msgs::Pose > &  target,
const std::string &  end_effector_link = "" 
)

Set goal poses for end_effector_link.

If end_effector_link is empty then getEndEffectorLink() is used.

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

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 1365 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setPoseTargets ( const std::vector< geometry_msgs::PoseStamped > &  target,
const std::string &  end_effector_link = "" 
)

Set goal poses for end_effector_link.

If end_effector_link is empty then getEndEffectorLink() is used.

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

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 1379 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setPositionTarget ( double  x,
double  y,
double  z,
const std::string &  end_effector_link = "" 
)

Set the goal position of the end-effector end_effector_link to be (x, y, z).

If end_effector_link is empty then getEndEffectorLink() is used.

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

Definition at line 1421 of file move_group.cpp.

Set the joint state goal to a random joint configuration.

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

Definition at line 1179 of file move_group.cpp.

bool moveit::planning_interface::MoveGroup::setRPYTarget ( double  roll,
double  pitch,
double  yaw,
const std::string &  end_effector_link = "" 
)

Set the goal orientation of the end-effector end_effector_link to be (roll,pitch,yaw) radians.

If end_effector_link is empty then getEndEffectorLink() is used.

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

Definition at line 1446 of file move_group.cpp.

void moveit::planning_interface::MoveGroup::setStartState ( const moveit_msgs::RobotState &  start_state)

If a different start state should be considered instead of the current state of the robot, this function sets that state.

Definition at line 1161 of file move_group.cpp.

void moveit::planning_interface::MoveGroup::setStartState ( const robot_state::RobotState &  start_state)

If a different start state should be considered instead of the current state of the robot, this function sets that state.

Definition at line 1169 of file move_group.cpp.

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

Definition at line 1174 of file move_group.cpp.

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

Definition at line 1730 of file move_group.cpp.

void moveit::planning_interface::MoveGroup::setWorkspace ( double  minx,
double  miny,
double  minz,
double  maxx,
double  maxy,
double  maxz 
)

Specify the workspace bounding box. The box is specified in the planning frame (i.e. relative to the robot root link start position). This is useful when the MoveGroup's group contains the root joint of the robot -- i.e. when planning motion for the robot relative to the world.

Definition at line 1715 of file move_group.cpp.

When reasoning about the current state of a robot, a CurrentStateMonitor instance is automatically constructed. This function allows triggering the construction of that object from the beginning, so that future calls to functions such as getCurrentState() will not take so long and are less likely to fail.

Definition at line 1545 of file move_group.cpp.

Stop any trajectory execution, if one is active.

Definition at line 1156 of file move_group.cpp.


Member Data Documentation

Definition at line 755 of file move_group.h.

std::map<std::string, std::vector<double> > moveit::planning_interface::MoveGroup::remembered_joint_values_ [private]

Definition at line 754 of file move_group.h.

const std::string moveit::planning_interface::MoveGroup::ROBOT_DESCRIPTION = "robot_description" [static]

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

Definition at line 74 of file move_group.h.


The documentation for this class was generated from the following files:


planning_interface
Author(s): Ioan Sucan
autogenerated on Wed Aug 26 2015 12:44:13