<commit_before>#!/usr/bin/env python
from flexbe_core import EventState, Logger
from tf.transformations import quaternion_from_euler
from geometry_msgs.msg import Pose

class GenPoseEulerKey(EventState):
    '''
    ### State
    Generate a pose from xyz and euler angles keys instead of parameters

    ### input keys
    ># x
    ># y
    ># z
    ># yaw
    ># pitch
    ># roll

    ### output_keys
    #> pose generated pose

    ### outcomes
    <= done
    '''

    def __init__(self):
        # See example_state.py for basic explanations.
        super(GenPoseEulerKey, self).__init__(outcomes=['done'], output_keys=['pose'])
        self.pt = Pose()
        self.pt.position.x = userdata.x
        self.pt.position.y = userdata.y
        self.pt.position.z = userdata.z
        qt = quaternion_from_euler(userdata.roll, userdata.pitch, userdata.yaw)
        self.pt.orientation.w = qt[3]
        self.pt.orientation.x = qt[0]
        self.pt.orientation.y = qt[1]
        self.pt.orientation.z = qt[2]


    def execute(self, userdata):<commit_msg>added input_keys to pose_gen_euler_key.py<commit_after>#!/usr/bin/env python
from flexbe_core import EventState, Logger
from tf.transformations import quaternion_from_euler
from geometry_msgs.msg import Pose

class GenPoseEulerKey(EventState):
    '''
    ### State
    Generate a pose from xyz and euler angles keys instead of parameters

    ### input keys
    ># x
    ># y
    ># z
    ># yaw
    ># pitch
    ># roll

    ### output_keys
    #> pose generated pose

    ### outcomes
    <= done
    '''

    def __init__(self):
        # See example_state.py for basic explanations.
        super(GenPoseEulerKey, self).__init__(outcomes=['done'], output_keys=['pose']
            ,input_keys=['x', 'y', 'z', 'yaw', 'pitch', 'roll'])
        self.pt = Pose()
        self.pt.position.x = userdata.x
        self.pt.position.y = userdata.y
        self.pt.position.z = userdata.z
        qt = quaternion_from_euler(userdata.roll, userdata.pitch, userdata.yaw)
        self.pt.orientation.w = qt[3]
        self.pt.orientation.x = qt[0]
        self.pt.orientation.y = qt[1]
        self.pt.orientation.z = qt[2]


    def execute(self, userdata):
{'fraction_non_alphanumeric': 0.12409420289855072, 'fraction_numerical': 0.0036231884057971015, 'mean_word_length': 2.5571658615136874, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 17, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3139195', 'n_tokens_mistral': 770, 'n_tokens_neox': 734, 'n_words': 162}