<commit_before>#!/usr/bin/env python3
# -*- coding:utf-8 -*-
import rospy
import actionlib
import copy

from sensor_msgs.msg import Joy
from geometry_msgs.msg import Twist
from humanoid_league_msgs.msg import Speak, HeadMode
import humanoid_league_msgs.msg
from sensor_msgs.msg import JointState
from bitbots_msgs.msg import JointCommand


class JoyNode(object):
    """ This node controls the roboter via Gamepad.
    """

    #TODO read max values from config

    def __init__(self):
        log_level = rospy.DEBUG if rospy.get_param("/debug_active", False) else rospy.INFO
        rospy.init_node("joy_to_twist", log_level=log_level, anonymous=False)

        self.head_pan_pos = 0
        self.head_tilt_pos = 0

        # --- Initialize Topics ---
        rospy.Subscriber("/joy", Joy, self.joy_cb, queue_size=1)
        rospy.Subscriber("joint_states", JointState, self.joint_state_cb, queue_size=1)
        self.speak_pub = rospy.Publisher('speak', Speak, queue_size=1)
        self.speak_msg = Speak()
        self.speak_msg.priority = 1
<commit_msg>teleop: refactor speaker<commit_after>#!/usr/bin/env python3
# -*- coding:utf-8 -*-
import rospy
import actionlib
import copy

from sensor_msgs.msg import Joy
from geometry_msgs.msg import Twist
from humanoid_league_msgs.msg import Audio, HeadMode
import humanoid_league_msgs.msg
from sensor_msgs.msg import JointState
from bitbots_msgs.msg import JointCommand


class JoyNode(object):
    """ This node controls the roboter via Gamepad.
    """

    #TODO read max values from config

    def __init__(self):
        log_level = rospy.DEBUG if rospy.get_param("/debug_active", False) else rospy.INFO
        rospy.init_node("joy_to_twist", log_level=log_level, anonymous=False)

        self.head_pan_pos = 0
        self.head_tilt_pos = 0

        # --- Initialize Topics ---
        rospy.Subscriber("/joy", Joy, self.joy_cb, queue_size=1)
        rospy.Subscriber("joint_states", JointState, self.joint_state_cb, queue_size=1)
        self.speak_pub = rospy.Publisher('speak', Audio, queue_size=1)
        self.speak_msg = Audio()
        self.speak_msg.priority = 25

{'fraction_non_alphanumeric': 0.099906191369606, 'fraction_numerical': 0.00797373358348968, 'mean_word_length': 3.4905263157894737, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, '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': '665528', 'n_tokens_mistral': 742, 'n_tokens_neox': 708, 'n_words': 164}