<commit_before>#!usr/bin/env python

"""
Retrieves Apriltags absolute position, and acts as an importable package
"""

from geometry_msgs.msg import PoseStamped
import tf

class AprilPoseProvider(object):
    """
    Takes data from the Apriltags and can sends it to RobotController
    """

    def __init__(self, rospy):

        self.pose_callback = None
        self.orient = None
        rospy.Subscriber("/STAR_pose_continuous", PoseStamped, self.getPos, queue_size=10)


    def getPos(self, april_data):
        """
        Takes the pose and ships it off to the currently assigned callback (which should be in RobotController)
        """

        self.pose_callback(april_data)

        #if we ever want it, orientation is here too
        self.orient = april_data.pose.orientation.x, april_data.pose.orientation.y, april_data.pose.orientation.z, april_data.pose.orientation.w
        eulers = tf.transformations.euler_from_quaternion(self.orient)


    def subscribe(self, pose_callback):
        """
        updates new callback function for packaging purposes
        """

        self.pose_callback = pose_callback


    def run(self):
        """
        main loop
        """

        rospy.spin()


if __name__=="__main__":
    node = April()
    node.run()<commit_msg>fixed a small thing<commit_after>#!usr/bin/env python

"""
Retrieves Apriltags absolute position, and acts as an importable package
"""

from geometry_msgs.msg import PoseStamped
import tf

class AprilPoseProvider(object):
    """
    Takes data from the Apriltags and can sends it to RobotController
    """

    def __init__(self, rospy):

        self.pose_callback = None
        self.orient = None
        rospy.Subscriber("/STAR_pose_continuous", PoseStamped, self.getPos, queue_size=10)


    def getPos(self, april_data):
        """
        Takes the pose and ships it off to the currently assigned callback (which should be in RobotController)
        """
        if self.pose_callback is not None:
            self.pose_callback(april_data)

        #if we ever want it, orientation is here too
        self.orient = april_data.pose.orientation.x, april_data.pose.orientation.y, april_data.pose.orientation.z, april_data.pose.orientation.w
        eulers = tf.transformations.euler_from_quaternion(self.orient)


    def subscribe(self, pose_callback):
        """
        updates new callback function for packaging purposes
        """

        self.pose_callback = pose_callback


    def run(self):
        """
        main loop
        """

        rospy.spin()


if __name__=="__main__":
    node = April()
    node.run()
{'fraction_non_alphanumeric': 0.09070121951219512, 'fraction_numerical': 0.001524390243902439, 'mean_word_length': 2.733997155049787, 'pattern_counts': {'":': 2, '<': 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': '7554186', 'n_tokens_mistral': 799, 'n_tokens_neox': 769, 'n_words': 209}