项目名字缩成rtp了:关于ROS actionlib的multiple goals

来源:互联网 发布:马蓉起诉王宝强 知乎 编辑:程序博客网 时间:2024/05/23 15:27

项目名字缩成rtp了, 从微信群里拉了6个贡献代码的同学,组成牛逼的“rtp核心”,好好搞一下;

最近陷在改装robi的脚为平衡车的计划里面了:-)  mpu6050、光电编码器、PID、卡尔曼滤波(有人抱怨说mpu6050效果太差,dmp出来结果令人吃惊,我想说的是:是时候叫出六十年前发明的卡尔曼滤波器了:)  ),陷进去了,东西感觉有点多。

记录一下前段时间查到的关于actionlib的multiple goals问题,结论是:

“ 0) node & action servers

    There is no limit to how many action servers a node can have. It is perfectly possible to have one ROS node with multiple action servers; just pass them different topic names on creation.
    "it is totally reasonable to have two or more action servers in a single process".


1) client: 
a). action_client:
    multiple action clients can connect to a single action server, it is possible for a second client to cancel a goal sent by the first client. Thus, it is valid for the client to transition from [PENDING] to [RECALLING] if a [RECALLING] state is received from the server. 
b). simple_action_client:
   For simplicity, the Simple Action Client tracks only one goal at a time. When a user sends a goal with the simple client, it disables all callbacks associated with the previous goal and also stops tracking its state. Note that it does not cancel the previous goal! 


2) server: 
a). action_server:
If you want to have a more sophisticated handling of goals, you are free to do so using the actionlib API directly (without the SimpleActionServer). You could have multiple goals executing in parallel, queue goals, and generally do whatever you want.

b). simple_action_server:
Each SimpleActionServer is limited to one goal; whenever there is a new incoming goal, the currently pending goal is cancelled. This behaviour is a simplification of the actionlib API which catches most use cases.

但是像我这么懒的人,是懒得去倒腾在一个action server里面玩这么多goal的,我选择复制SimpleActionServer :-)

0 0
原创粉丝点击