ROS Resources: Documentation | Support | Discussion Forum | Index | Service Status | ros @ Robotics Stack Exchange
Ask Your Question

Revision history [back]

click to hide/show revision 1
initial version

A smach state is simply a Python class (see the example in this tutorial), so you can add a normal ROS subscriber to that class if you want.

This means, in the subscriber callback you can store the message data (a string in your case) as a class memeber, and in the execute callback you can make decisions about outcomes based on tis class member.