• Diff for "mysmach/Tutorials/CBState"
Differences between revisions 1 and 2
Revision 1 as of 2010-07-27 20:20:37
Size: 988
Comment:
Revision 2 as of 2010-07-27 21:17:33
Size: 1354
Comment:
Deletions are marked like this. Additions are marked like this.
Line 28: Line 28:
This state simply executes a single callback when the state is executed. This is useful for executing arbitrary code in a state, without having to declare a new state class. This class supports the use of the {{{smach.cb_interface}}} decorator, and it's API can be found [[http://www.ros.org/doc/api/smach/html/python/smach.state.CBState-class.html#__init__|here]].

(!) Please ask about problems and questions regarding this tutorial on answers.ros.org. Don't forget to include in your question the link to this page, the versions of your OS & ROS, and also add appropriate tags.

CBState

Description: This tutorial gives an example of how to use CBState, a state that simply executes a callback when it is active.

Tutorial Level: BEGINNER

Next Tutorial: Simple Action State

Contents

This state simply executes a single callback when the state is executed. This is useful for executing arbitrary code in a state, without having to declare a new state class. This class supports the use of the smach.cb_interface decorator, and it's API can be found here.

Wiki: mysmach/Tutorials/CBState (last edited 2015-01-31 08:33:54 by hongming wang)