Contents
SMACH Tutorials
Learning SMACH
If you just want to look at code, try out the learning by example. If you rather follow a step-by-step guide, choose the step-by-step tutorials.
Learning Step-by-Step |
Learning by Example |
|
|
SMACH Containers
- Concurrence container
This tutorial teaches you how to use the Concurrence container.
- Iterator container
This tutorial teaches you how to use the Iterator container.
- StateMachine容器
本教程教会你如何使用StateMachine容器.
- Concurrence容器
本教程教会你如何使用Concurrence容器
- Sequence容器
本教程将教会你如何使用Sequence容器。
- Iterator容器
本教程将教会你如何使用Iterator容器。
- 用actionlib封装容器
本教程介绍如何通过actionlib使用SMACH作为行为分发任务。
- StateMachine container
This tutorial teaches you how to use the StateMachine container.
- Sequence container
This tutorial teaches you how to use the Sequence container.
- StateMachine container
This tutorial teaches you how to use the StateMachine container.
- Concurrence container
This tutorial teaches you how to use the Concurrence container.
- Sequence container
This tutorial teaches you how to use the Sequence container.
- Iterator container
This tutorial teaches you how to use the Iterator container.
- Wrapping a Container With actionlib
This tutorial explains how to serve out a SMACH plan as an action over actionlib.
- Wrapping a Container With actionlib
This tutorial explains how to serve out a SMACH plan as an action over actionlib.
SMACH States
- ServiceState (ROS)
This tutorial shows how to represent the execution of a service as a SMACH state.
- CBState
This tutorial gives an example of how to use CBState, a state that simply executes a callback when it is active.
- SimpleActionState (ROS)
This tutorial show how to use the SimpleActionState to directly call an action interface using SMACH
- Generic State
This tutorial show how to implement a generic SMACH State
- 通用状态
本教程将展示如何实现一个通用SMACH状态
- CBState
本教程给出了一个如何使用CBState的示例,该状态在激活时简单地执行回调。
- SimpleActionState (ROS)
本教程展示如何使用SimpleActionState直接调用SMACH的行为接口。
- Generic State
This tutorial show how to implement a generic SMACH State
- CBState
This tutorial gives an example of how to use CBState, a state that simply executes a callback when it is active.
- SimpleActionState (ROS)
This tutorial show how to use the SimpleActionState to directly call an action interface using SMACH
- ServiceState (ROS)
This tutorial shows how to represent the execution of a service as a SMACH state.
- MonitorState (ROS)
Monitor a state!
- ServiceState (ROS)
本教程展示如何将服务的执行表示为一个SMACH状态。
- MonitorState (ROS)
监视状态
- MonitorState (ROS)
Monitor a state!
Advanced SMACH
- Writing Custom Container Classes
Most tasks can be performed without writing new types of container classes, but this tutorial explains how to write a new one.
- State Preemption Implementation
This tutorial shows how to implement simple flag-based preemption in SMACH states.
- StateMachinePreemption
Example of a state machine that implements preemption, using a concurrence container and monitor state.
- Writing Custom State Classes with User-defined Callbacks
Sometimes you want to create a state class like smach.SimpleActionState which receives user callbacks as arguments. If these callbacks change the SMACH interface of a state (outcomes, userdata keys), then the callbacks need to be annotated with this information.
- State Preemption Implementation
This tutorial shows how to implement simple flag-based preemption in SMACH states.
- Writing Custom Container Classes
Most tasks can be performed without writing new types of container classes, but this tutorial explains how to write a new one.
- Writing Custom State Classes with User-defined Callbacks
Sometimes you want to create a state class like smach.SimpleActionState which receives user callbacks as arguments. If these callbacks change the SMACH interface of a state (outcomes, userdata keys), then the callbacks need to be annotated with this information.
- StateMachinePreemption
Example of a state machine that implements preemption, using a concurrence container and monitor state.
Create a new tutorial:
Test your SMACH knowledge
If you're interested in testing your SMACH knowledge, this page has a step-by-step test/example to test your knowledge of different states and containers.