Ejemplo n.º 1
0
 def make_gripper_translation(self, min_dist, desired, axis=1.0):
     g = GripperTranslation()
     g.direction.vector.x = axis
     g.direction.header.frame_id = GRIPPER_FRAME
     g.min_distance = min_dist
     g.desired_distance = desired
     return g
Ejemplo n.º 2
0
 def make_gripper_translation(self, min_dist, desired, axis=1.0):
     g = GripperTranslation()
     g.direction.vector.x = axis
     g.direction.header.frame_id = GRIPPER_FRAME
     g.min_distance = min_dist
     g.desired_distance = desired
     return g
Ejemplo n.º 3
0
 def make_gripper_translation(self, min_dist, desired, axis=-1.0):
     g = GripperTranslation()
     g.direction.vector.z = axis
     g.direction.header.frame_id = 'right_l6'
     g.min_distance = min_dist
     g.desired_distance = desired
     return g
Ejemplo n.º 4
0
 def make_gripper_translation(self, min_dist, desired, vector):
     g = GripperTranslation()
     g.direction.vector.x = vector[0]
     g.direction.vector.y = vector[1]
     g.direction.vector.z = vector[2]
     g.direction.header.frame_id = "panda_link0"
     g.min_distance = min_dist
     g.desired_distance = desired
     return g
Ejemplo n.º 5
0
def create_gripper_translation(direction_vector, desired_distance=0.15, min_distance=0.01):
    g_trans = GripperTranslation()
    g_trans.direction.header.frame_id = REFERENCE_LINK
    g_trans.direction.header.stamp = rospy.Time.now()
    g_trans.direction.vector.x = direction_vector.x
    g_trans.direction.vector.y = direction_vector.y
    g_trans.direction.vector.z = direction_vector.z
    g_trans.desired_distance = desired_distance
    g_trans.min_distance = min_distance
    return g_trans
Ejemplo n.º 6
0
 def create_gripper_translation(direction_vector, desired_distance=0.10, min_distance=0.05):
     gt = GripperTranslation()
     gt.direction.header.frame_id = REFERENCE_FRAME
     gt.direction.header.stamp = rospy.Time.now()
     gt.direction.vector.x = direction_vector.x
     gt.direction.vector.y = direction_vector.y
     gt.direction.vector.z = direction_vector.z
     gt.desired_distance = desired_distance
     gt.min_distance = min_distance
     return gt
    def make_grab_translation(self, min_dist, desired, vector):
        g = GripperTranslation()

        g.direction.vector.x = vector[0]
        g.direction.vector.y = vector[1]
        g.direction.vector.z = vector[2]

        g.direction.header.frame_id = 'lh_palm'
        g.min_distance = min_dist
        g.desired_distance = desired
        return g
Ejemplo n.º 8
0
 def create_gripper_translation(direction_vector,
                                desired_distance=0.10,
                                min_distance=0.05):
     gt = GripperTranslation()
     gt.direction.header.frame_id = REFERENCE_FRAME
     gt.direction.header.stamp = rospy.Time.now()
     gt.direction.vector.x = direction_vector.x
     gt.direction.vector.y = direction_vector.y
     gt.direction.vector.z = direction_vector.z
     gt.desired_distance = desired_distance
     gt.min_distance = min_distance
     return gt
def createGripperTranslation(direction_vector, desired_distance=0.15, min_distance=0.01):
    """Returns a GripperTranslation message with the direction_vector and desired_distance and min_distance in it.
    Intended to be used to fill the pre_grasp_approach and post_grasp_retreat field in the Grasp message."""
    g_trans = GripperTranslation()
    g_trans.direction.header.frame_id = "base_link"
    g_trans.direction.header.stamp = rospy.Time.now()
    g_trans.direction.vector.x = direction_vector.x
    g_trans.direction.vector.y = direction_vector.y
    g_trans.direction.vector.z = direction_vector.z
    g_trans.desired_distance = desired_distance
    g_trans.min_distance = min_distance
    return g_trans
Ejemplo n.º 10
0
def create_gripper_translation(direction_vector,
                               desired_distance=0.15,
                               min_distance=0.01):
    g_trans = GripperTranslation()
    g_trans.direction.header.frame_id = REFERENCE_LINK
    g_trans.direction.header.stamp = rospy.Time.now()
    g_trans.direction.vector.x = direction_vector.x
    g_trans.direction.vector.y = direction_vector.y
    g_trans.direction.vector.z = direction_vector.z
    g_trans.desired_distance = desired_distance
    g_trans.min_distance = min_distance
    return g_trans
def createGripperTranslation(direction_vector, desired_distance=0.15, min_distance=0.01):
    """Returns a GripperTranslation message with the direction_vector and desired_distance and min_distance in it.
    Intended to be used to fill the pre_grasp_approach and post_grasp_retreat field in the Grasp message."""
    g_trans = GripperTranslation()
    g_trans.direction.header.frame_id = "base_link"
    g_trans.direction.header.stamp = rospy.Time.now()
    g_trans.direction.vector.x = direction_vector.x
    g_trans.direction.vector.y = direction_vector.y
    g_trans.direction.vector.z = direction_vector.z
    g_trans.desired_distance = desired_distance
    g_trans.min_distance = min_distance
    return g_trans
Ejemplo n.º 12
0
    def create_gripper_translation(self,
                                   direction_vector,
                                   min_distance,
                                   desired_distance,
                                   frame_id='base_footprint'):
        # used to generate pre-grasp approach and post-grasp retreat for grasps
        g_trans = GripperTranslation()
        g_trans.direction.header.frame_id = frame_id
        g_trans.direction.vector = direction_vector
        g_trans.min_distance = min_distance
        g_trans.desired_distance = desired_distance

        return g_trans
Ejemplo n.º 13
0
def make_gripper_translation(min_dist, desired, vector):
	#Inicio el objeto grippert translation
        g = GripperTranslation()
	 # Defino las componentes del vector
	g.direction.vector.x = vector[0]
	g.direction.vector.y = vector[1]
	g.direction.vector.z = vector[2]
	#EL vector es relativo al gripper_frame
        g.direction.header.frame_id = GRIPPER_FRAME
	#Defino la distancia minima y deseada al objetivo
        g.min_distance = min_dist
        g.desired_distance = desired
        return g
Ejemplo n.º 14
0
def get_gripper_translation(direction,desired_dis, min_dis,reference_frame):
    """
    Return "pre_grasp_approach"/"post_grasp_retreat"/"post_place_retreat" for the moveit_msgs/Grasp
    input: direction of translation
    desired_dis: distance should translate in that direction
    min_dis: minimum distance to consider before changing grasp posture
    """    
    translation=GripperTranslation()
    translation.direction.header.frame_id=reference_frame #directions defined with respect of this reference frame
    translation.direction.vector.x=direction[0]
    translation.direction.vector.y=direction[1]
    translation.direction.vector.z=direction[2]
    translation.desired_distance=desired_dis
    translation.min_distance=min_dis
    return translation
Ejemplo n.º 15
0
    def make_gripper_translation(self, min_dist, desired, vector):
        # 初始化translation对象
        g = GripperTranslation()

        # 设置方向向量
        g.direction.vector.x = vector[0]
        g.direction.vector.y = vector[1]
        g.direction.vector.z = vector[2]

        # 设置参考坐标系
        g.direction.header.frame_id = GRIPPER_FRAME

        # 设置最小和期望的距离
        g.min_distance = min_dist
        g.desired_distance = desired

        return g
Ejemplo n.º 16
0
    def make_gripper_translation(self, min_dist, desired, vector):
        # Initialize the gripper translation object
        g = GripperTranslation()

        # Set the direction vector components to the input
        g.direction.vector.x = vector[0]
        g.direction.vector.y = vector[1]
        g.direction.vector.z = vector[2]

        # The vector is relative to the gripper frame
        g.direction.header.frame_id = GRIPPER_FRAME

        # Assign the min and desired distances from the input
        g.min_distance = min_dist
        g.desired_distance = desired

        return g
Ejemplo n.º 17
0
 def make_gripper_translation(self, min_dist, desired, vector):
     # Initialize the gripper translation object
     g = GripperTranslation()
     
     # Set the direction vector components to the input
     g.direction.vector.x = vector[0]
     g.direction.vector.y = vector[1]
     g.direction.vector.z = vector[2]
     
     # The vector is relative to the gripper frame
     g.direction.header.frame_id = GRIPPER_FRAME
     
     # Assign the min and desired distances from the input
     g.min_distance = min_dist
     g.desired_distance = desired
     
     return g