Smach Userdata Input/Output keys error
[ERROR] [WallTime: 1455271923.018549] [44.655000] Userdata key 'error_bool' not available. Available keys are: ['parameters']
I keep getting this error... Anybody has a clue why is this happening?
This is how the definition of the states and the state machine are done:
def main(self):
# Create a SMACH state machine
sm = smach.StateMachine(outcomes=['outcome'])
sm.userdata.parameters = []
# Open the container
with sm:
# Add states to the container
smach.StateMachine.add('Ready', ready_state.Ready(),
transitions={'cartesianMotionRequest':'CartesianMotion', \
'articularMotionRequest':'ArticularMotion', \
'fullBodyMotionRequest':'FullBodyMotion', \
'endEffectorRequest':'EndEffectorCoordination', \
'trajectoryExecutionRequest':'TrajectoryExecution', \
'failure':'ErrorHandling', \
'recordTrajectoryRequest':'RecordTrajectory', \
'changeEndEffectorRequest':'ChangeEndEffector', \
'exit':'Finish'},
remapping={ 'error_bool':'error_bool',
'parameters':'parameters' })
smach.StateMachine.add('CartesianMotion', cartesian_motion_state.CartesianMotion(self.hiro),
transitions={'success':'Ready', \
'failure':'ErrorHandling'},
remapping={'parameters':'parameters',
'error_bool':'error_bool'})
________________________________________________________________________________________-
class Ready(smach.State):
def __init__(self):
smach.State.__init__(self,
outcomes=['cartesianMotionRequest', \
'articularMotionRequest', \
'fullBodyMotionRequest', \
'endEffectorRequest', \
'trajectoryExecutionRequest', \
'failure', 'recordTrajectoryRequest', \
'changeEndEffectorRequest', 'exit'], \
output_keys=['parameters'],
input_keys=['error_bool']
)
class CartesianMotion(smach.State):
def __init__(self, robot):
smach.State.__init__(self, outcomes=['success', 'failure'],
input_keys=['parameters'],
output_keys=['error_bool']
)