<commit_before>
import numpy as np, math
import copy

import roslib; roslib.load_manifest('epc_core')
import rospy
import hrl_lib.util as ut
import hrl_lib.transforms as tr
import tf.transformations as tf_trans

from std_msgs.msg import Bool, Empty


## Class defining the core EPC function and a few simple examples.
# More complex behaviors that use EPC should have their own ROS
# packages.
class EPC():
    def __init__(self, robot):
        self.robot = robot
        self.f_list = []
        self.ee_list = []
        self.cep_list = []

        self.stop_epc = False
        self.pause_epc = False
        rospy.Subscriber('/epc/stop', Bool, self.stop_cb)
        rospy.Subscriber('/epc/pause', Bool, self.pause_cb)

    def stop_cb(self, msg):
        self.stop_epc = msg.data

    def pause_cb(self, msg):
        self.pause_epc = msg.data

    ##
    # @param equi_pt_generator: function that returns stop, ea  where ea: equilibrium angles and  stop: string which is '' for epc motion to continue<commit_msg>M    epc_core/epc.py small change. stop/start command overrides pause or resume state.<commit_after>
import numpy as np, math
import copy

import roslib; roslib.load_manifest('epc_core')
import rospy
import hrl_lib.util as ut
import hrl_lib.transforms as tr
import tf.transformations as tf_trans

from std_msgs.msg import Bool, Empty


## Class defining the core EPC function and a few simple examples.
# More complex behaviors that use EPC should have their own ROS
# packages.
class EPC():
    def __init__(self, robot):
        self.robot = robot
        self.f_list = []
        self.ee_list = []
        self.cep_list = []

        self.stop_epc = False
        self.pause_epc = False
        rospy.Subscriber('/epc/stop', Bool, self.stop_cb)
        rospy.Subscriber('/epc/pause', Bool, self.pause_cb)

    def stop_cb(self, msg):
        self.stop_epc = msg.data
        self.pause_epc = False # stop/start overrides pause.

    def pause_cb(self, msg):
        self.pause_epc = msg.data

    ##
    # @param equi_pt_generator: function that returns stop, ea  where ea: equilibrium angles and  stop: string which is '' for epc motion to continue
{'fraction_non_alphanumeric': 0.08755760368663594, 'fraction_numerical': 0.0, 'mean_word_length': 2.9689213893967095, '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': '5393416', 'n_tokens_mistral': 712, 'n_tokens_neox': 689, 'n_words': 222}