moveit2
The MoveIt Motion Planning Framework for ROS 2.
Loading...
Searching...
No Matches
move_group_interface.hpp
Go to the documentation of this file.
1/*********************************************************************
2 * Software License Agreement (BSD License)
3 *
4 * Copyright (c) 2014, SRI International
5 * Copyright (c) 2012, Willow Garage, Inc.
6 * All rights reserved.
7 *
8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions
10 * are met:
11 *
12 * * Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer.
14 * * Redistributions in binary form must reproduce the above
15 * copyright notice, this list of conditions and the following
16 * disclaimer in the documentation and/or other materials provided
17 * with the distribution.
18 * * Neither the name of Willow Garage nor the names of its
19 * contributors may be used to endorse or promote products derived
20 * from this software without specific prior written permission.
21 *
22 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
23 * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
24 * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
25 * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
26 * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
27 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
28 * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
29 * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
30 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
31 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN
32 * ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
33 * POSSIBILITY OF SUCH DAMAGE.
34 *********************************************************************/
35
36/* Author: Ioan Sucan, Sachin Chitta */
37
38#pragma once
39
40#include <cstdint>
44#include <moveit_msgs/msg/robot_trajectory.hpp>
45#include <moveit_msgs/msg/robot_state.hpp>
46#include <moveit_msgs/msg/planner_interface_description.hpp>
47#include <moveit_msgs/msg/constraints.hpp>
48#include <moveit_msgs/msg/grasp.hpp>
49#include <moveit_msgs/action/move_group.hpp>
50#include <moveit_msgs/action/execute_trajectory.hpp>
51#include <rclcpp/logger.hpp>
52#include <rclcpp/version.h>
53
54#include <moveit_msgs/msg/motion_plan_request.hpp>
55#include <geometry_msgs/msg/pose_stamped.hpp>
56
57#include <rclcpp_action/rclcpp_action.hpp>
58
59#include <memory>
60#include <utility>
61// For Rolling, Kilted, and newer
62#if RCLCPP_VERSION_GTE(29, 6, 0)
63#include <tf2_ros/buffer.hpp>
64// For Jazzy and older
65#else
66#include <tf2_ros/buffer.h>
67#endif
68
69#include <moveit_move_group_interface_export.h>
70
71namespace moveit
72{
74namespace planning_interface
75{
76MOVEIT_CLASS_FORWARD(MoveGroupInterface); // Defines MoveGroupInterfacePtr, ConstPtr, WeakPtr... etc
77
83class MOVEIT_MOVE_GROUP_INTERFACE_EXPORT MoveGroupInterface
84{
85public:
87 static const std::string ROBOT_DESCRIPTION;
88
90 struct Options
91 {
92 Options(std::string group_name, std::string desc = ROBOT_DESCRIPTION, std::string move_group_namespace = "")
94 , robot_description(std::move(desc))
96 {
97 }
98
100 std::string group_name;
101
103 std::string robot_description;
104
106 moveit::core::RobotModelConstPtr robot_model;
107
110 };
111
113
115 struct Plan
116 {
118 moveit_msgs::msg::RobotState start_state;
119
121 moveit_msgs::msg::RobotTrajectory trajectory;
122
125 };
126
137 MoveGroupInterface(const rclcpp::Node::SharedPtr& node, const Options& opt,
138 const std::shared_ptr<tf2_ros::Buffer>& tf_buffer = std::shared_ptr<tf2_ros::Buffer>(),
139 const rclcpp::Duration& wait_for_servers = rclcpp::Duration::from_seconds(-1));
140
148 MoveGroupInterface(const rclcpp::Node::SharedPtr& node, const std::string& group,
149 const std::shared_ptr<tf2_ros::Buffer>& tf_buffer = std::shared_ptr<tf2_ros::Buffer>(),
150 const rclcpp::Duration& wait_for_servers = rclcpp::Duration::from_seconds(-1));
151
153
161
162 MoveGroupInterface(MoveGroupInterface&& other) noexcept;
165 const std::string& getName() const;
166
169 const std::vector<std::string>& getNamedTargets() const;
170
172 const std::shared_ptr<tf2_ros::Buffer>& getTF() const;
173
175 moveit::core::RobotModelConstPtr getRobotModel() const;
176
178 const rclcpp::Node::SharedPtr& getNode() const;
179
181 const std::string& getPlanningFrame() const;
182
184 const std::vector<std::string>& getJointModelGroupNames() const;
185
187 const std::vector<std::string>& getJointNames() const;
188
190 const std::vector<std::string>& getLinkNames() const;
191
193 std::map<std::string, double> getNamedTargetValues(const std::string& name) const;
194
196 const std::vector<std::string>& getActiveJoints() const;
197
199 const std::vector<std::string>& getJoints() const;
200
203 unsigned int getVariableCount() const;
204
206 bool getInterfaceDescriptions(std::vector<moveit_msgs::msg::PlannerInterfaceDescription>& desc) const;
207
209 bool getInterfaceDescription(moveit_msgs::msg::PlannerInterfaceDescription& desc) const;
210
212 std::map<std::string, std::string> getPlannerParams(const std::string& planner_id,
213 const std::string& group = "") const;
214
216 void setPlannerParams(const std::string& planner_id, const std::string& group,
217 const std::map<std::string, std::string>& params, bool bReplace = false);
218
219 std::string getDefaultPlanningPipelineId() const;
220
222 void setPlanningPipelineId(const std::string& pipeline_id);
223
225 const std::string& getPlanningPipelineId() const;
226
228 std::string getDefaultPlannerId(const std::string& group = "") const;
229
231 void setPlannerId(const std::string& planner_id);
232
234 const std::string& getPlannerId() const;
235
237 void setPlanningTime(double seconds);
238
241 void setNumPlanningAttempts(unsigned int num_planning_attempts);
242
248 void setMaxVelocityScalingFactor(double max_velocity_scaling_factor);
249
251 double getMaxVelocityScalingFactor() const;
252
258 void setMaxAccelerationScalingFactor(double max_acceleration_scaling_factor);
259
261 double getMaxAccelerationScalingFactor() const;
262
264 double getPlanningTime() const;
265
268 double getGoalJointTolerance() const;
269
272 double getGoalPositionTolerance() const;
273
276 double getGoalOrientationTolerance() const;
277
284 void setGoalTolerance(double tolerance);
285
288 void setGoalJointTolerance(double tolerance);
289
291 void setGoalPositionTolerance(double tolerance);
292
294 void setGoalOrientationTolerance(double tolerance);
295
300 void setWorkspace(double minx, double miny, double minz, double maxx, double maxy, double maxz);
301
304 void setStartState(const moveit_msgs::msg::RobotState& start_state);
305
308 void setStartState(const moveit::core::RobotState& start_state);
309
312
329
342 bool setJointValueTarget(const std::vector<double>& group_variable_values);
343
359 bool setJointValueTarget(const std::map<std::string, double>& variable_values);
360
376 bool setJointValueTarget(const std::vector<std::string>& variable_names, const std::vector<double>& variable_values);
377
387 bool setJointValueTarget(const moveit::core::RobotState& robot_state);
388
400 bool setJointValueTarget(const std::string& joint_name, const std::vector<double>& values);
401
413 bool setJointValueTarget(const std::string& joint_name, double value);
414
425 bool setJointValueTarget(const sensor_msgs::msg::JointState& state);
426
438 bool setJointValueTarget(const geometry_msgs::msg::Pose& eef_pose, const std::string& end_effector_link = "");
439
451 bool setJointValueTarget(const geometry_msgs::msg::PoseStamped& eef_pose, const std::string& end_effector_link = "");
452
464 bool setJointValueTarget(const Eigen::Isometry3d& eef_pose, const std::string& end_effector_link = "");
465
476 bool setApproximateJointValueTarget(const geometry_msgs::msg::Pose& eef_pose,
477 const std::string& end_effector_link = "");
478
489 bool setApproximateJointValueTarget(const geometry_msgs::msg::PoseStamped& eef_pose,
490 const std::string& end_effector_link = "");
491
502 bool setApproximateJointValueTarget(const Eigen::Isometry3d& eef_pose, const std::string& end_effector_link = "");
503
508 void setRandomTarget();
509
512 bool setNamedTarget(const std::string& name);
513
515 void getJointValueTarget(std::vector<double>& group_variable_values) const;
516
518
530
538 bool setPositionTarget(double x, double y, double z, const std::string& end_effector_link = "");
539
547 bool setRPYTarget(double roll, double pitch, double yaw, const std::string& end_effector_link = "");
548
557 bool setOrientationTarget(double x, double y, double z, double w, const std::string& end_effector_link = "");
558
566 bool setPoseTarget(const Eigen::Isometry3d& end_effector_pose, const std::string& end_effector_link = "");
567
575 bool setPoseTarget(const geometry_msgs::msg::Pose& target, const std::string& end_effector_link = "");
576
584 bool setPoseTarget(const geometry_msgs::msg::PoseStamped& target, const std::string& end_effector_link = "");
585
604 bool setPoseTargets(const EigenSTL::vector_Isometry3d& end_effector_pose, const std::string& end_effector_link = "");
605
624 bool setPoseTargets(const std::vector<geometry_msgs::msg::Pose>& target, const std::string& end_effector_link = "");
625
644 bool setPoseTargets(const std::vector<geometry_msgs::msg::PoseStamped>& target,
645 const std::string& end_effector_link = "");
646
648 void setPoseReferenceFrame(const std::string& pose_reference_frame);
649
653 bool setEndEffectorLink(const std::string& end_effector_link);
654
657 bool setEndEffector(const std::string& eef_name);
658
660 void clearPoseTarget(const std::string& end_effector_link = "");
661
663 void clearPoseTargets();
664
671 const geometry_msgs::msg::PoseStamped& getPoseTarget(const std::string& end_effector_link = "") const;
672
678 const std::vector<geometry_msgs::msg::PoseStamped>& getPoseTargets(const std::string& end_effector_link = "") const;
679
685 const std::string& getEndEffectorLink() const;
686
692 const std::string& getEndEffector() const;
693
696 const std::string& getPoseReferenceFrame() const;
697
699
704
709
713
714 rclcpp_action::Client<moveit_msgs::action::MoveGroup>& getMoveGroupClient() const;
715
721
726
734 const std::vector<std::string>& controllers = std::vector<std::string>());
735
742 moveit::core::MoveItErrorCode asyncExecute(const moveit_msgs::msg::RobotTrajectory& trajectory,
743 const std::vector<std::string>& controllers = std::vector<std::string>());
744
752 const std::vector<std::string>& controllers = std::vector<std::string>());
753
760 moveit::core::MoveItErrorCode execute(const moveit_msgs::msg::RobotTrajectory& trajectory,
761 const std::vector<std::string>& controllers = std::vector<std::string>());
762
772 [[deprecated("Drop jump_threshold")]] double //
773 computeCartesianPath(const std::vector<geometry_msgs::msg::Pose>& waypoints, double eef_step,
774 double /*jump_threshold*/, moveit_msgs::msg::RobotTrajectory& trajectory,
775 bool avoid_collisions = true, moveit_msgs::msg::MoveItErrorCodes* error_code = nullptr)
776 {
777 return computeCartesianPath(waypoints, eef_step, trajectory, avoid_collisions, error_code);
778 }
779 double computeCartesianPath(const std::vector<geometry_msgs::msg::Pose>& waypoints, double eef_step,
780 moveit_msgs::msg::RobotTrajectory& trajectory, bool avoid_collisions = true,
781 moveit_msgs::msg::MoveItErrorCodes* error_code = nullptr);
782
795 [[deprecated("Drop jump_threshold")]] double //
796 computeCartesianPath(const std::vector<geometry_msgs::msg::Pose>& waypoints, double eef_step,
797 double /*jump_threshold*/, moveit_msgs::msg::RobotTrajectory& trajectory,
798 const moveit_msgs::msg::Constraints& path_constraints, bool avoid_collisions = true,
799 moveit_msgs::msg::MoveItErrorCodes* error_code = nullptr)
800 {
801 return computeCartesianPath(waypoints, eef_step, trajectory, path_constraints, avoid_collisions, error_code);
802 }
803 double computeCartesianPath(const std::vector<geometry_msgs::msg::Pose>& waypoints, double eef_step,
804 moveit_msgs::msg::RobotTrajectory& trajectory,
805 const moveit_msgs::msg::Constraints& path_constraints, bool avoid_collisions = true,
806 moveit_msgs::msg::MoveItErrorCodes* error_code = nullptr);
807
809 void stop();
810
812 void allowReplanning(bool flag);
813
815 void setReplanAttempts(int32_t attempts);
816
818 void setReplanDelay(double delay);
819
822 void allowLooking(bool flag);
823
825 void setLookAroundAttempts(int32_t attempts);
826
833 void constructRobotState(moveit_msgs::msg::RobotState& state);
834
837 void constructMotionPlanRequest(moveit_msgs::msg::MotionPlanRequest& request);
838
840
845
852 bool attachObject(const std::string& object, const std::string& link = "");
853
862 bool attachObject(const std::string& object, const std::string& link, const std::vector<std::string>& touch_links);
863
869 bool detachObject(const std::string& name = "");
870
872
877
883 bool startStateMonitor(double wait = 1.0);
884
886 std::vector<double> getCurrentJointValues() const;
887
889 moveit::core::RobotStatePtr getCurrentState(double wait = 1) const;
890
894 geometry_msgs::msg::PoseStamped getCurrentPose(const std::string& end_effector_link = "") const;
895
899 std::vector<double> getCurrentRPY(const std::string& end_effector_link = "") const;
900
902 std::vector<double> getRandomJointValues() const;
903
907 geometry_msgs::msg::PoseStamped getRandomPose(const std::string& end_effector_link = "") const;
908
910
915
920 void rememberJointValues(const std::string& name);
921
926 void rememberJointValues(const std::string& name, const std::vector<double>& values);
927
929 const std::map<std::string, std::vector<double> >& getRememberedJointValues() const
930 {
931 return remembered_joint_values_;
932 }
933
935 void forgetJointValues(const std::string& name);
936
938
943
945 void setConstraintsDatabase(const std::string& host, unsigned int port);
946
948 std::vector<std::string> getKnownConstraints() const;
949
953 moveit_msgs::msg::Constraints getPathConstraints() const;
954
958 bool setPathConstraints(const std::string& constraint);
959
963 void setPathConstraints(const moveit_msgs::msg::Constraints& constraint);
964
967 void clearPathConstraints();
968
969 moveit_msgs::msg::TrajectoryConstraints getTrajectoryConstraints() const;
970 void setTrajectoryConstraints(const moveit_msgs::msg::TrajectoryConstraints& constraint);
971 void clearTrajectoryConstraints();
972
974
975protected:
977 const moveit::core::RobotState& getTargetRobotState() const;
978
979private:
980 std::map<std::string, std::vector<double> > remembered_joint_values_;
981 class MoveGroupInterfaceImpl;
982 MoveGroupInterfaceImpl* impl_;
983 rclcpp::Logger logger_;
984};
985} // namespace planning_interface
986} // namespace moveit
MoveGroupInterface(const rclcpp::Node::SharedPtr &node, const Options &opt, const std::shared_ptr< tf2_ros::Buffer > &tf_buffer=std::shared_ptr< tf2_ros::Buffer >(), const rclcpp::Duration &wait_for_servers=rclcpp::Duration::from_seconds(-1))
Construct a MoveGroupInterface instance call using a specified set of options opt.
#define MOVEIT_CLASS_FORWARD(C)
a wrapper around moveit_msgs::MoveItErrorCodes to make it easier to return an error code message from...
Representation of a robot's state. This includes position, velocity, acceleration and effort.
Client class to conveniently use the ROS interfaces provided by the move_group node.
double computeCartesianPath(const std::vector< geometry_msgs::msg::Pose > &waypoints, double eef_step, double, moveit_msgs::msg::RobotTrajectory &trajectory, bool avoid_collisions=true, moveit_msgs::msg::MoveItErrorCodes *error_code=nullptr)
Compute a Cartesian path that follows specified waypoints with a step size of at most eef_step meters...
void setMaxVelocityScalingFactor(double max_velocity_scaling_factor)
Set a scaling factor for optionally reducing the maximum joint velocity. Allowed values are in (0,...
const std::string & getEndEffectorLink() const
Get the current end-effector link. This returns the value set by setEndEffectorLink() (or indirectly ...
static const std::string ROBOT_DESCRIPTION
Default ROS parameter name from where to read the robot's URDF. Set to 'robot_description'.
const std::vector< std::string > & getNamedTargets() const
Get the names of the named robot states available as targets, both either remembered states or defaul...
std::map< std::string, std::string > getPlannerParams(const std::string &planner_id, const std::string &group="") const
Get the planner parameters for given group and planner_id.
MoveGroupInterface(const rclcpp::Node::SharedPtr &node, const Options &opt, const std::shared_ptr< tf2_ros::Buffer > &tf_buffer=std::shared_ptr< tf2_ros::Buffer >(), const rclcpp::Duration &wait_for_servers=rclcpp::Duration::from_seconds(-1))
Construct a MoveGroupInterface instance call using a specified set of options opt.
const std::string & getPlannerId() const
Get the current planner_id.
MoveGroupInterface & operator=(const MoveGroupInterface &)=delete
moveit::core::MoveItErrorCode plan(Plan &plan)
Compute a motion plan that takes the group declared in the constructor from the current state to the ...
void setGoalTolerance(double tolerance)
Set the tolerance that is used for reaching the goal. For joint state goals, this will be distance fo...
void setGoalPositionTolerance(double tolerance)
Set the position tolerance that is used for reaching the goal when moving to a pose.
const std::string & getPlanningFrame() const
Get the name of the frame in which the robot is planning.
bool setPoseTargets(const EigenSTL::vector_Isometry3d &end_effector_pose, const std::string &end_effector_link="")
Set goal poses for end_effector_link.
bool setPoseTarget(const Eigen::Isometry3d &end_effector_pose, const std::string &end_effector_link="")
Set the goal pose of the end-effector end_effector_link.
moveit::core::MoveItErrorCode asyncMove()
Plan and execute a trajectory that takes the group of joints declared in the constructor to the speci...
void setPlanningPipelineId(const std::string &pipeline_id)
Specify a planning pipeline to be used for further planning.
double getGoalJointTolerance() const
Get the tolerance that is used for reaching a joint goal. This is distance for each joint in configur...
MoveGroupInterface(const MoveGroupInterface &)=delete
This class owns unique resources (e.g. action clients, threads) and its not very meaningful to copy....
bool setEndEffectorLink(const std::string &end_effector_link)
Specify the parent link of the end-effector. This end_effector_link will be used in calls to pose tar...
void setStartStateToCurrentState()
Set the starting state for planning to be that reported by the robot's joint state publication.
bool getInterfaceDescriptions(std::vector< moveit_msgs::msg::PlannerInterfaceDescription > &desc) const
Get the descriptions of all planning plugins loaded by the action server.
void setMaxAccelerationScalingFactor(double max_acceleration_scaling_factor)
Set a scaling factor for optionally reducing the maximum joint acceleration. Allowed values are in (0...
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).
const std::string & getEndEffector() const
Get the current end-effector name. This returns the value set by setEndEffector() (or indirectly by s...
void setNumPlanningAttempts(unsigned int num_planning_attempts)
Set the number of times the motion plan is to be computed from scratch before the shortest solution i...
rclcpp_action::Client< moveit_msgs::action::MoveGroup > & getMoveGroupClient() const
Get the move_group action client used by the MoveGroupInterface. The client can be used for querying ...
bool setNamedTarget(const std::string &name)
Set the current joint values to be ones previously remembered by rememberJointValues() or,...
const std::vector< std::string > & getJointNames() const
Get vector of names of joints available in move group.
moveit::core::MoveItErrorCode move()
Plan and execute a trajectory that takes the group of joints declared in the constructor to the speci...
double computeCartesianPath(const std::vector< geometry_msgs::msg::Pose > &waypoints, double eef_step, double, moveit_msgs::msg::RobotTrajectory &trajectory, const moveit_msgs::msg::Constraints &path_constraints, bool avoid_collisions=true, moveit_msgs::msg::MoveItErrorCodes *error_code=nullptr)
Compute a Cartesian path that follows specified waypoints with a step size of at most eef_step meters...
moveit::core::RobotModelConstPtr getRobotModel() const
Get the RobotModel object.
moveit::core::MoveItErrorCode execute(const Plan &plan, const std::vector< std::string > &controllers=std::vector< std::string >())
Given a plan, execute it while waiting for completion.
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,...
bool setJointValueTarget(const std::vector< double > &group_variable_values)
Set the JointValueTarget and use it for future planning requests.
const rclcpp::Node::SharedPtr & getNode() const
Get the ROS node handle of this instance operates on.
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.
void setGoalOrientationTolerance(double tolerance)
Set the orientation tolerance that is used for reaching the goal when moving to a pose.
void clearPoseTarget(const std::string &end_effector_link="")
Forget pose(s) specified for end_effector_link.
const geometry_msgs::msg::PoseStamped & getPoseTarget(const std::string &end_effector_link="") const
void setGoalJointTolerance(double tolerance)
Set the joint tolerance (for each joint) that is used for reaching the goal when moving to a joint va...
std::string getDefaultPlannerId(const std::string &group="") const
Get the default planner of the current planning pipeline for the given group (or the pipeline's defau...
void setRandomTarget()
Set the joint state goal to a random joint configuration.
void getJointValueTarget(std::vector< double > &group_variable_values) const
Get the current joint state goal in a form compatible to setJointValueTarget().
const std::vector< std::string > & getActiveJoints() const
Get only the active (actuated) joints this instance operates on.
bool getInterfaceDescription(moveit_msgs::msg::PlannerInterfaceDescription &desc) const
Get the description of the default planning plugin loaded by the action server.
const std::string & getName() const
Get the name of the group this instance operates on.
moveit::core::MoveItErrorCode asyncExecute(const Plan &plan, const std::vector< std::string > &controllers=std::vector< std::string >())
Given a plan, execute it without waiting for completion.
const std::vector< std::string > & getJoints() const
Get all the joints this instance operates on (including fixed joints).
void setPoseReferenceFrame(const std::string &pose_reference_frame)
Specify which reference frame to assume for poses specified without a reference frame.
const std::shared_ptr< tf2_ros::Buffer > & getTF() const
Get the tf2_ros::Buffer.
const std::vector< geometry_msgs::msg::PoseStamped > & getPoseTargets(const std::string &end_effector_link="") const
double getMaxVelocityScalingFactor() const
Get the max velocity scaling factor set by setMaxVelocityScalingFactor().
const std::vector< std::string > & getLinkNames() const
Get vector of names of links available in move group.
double getMaxAccelerationScalingFactor() const
Get the max acceleration scaling factor set by setMaxAccelerationScalingFactor().
void setStartState(const moveit_msgs::msg::RobotState &start_state)
If a different start state should be considered instead of the current state of the robot,...
void clearPoseTargets()
Forget any poses specified for all end-effectors.
void setPlannerId(const std::string &planner_id)
Specify a planner to be used for further planning.
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...
const std::string & getPoseReferenceFrame() const
Get the reference frame set by setPoseReferenceFrame(). By default this is the reference frame of the...
const std::string & getPlanningPipelineId() const
Get the current planning_pipeline_id.
const std::map< std::string, std::vector< double > > & getRememberedJointValues() const
Get the currently remembered map of names to joint values.
double getGoalOrientationTolerance() const
Get the tolerance that is used for reaching an orientation goal. This is the tolerance for roll,...
std::map< std::string, double > getNamedTargetValues(const std::string &name) const
Get the joint angles for targets specified by name.
unsigned int getVariableCount() const
Get the number of variables used to describe the state of this group. This is larger or equal to the ...
double getGoalPositionTolerance() const
Get the tolerance that is used for reaching a position goal. This is be the radius of a sphere where ...
double getPlanningTime() const
Get the number of seconds set by setPlanningTime().
void setPlanningTime(double seconds)
Specify the maximum amount of time to use when planning.
bool setApproximateJointValueTarget(const geometry_msgs::msg::Pose &eef_pose, const std::string &end_effector_link="")
Set the joint state goal for a particular joint by computing IK.
void setPlannerParams(const std::string &planner_id, const std::string &group, const std::map< std::string, std::string > &params, bool bReplace=false)
Set the planner parameters for given group and planner_id.
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....
const std::vector< std::string > & getJointModelGroupNames() const
Get the available planning group names.
Simple interface to MoveIt components.
Main namespace for MoveIt.
Options(std::string group_name, std::string desc=ROBOT_DESCRIPTION, std::string move_group_namespace="")
The representation of a motion plan (as ROS messages).
Specification of options to use when constructing the MoveGroupInterface class.
std::string move_group_namespace
The namespace for the move group node.
Options(std::string group_name, std::string desc=ROBOT_DESCRIPTION, std::string move_group_namespace="")
std::string robot_description
The robot description parameter name (if different from default).
moveit::core::RobotModelConstPtr robot_model
Optionally, an instance of the RobotModel to use can be also specified.
std::string group_name
The group to construct the class instance for.
The representation of a motion plan (as ROS messages).
moveit_msgs::msg::RobotTrajectory trajectory
The trajectory of the robot (may not contain joints that are the same as for the start_state_).
double planning_time
The amount of time it took to generate the plan.
moveit_msgs::msg::RobotState start_state
The full starting state used for planning.