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

Preempt a state doesn't work

asked 2016-11-29 08:23:33 -0500

pv gravatar image

Hi!

I have tried to do a concurrence state with one one monitor-state that check for a reset topic and one state with a lot of sub-states that do the actual work. The goal is to and the work if someone publish on the reset topic. My problem is that then I publish and the monitor-state get active and try to preempt the other state nothing happen and the work continue:

For every sub state it said:

[INFO] [WallTime: 1480428562.104071] [3378.814000] Preempt requested on state machine before executing the next state. 
[INFO] [WallTime: 1480428562.105243] [3378.814000] Last state 'First task' did not service preempt. Preempting next state 'Second task' before executing...

But then continue. Do I have to add something to all the state that should happend then preempting? They are ordinary smach.state.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2017-12-04 04:10:16 -0500

knxa gravatar image

Last state 'First task' did not service preempt

indicates that the state was requested to preempt but did not respond to it. If 'First task' is a homemade smach.state, then you need to implement what do to when preempt is requested. Look at the interface for smach.state: preempt_requested and service_preempt.

edit flag offensive delete link more

Question Tools

1 follower

Stats

Asked: 2016-11-29 08:23:33 -0500

Seen: 456 times

Last updated: Dec 04 '17