两个action
他这里用到了两个action pickup和place
http://wiki.ros.org/moveit_msgs
Messages, services and actions used by MoveIt
action介绍:xxx
http://wiki.ros.org/actionlib
#目标值
int32 num
---
#最终结果
int32 result
---
#连续反馈
float64 progress_bar
c++
typedef actionlib::SimpleActionServer<demo01_action::AddIntsAction> Server;
typedef actionlib::SimpleActionClient<chores::DoDishesAction> Client;
#include "demo01_action/AddIntsAction.h"
Client client("do_dishes", true); // true -> don't need ros::spin()
Server server(nh,"addInts",boost::bind(&cb,_1,&server),false)
py
from actionlib import SimpleActionClient, GoalStatus
self._grasps_ac = SimpleActionClient('/moveit_simple_grasps_server/generate', GenerateGraspsAction)
from chores.msg import DoDishesAction, DoDishesGoal
client = actionlib.SimpleActionClient('do_dishes', DoDishesAction)
from demo01_action.msg import *
client = actionlib.SimpleActionClient("addInts",AddIntsAction)
自己的action
xxx.action文件
配置完编译生成中间文件
编译后会生成一些中间文件。
msg文件(.../工作空间/devel/share/包名/msg/xxx.msg)
C++ 调用的文件(.../工作空间/devel/include/包名/xxx.h):
C++ 调用的文件(.../工作空间/devel/include/包名/xxx.h):
vscode配置 需要像之前自定义 msg 实现一样配置settings.json 文件
move api
他这里分c++和python两个版本的。
moveit::planning_interface::MoveGroupInterface Class Reference
古月居,包括moveit官方教程里面用到的是pick
http://docs.ros.org/en/kinetic/api/moveit_ros_planning_interface/html/classmoveit_1_1planning__interface_1_1MoveGroupInterface.html
High level actions that trigger a sequence of plans and actions.
moveit::planning_interface::MoveGroupInterface group("panda_arm");
moveit::planning_interface::MoveGroupInterface& move_group
move_group.pick("object", grasps);
////////////////////////////////////////////////////
arm = MoveGroupCommander(GROUP_NAME_ARM)
result = arm.pick(target_id, grasps)
命名空间 类 对象
https://www.ncnynl.com/archives/201610/972.html
https://www.ncnynl.com/archives/201610/1016.html
namespace
里面有class /function/ variable
classe
里面有各种函数
https://blog.csdn.net/u010936131/article/details/79076453
模式区分
他这个所谓的demo演示模式其实就是moveit config自动生成的launch文件
演示模式就是只运行 rviz
后面又分别运行了相当于
gazebo.launch
moveit_rviz.launch
grasp generator.launch
pick and place.py
四个文件。

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



