<commit_before>#!/usr/bin/env python

import numpy as np
import rospy
import geometry_msgs.msg
import tf
from moveit_commander import RobotCommander, roscpp_initialize
from moveit_msgs.msg import RobotState


class Phantomx_Pincher():
    def __init__(self):
        roscpp_initialize([])
        self.robot = RobotCommander()
        self.init_planner()

    def init_planner(self):
        # initialize the planner parameters
        self.robot.pincher_arm.set_start_state(RobotState())
        self.robot.pincher_arm.set_num_planning_attempts(10000)
        self.robot.pincher_arm.set_planning_time(5)
        self.robot.pincher_arm.set_goal_position_tolerance(0.01)
        self.robot.pincher_arm.set_goal_orientation_tolerance(0.5)

    def set_start_state_to_current_state(self):
        self.robot.pincher_arm.set_start_state_to_current_state()
        self.robot.pincher_gripper.set_start_state_to_current_state()
        
<commit_msg>Add sleep to give time for move_group start<commit_after>#!/usr/bin/env python

import numpy as np
import rospy
import geometry_msgs.msg
import tf
from moveit_commander import RobotCommander, roscpp_initialize
from moveit_msgs.msg import RobotState


class Phantomx_Pincher():
    def __init__(self):
        roscpp_initialize([])
        rospy.sleep(5) #wait for moveit. TO-DO
        self.robot = RobotCommander()
        self.init_planner()

    def init_planner(self):
        # initialize the planner parameters
        self.robot.pincher_arm.set_start_state(RobotState())
        self.robot.pincher_arm.set_num_planning_attempts(10000)
        self.robot.pincher_arm.set_planning_time(5)
        self.robot.pincher_arm.set_goal_position_tolerance(0.01)
        self.robot.pincher_arm.set_goal_orientation_tolerance(0.5)

    def set_start_state_to_current_state(self):
        self.robot.pincher_arm.set_start_state_to_current_state()
        self.robot.pincher_gripper.set_start_state_to_current_state()
        

{'fraction_non_alphanumeric': 0.07845134997452878, 'fraction_numerical': 0.011716760061130923, 'mean_word_length': 3.8613861386138613, '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': '7245917', 'n_tokens_mistral': 705, 'n_tokens_neox': 686, 'n_words': 100}