Daniel,<div><br></div><div>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.</div>
<div><br></div><div>Hope all is well,</div><div><br></div><div>Eitan<br><br><div class="gmail_quote">On Fri, Oct 22, 2010 at 8:53 AM, Blaise Gassend <span dir="ltr"><<a href="mailto:blaise@willowgarage.com">blaise@willowgarage.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">Hi Daniel,<br>
<br>
getState() is telling you the state of the client's current goal, not<br>
the state of the server. Hence, if there is no goal, getState is<br>
meaningless. This makes sense because a server could have the ability<br>
to handle multiple goals in parallel. Hence, there isn't a single<br>
state for the server that you can query.<br>
<br>
I imagine that what you are trying to do is determine if a server that<br>
can only handle a single goal is currently busy. I don't think that<br>
there is a general answer to that question. Some servers might reject<br>
your goal if they are already busy. Others might interrupt the<br>
existing goal. Let's see what others have to reply.<br>
<br>
Blaise<br>
<div><div></div><div class="h5"><br>
On Fri, Oct 22, 2010 at 12:51 AM, Daniel Stonier <<a href="mailto:d.stonier@gmail.com">d.stonier@gmail.com</a>> wrote:<br>
><br>
> Just a quick question with regards to the simple action client - why is<br>
> using the getState() method considered improper when there is no goal<br>
> (action client outputs an ROS_ERROR when you do so). Is there another means<br>
> of querying the server to know whether it is currently handling a goal or<br>
> not?<br>
> Or perhaps, am I mistaken in thinking that I should be needing to?<br>
> Regards,<br>
> Daniel Stonier.<br>
> --<br>
> Phone : +82-10-5400-3296 (010-5400-3296)<br>
> Home: <a href="http://snorriheim.dnsdojo.com/" target="_blank">http://snorriheim.dnsdojo.com/</a><br>
> Yujin Robot: <a href="http://www.yujinrobot.com/" target="_blank">http://www.yujinrobot.com/</a><br>
> Eros: <a href="http://www.ros.org/wiki/eros" target="_blank">http://www.ros.org/wiki/eros</a><br>
> Embedded Control Libraries: <a href="http://snorriheim.dnsdojo.com/redmine/wiki/ecl" target="_blank">http://snorriheim.dnsdojo.com/redmine/wiki/ecl</a><br>
><br>
</div></div>> _______________________________________________<br>
> ros-users mailing list<br>
> <a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
> <a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
><br>
><br>
_______________________________________________<br>
ros-users mailing list<br>
<a href="mailto:ros-users@code.ros.org">ros-users@code.ros.org</a><br>
<a href="https://code.ros.org/mailman/listinfo/ros-users" target="_blank">https://code.ros.org/mailman/listinfo/ros-users</a><br>
</blockquote></div><br></div>