Size: 1600
Comment:
|
Size: 1418
Comment:
|
Deletions are marked like this. | Additions are marked like this. |
Line 27: | Line 27: |
{{{#!python from smach import Iterator }}} |
|
Line 31: | Line 28: |
Start by constructing the iterator: {{{ task_it = Iterator(['succeeded','preempted','aborted'], input_keys = ['key_a', 'key_b','key_c'], it = lambda: range(0, len(sm.userdata.key_c)), output_keys = ['key_d', 'key_e', 'key_f'], it_label = 'it_index', exhausted_outcome = 'succeeded') }}} |
In this tutorial we are going to use an iterator to sort a list of numbers into evens and odds. <<GetTaggedCode(https://code.ros.org/svn/ros-pkg/stacks/executive_smach_tutorials/trunk/smach_tutorials/examples/iterator_tutorial.py,python,FULLTEXT,show_uri,no_tag_newlines,global_lines)>> |
![]() |
Iterator container
Description: This tutorial teaches you how to use the Iterator container.Tutorial Level: BEGINNER
Next Tutorial: Wrapping a SMACH container with actionlib
Contents
In this tutorial we are going to use an iterator to sort a list of numbers into evens and odds.
Could not fetch external code from 'https://code.ros.org/svn/ros-pkg/stacks/executive_smach_tutorials/trunk/smach_tutorials/examples/iterator_tutorial.py':