#----------------------------------------------------------------------------------------
# BEGIN: {{ state_name }}
# TEMPLATE: StateMachine
#
{{ state_name | lower() }} = smach.StateMachine(outcomes=['succeeded', 'aborted', 'preempted'])
      
{{ state_name | lower() }}_sis = smach_ros.IntrospectionServer('{{ node_name }}', {{ state_name }}, '{{ sis_topic }}')
{{ state_name | lower() }}_sis.start()

with {{ state_name | lower() }}:

  {{ body | indent(2) }}

smach.StateMachine.add('{{ state_name }}', {{ state_name }},
                       transitions={'succeeded':'succeeded'})
#
# END: {{ state_name }}
#----------------------------------------------------------------------------------------

Allow nested state rendering in container templates
Allow nested state rendering in container templates

Enable the use of container state templates such that their nested
states may be rendered into their body placeholders.

Simultaneously fix the indentation issue by using indentation in the
templates themselves, as well as Jinja indent filters in the template
placeholders.
