MoveIt教程
moveit::planning_interface::MoveGroupInterface是⼀个client类,对move_group的接⼝进⾏了封装。在MoveIt!编程中,通过创建该类client对象,调⽤接⼝函数对机器⼈进⾏控制。
头⽂件:#include <moveit/planning_interface/move_group_interface.h>
类成员
内部类
类名&介绍
class MoveGroupInterfaceImpl
MoveGroupInterface接⼝的具体实现
struct Options
构建对象时可选择传⼊ 详见对应的构造函数
struct Plan
构造对象时可以给定⼀个 详见对应的构造函数
公有函数
返回值函数&介绍
const
std::vector
getActiveJoints () const
<
std::string
> &
获取move_group(规划组)中的主动关节(可以主动控制的关节)
std::string getDefaultPlannerId (const std::string &group="") const
获取当前规划组的planner,如果没有指定过,那返回的是global默认的
double getGoalJointTolerance () const
获取到达⼀个关节⽬标的允许的误差
double getGoalOrientationTolerance () const
获取达到⽬标的orientation误差,针对roll,pitch,yaw,返回的是弧度
double getGoalPositionTolerance () const
获取到达⽬标的position误差,返回double半径值,末端执⾏器所需到达的该半径的圆球内
bool getInterfaceDescription (moveit_msgs::PlannerInterfaceDescription &desc)
获取action ver加载的规划插件的描述
福州英语培训const
std::vector
<
getJointNames ()
std::string
> &
返回值函数&介绍
获取当前规划组内的关节名称
const
std::vector
getJoints () const
<
std::string
> &
获取当前规划组内的关节 (包括fixed joints)
const
std::vector
<
getLinkNames ()
std::string
> &
符合英文获取规当前划组内的链接名称
const
getName () const
std::string
&
获取当前规划组名称
const
std::vector
getNamedTargets ()
<
std::string
>
获取已命名的机器⼈⽬标状态,包括SRDF⽂件中定义的和程序中保存的 std::map<
getNamedTargetValues (const std::string &name)
std::string,
double >
continued story获取某个命名的机器⼈⽬标状态的关节⾓度
const
getNodeHandle () const
ros::NodeH
andle &
获取ROS节点
const
std::string
getPlannerId () const
&
获取当前planner
std::map<
std::string,
getPlannerParams (const std::string &planner_id, const std::string &group="") std::string
>
获取planner参数
const
getPlanningFrame () const
std::string
金山翻译在线
&
获取当前规划基于的坐标系
double getPlanningTime () const
获取tPlanningTime() 设置的规划时间(秒)
robot_mod
el::RobotM
odelConst
Ptr
getRobotModel () const
获取RobotModel对象
unsigned
int
chariot
getVariableCount () const
获取描述规划组状态的变量个数,⼤于等于⾃由度
MoveGroupInterface (const Options &opt, const boost::shared_ptr< tf::Transformer >
&tf=boost::shared_ptr< tf::Transformer >(), const ros::WallDuration
&wait_for_rvers=ros::WallDuration())
构造函数
MOVEIT_D EPRECATE
D MoveGroupInterface (const Options &opt, const boost::shared_ptr< tf::Transformer > &tf, const ros::Duration &wait_for_rvers)
构造函数 不建议使⽤
2016年职称英语MoveGroupInterface (const std::string &group, const boost::shared_ptr< tf::Transformer >
&tf=boost::shared_ptr< tf::Transformer >(), const ros::WallDuration
&wait_for_rvers=ros::WallDuration())
开童装店构造函数
MOVEIT_D EPRECATE
D MoveGroupInterface (const std::string &group, const boost::shared_ptr< tf::Transformer > &tf, const ros::Duration &wait_for_rvers)
构造函数 不建议使⽤
MoveGroupInterface (const MoveGroupInterface &)=delete
禁⽌使⽤编译器默认⽣成的拷贝构造函数
MoveGroupInterface (MoveGroupInterface &&other)
默认移动构造函数
MOVEIT_STRUCT_FORWARD (Plan)
详见链接ownage
MoveGrou
pInterface
&
operator= (const MoveGroupInterface &)=delete
禁⽌使⽤编译器默认⽣成的赋值函数
MoveGrou
pInterface
&
operator= (MoveGroupInterface &&other)
默认拷贝函数
void tGoalJointTolerance (double tolerance)
设置到⽬标时允许的关节⾓度偏差 reply的用法
void tGoalOrientationTolerance (double tolerance)设置到⽬标姿态时允许的⽅向orientation偏差
void tGoalPositionTolerance (double tolerance)返回值函数&介绍
返回值函数&介绍
bool tJointValueTarget (const std::vector< double > &group_variable_values)设置
bool tJointValueTarget (const std::map< std::string, double > &variable_values)设置
bool tJointValueTarget (const robot_state::RobotState &robot_state)设置
bool tJointValueTarget (const std::string &joint_name, const std::vector< double > &values)
设置
bool tJointValueTarget (const std::string &joint_name, double value)设置flowcontrol
bool tJointValueTarget (const nsor_msgs::JointState &state)设置
bool tJointValueTarget (const geometry_msgs::Po &eef_po, const std::string &end_effector_link="")
为指定关节设置
bool tJointValueTarget (const geometry_msgs::PoStamped &eef_po, const std::string &end_effector_link="")
为指定关节设置
bool tJointValueTarget (const Eigen::Affine3d &eef_po, const std::string &end_effector_link="")
为指定关节设置
bool tApproximateJointValueTarget (const geometry_msgs::Po &eef_po, const std::string &end_effector_link="")
为指定关节设置
bool tApproximateJointValueTarget (const geometry_msgs::PoStamped &eef_po, const std::string &end_effector_link="")
为指定关节设置
bool tApproximateJointValueTarget (const Eigen::Affine3d &eef_po, const std::string &end_effector_link="")
为指定关节设置
void tRandomTarget ()
随机设置
bool tNamedTarget (const std::string &name)
设置⼀个已知名称的⽬标,从通过 rememberJointValues()添加的状态中搜索,如果找过到,会
从SRDF中搜索
const
robot_state::RobotSta getJointValueTarget () const