ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

SimpleActionState doesn't abort on timeout

asked 2011-05-18 01:00:48 -0500

ju gravatar image

updated 2011-05-31 23:34:31 -0500

Hi, I am trying to use SMACH with a SimpleActionState for a Fibonacci action (presented in this tutorial. Everything worked fine until I tried to set the server_wait_timeout, to abort the action if the server is not running :

action_state = SimpleActionState('fibonacci', FibonacciAction, goal=FibonacciGoal(order=10), server_wait_timeout=rospy.Duration(10.0))

If the server is not running, the state doesn't abort and keeps waiting :

[WARN] 1305722502.537441: Still waiting for action server 'fibonacci' to start... is it running?

Edit: I have a similar problem when trying to use the exec and preempt timeouts :

action_state = SimpleActionState('fibonacci', FibonacciAction, goal=FibonacciGoal(order=10), exec_timeout=rospy.Duration(10.0), preempt_timeout=rospy.Duration(10.0))

If the action has not finished after 10s I have the following output :

[WARN] 1306926844.598188: Action fibonacci timed out after 10 seconds.

A preempt request should have been send, but if no result is received the action doesn't abort as expected, and the same output keeps printed.

Once again, am I missing something or is there a problem with the SimpleActionState implementation ?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted

answered 2011-05-25 04:00:44 -0500

Wim gravatar image

updated 2011-06-01 05:20:19 -0500

  • server_wait_timeout: You're right, looking at the source code it appears that the 'server_wait_timeout' parameter is simply ignored. This is a bug in smach_ros. Could you file a ticket? There's a link on the bottom of the smach page.

  • exec_timeout: This timeout specifies when the simple action client will send a preempt request to the action server. But it is up to the action server to respond to this preempt request. Some action server implementations do not support preemption. This might be accidental or simply because the type of activity that is associated with the action is not something that can be stopped at any point in time. So the exec_timeout works as it should: it tells the action server that it would like it to stop.

  • preempt_timeout: This timeout does not seem to be used in the code at all. I added this to the ticket below.

edit flag offensive delete link more


mmwise gravatar image mmwise  ( 2011-05-25 06:27:22 -0500 )edit

don't know if there was any resolution to this, but i put a patch up just in case here. should be better at interrupt handling as well as using server_wait_timeout

phil0stine gravatar image phil0stine  ( 2012-07-30 07:27:29 -0500 )edit

Question Tools


Asked: 2011-05-18 01:00:48 -0500

Seen: 1,055 times

Last updated: Jun 01 '11