[ros-users] Simple action client - querying its status

Vijay Pradeep vpradeep at willowgarage.com
Fri Oct 22 17:59:26 UTC 2010


Hi Daniel,

It sounds like what you're asking for is a method like:
*bool SimpleActionClient::doesGoalExist()*

Maybe this is something that we could add in future common/actionlib
releases, but I'm not convinced that it is needed.  In general, the
structure of code that uses a SimpleActionClient lends itself to making it
very clear as to whether or not a goal has already been sent.  Also, if
you're not sure whether or not a goal exists, then you definitely don't know
what's in the goal that was sent, and if you don't know what was sent, then
you probably won't need to worry about it's status.

Running into a situation where you need to check whether or not a goal
exists might mean that there's a more clear way of structuring your code or
state machine that is triggering the ActionClient events.  If there's a
simple/pseudocode way to explain to your use-case, that might be worthwhile
for us to take a look at.

Good luck!
Vijay Pradeep

On Fri, Oct 22, 2010 at 10:38 AM, Eitan Marder-Eppstein <
eitan at willowgarage.com> wrote:

> Daniel,
>
> If your goal is to check whether or not an action server is processing a
> goal, there's no tool currently to give you that information. It would be
> simple to write something that listens to status and lets you know if any
> goals for a given server are marked as active, and it wouldn't be
> unreasonable to put this logic into the action client. You should feel free
> to create a ticket for this feature request. With that said, action servers
> have a number of different policies when it comes to handling goals, as
> Blaise mentioned, and will do different things when you send a goal to them.
> I can, however, see use cases where you might not want to send a goal to an
> action server when it is already processing a request.
>
> Hope all is well,
>
> Eitan
>
>
> On Fri, Oct 22, 2010 at 8:53 AM, Blaise Gassend <blaise at willowgarage.com>wrote:
>
>> Hi Daniel,
>>
>> getState() is telling you the state of the client's current goal, not
>> the state of the server. Hence, if there is no goal, getState is
>> meaningless. This makes sense because a server could have the ability
>> to handle multiple goals in parallel. Hence, there isn't a single
>> state for the server that you can query.
>>
>> I imagine that what you are trying to do is determine if a server that
>> can only handle a single goal is currently busy. I don't think that
>> there is a general answer to that question. Some servers might reject
>> your goal if they are already busy. Others might interrupt the
>> existing goal. Let's see what others have to reply.
>>
>> Blaise
>>
>> On Fri, Oct 22, 2010 at 12:51 AM, Daniel Stonier <d.stonier at gmail.com>
>> wrote:
>> >
>> > Just a quick question with regards to the simple action client - why is
>> > using the getState() method considered improper when there is no goal
>> > (action client outputs an ROS_ERROR when you do so). Is there another
>> means
>> > of querying the server to know whether it is currently handling a goal
>> or
>> > not?
>> > Or perhaps, am I mistaken in thinking that I should be needing to?
>> > Regards,
>> > Daniel Stonier.
>> > --
>> > Phone : +82-10-5400-3296 (010-5400-3296)
>> > Home: http://snorriheim.dnsdojo.com/
>> > Yujin Robot: http://www.yujinrobot.com/
>> > Eros: http://www.ros.org/wiki/eros
>> > Embedded Control Libraries:
>> http://snorriheim.dnsdojo.com/redmine/wiki/ecl
>> >
>> > _______________________________________________
>> > ros-users mailing list
>> > ros-users at code.ros.org
>> > https://code.ros.org/mailman/listinfo/ros-users
>> >
>> >
>> _______________________________________________
>> ros-users mailing list
>> ros-users at code.ros.org
>> https://code.ros.org/mailman/listinfo/ros-users
>>
>
>
> _______________________________________________
> ros-users mailing list
> ros-users at code.ros.org
> https://code.ros.org/mailman/listinfo/ros-users
>
>


-- 
Vijay Pradeep
Systems Engineer
Willow Garage, Inc.
 <tfoote at willowgarage.com>vpradeep at willowgarage.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.ros.org/pipermail/ros-users/attachments/20101022/5a34816f/attachment-0003.html>


More information about the ros-users mailing list