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

can ActionServerWrapper use a dynamically set SMACH state

asked 2017-09-10 10:02:39 -0600

knxa gravatar image

I have just discovered ActionServerWrapper which seems to be the right choice because I need to execute and abort a smach statemachine though ROS messages.

But I have a long list of statemachines and only one can run at a time. It makes most sense to create just one ActionServerWrapper, which in the "Goal" message takes the name of the state to execute.

But the introduction tutorial shows an ActionServerWrapper where the SMACH state is set in the constructor. Can I change the main state later, just before execution?

BTW: The link at the bottom of this page, referring to the ActionServerWrapper documentation, is dead. Where do I find it?

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
2

answered 2017-11-15 07:02:43 -0600

knxa gravatar image

I made it work by subclassing ActionServerWrapper and overriding execute_cb. Then I can set the relevant state machine dynamically in the execute_cb before calling the original ActionServerWrapper.execute_cb.

Action server source: http://docs.ros.org/diamondback/api/s...

edit flag offensive delete link more

Question Tools

3 followers

Stats

Asked: 2017-09-10 10:02:39 -0600

Seen: 294 times

Last updated: Nov 15 '17