#----------------------------------------------------------------------------------------
# BEGIN: {{ state_name }}
# TEMPLATE: SetOutput
#
{{ state_name }}_request = DigitalOutputRequest({{ output_number }}, {{ value }})

smach.StateMachine.add('{{ state_name }}',
                       smach_ros.ServiceState('/{{ robot }}/set_output',
                                              DigitalOutput,
                                              request = {{ state_name }}_request),
                       transitions={'succeeded':'{{ succeeded }}'})
# END: {{ state_name }}
#----------------------------------------------------------------------------------------

Refactor for OOP, modularity and Pythonicity
Refactor for OOP, modularity and Pythonicity

Rename 'generate_state_machine.py' to 'smacha.py', short for 'Jinja-based code
templating, generation and scripting for SMACH', with a view towards
eventual open-source release.

Refactor code to make it object-oriented and modular.

Add SetOutputState template for setting digital outputs.

Add test script for new smacha yaml script format that will allow for state
nesting, concurrency, etc. in future versions. Not yet usable.
