[ros-users] Weird behavior when instantiating SimpleActionClient right after initializing node in rospy
eitan at willowgarage.com
Thu Jun 16 21:54:37 UTC 2011
I can't reproduce this error on my machine. For me, the sleep happens, then
the node waits 10 seconds and exits.
Also, you should probably re-post this question on answers.ros.org instead
of this list. Its a much nicer forum for answering these kinds of questions
as it supports better search and voting than the mailing list. When you
re-post, it'd also be helpful to see the error message you're receiving.
Hope all is well,
On Thu, Jun 16, 2011 at 2:31 PM, Chris Bersch <chris.bersch at gmail.com>wrote:
> Hi all,
> I ran into a problem when I ran python scripts where an actionlib
> action client is intantiated right after the node a the
> wait_for_server() function does not seem to work properly (it just
> does not wait).
> if __name__ == '__main__':
> # rospy.sleep(1.0)
> trajClient =
> if not trajClient.wait_for_server(rospy.Duration(10.0)):
> rospy.logerr("Could not connect to actionserver " )
> will return immediately with an error, even though I would expect it
> to wait 10s. If I uncomment rospy.sleep(1.0), everything works always
> as expected. Is there a more elegant solution to this?
> ros-users mailing list
> ros-users at code.ros.org
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the ros-users