关节运动
给定一个目标关节值,将机械臂运动到这一个目标:
moveit::planning_interface::MoveGroupInterface move_group(groupName);
move_group.setJointValueTarget(target_position);
moveit::planning_interface::MoveGroupInterface::Plan my_plan;
bool success=(move_group.plan(my_plan)==moveit::planning_interface::MoveitErrorCode::SUCCESS);
if(success)
move_group.move();
Pose运动
运动到一个给定的目标Pose。若未指定末端执行器的link,则使用默认的末端执行器link,即该group的最后一个link。
moveit::planning_interface::MoveGroupInterface move_group(groupName);
move_group.setPoseTarget(target_pose, end_effector_link="");
moveit::planning_interface::MoveGroupInterface::Plan my_plan;
bool success=(move_group.plan(my_plan)==moveit::planning_interface::MoveitErrorCode::SUCCESS);
if(success)
move_group.move();
具有约束的路径规划
在进行路径规划时,可以为某个link或joint设置如下约束:
JointConstraint,设置一个关节的位置约束,也就是说在规划时,必须使该关节经过该位置。

最低0.47元/天 解锁文章
3365

被折叠的 条评论
为什么被折叠?



