SMACH 教程
学习 SMACH
如果你想要查看代码,尝试学习示例代码。如果倾向遵循循序渐进指南,查看循序渐进教程。
循序渐进学习 |
学习示例代码 |
|
|
SMACH 容器
- StateMachine容器
本教程教会你如何使用StateMachine容器.
- Concurrence容器
本教程教会你如何使用Concurrence容器
- Sequence容器
本教程将教会你如何使用Sequence容器。
- Iterator容器
本教程将教会你如何使用Iterator容器。
- 用actionlib封装容器
本教程介绍如何通过actionlib使用SMACH作为行为分发任务。
SMACH 状态
- 通用状态
本教程将展示如何实现一个通用SMACH状态
- CBState
本教程给出了一个如何使用CBState的示例,该状态在激活时简单地执行回调。
- SimpleActionState (ROS)
本教程展示如何使用SimpleActionState直接调用SMACH的行为接口。
- ServiceState (ROS)
本教程展示如何将服务的执行表示为一个SMACH状态。
- MonitorState (ROS)
监视状态
高级 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:
测试你对SMACH的认知
如果你有兴趣测试你的SMACH认知, 这个界面有一个循序渐进的测试/样例来测试你对不同状态和容器的认知。