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

MartinI's profile - activity

2016-04-06 10:39:49 -0500 received badge  Famous Question (source)
2016-02-25 03:40:35 -0500 received badge  Popular Question (source)
2016-02-25 03:40:35 -0500 received badge  Notable Question (source)
2016-02-12 04:49:26 -0500 asked a question 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']
                        )